max sql query size

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
i'm trying to consolidate my sql queries by using extended sql queries
and have run into a bit of a snag.  i get Error 1153: Got a packet
bigger than 'max_allowed_packet' with the following SQL query when
trying to run some queries.

the max_allowed_packet is set at 1MB.  my script checks to make sure
that the string that is passed to mysql_query is no more than 1MB long,
but that doesn't do the trick.  does php pad sql queries before it
sends 'em off?  does mysql measure the size of an extended query by
adding up the size of ea. of the fields in the table in question?
any help would be appreciated - thanks! :)

Re: max sql query size

Quoted text here. Click to load it

The TCP driver most likely makes the datapacket up and does what it
needs to do to send it off to the MySQL daemon.  You have no control
over this at the user-level.  I'd chop up the query to fit in the
standard MTU for your network adapter.  You could contact your sysadmin
to make the MTU larger but that might affect network traffic to the
machine and I doubt they'd do it.

Fix your application.

DeeDee, don't press that button!  DeeDee!  NO!  Dee...

Re: max sql query size

TerraFrost wrote:
Quoted text here. Click to load it

You have SQL queries that are 1 MB long?  Not the result set, but the
query itself?


Site Timeline