Help - Search - Members - Calendar
Full Version: Support Large Blobs / Text Fields
Webyog Forums > SQLyog > SQLyog: Bugs / Feature Requests
meDavid


When synchronizing data between servers we keep getting errors regarding 'sql server gone away' due to queries that are bigger then the configured max packet size. Usually a default mysql configuration allows for a packet size between the client/server of maximum 1Mb (max_allowed_packet). This is an anoying limit, but I would like sqlyog to keep the packsize in mind when exporting. This would mean that when exporting a blob field of 1.5mb with a max_allowed_packet of 1mb, the query would be split in 2 (1 insert, 1 update with the additional data).
peterlaursen
Why not change the server configuration to reflect the data you have on the server? I think it is *not logical* to keep a setting lower that the size of a single row.

We have no intention of splitting an INSERT statement into an INSERT + 1 or more UPDATEs in Data Sync. You will also get into problems with restoring backups! I know no backup tool that does that either

Also a single MEDIUMBLOB/LONGBLOB may still be larger than the setting, if it is low. Then there is no other solution than raising the configuration setting.

All you need to do is to insert into [mysql] section of the server configuration file like this

max_allowed_packet = 64M
(or whatever value)

.. and restart the server.
meDavid
QUOTE (peterlaursen @ Jun 19 2008, 03:56 PM) *
Why not change the server configuration to reflect the data you have on the server? I think it is *not logical* to keep a setting lower that the size of a single row.


This is exactly what we do, _when we control the configuration_. But especially syncing between a development server and a live server on shared hosting we have no control. We executing queries in the application, we bypass this limit using: SET @@local.max_allowed_packet=20971520;

Another solution would be to allow this inside the exported script.
peterlaursen
We could add an option to define this setting from the client/connection.
However the feature is broken with recent server versions, unfortunately.

Refer to: http://bugs.mysql.com/bug.php?id=32223
What MySQL AB ends up doing about it is not yet clear.

What is this server version whre it works?

We have a few other examples that it was possible for our users to convince ISP Sysadmins to raise the setting. 16M was default before the (in my opinion) silly 1M default setting was introduced. ISPs have benn running 16M settings with 3.x and 4.0 servers for 5+ years. Maybe/Probably the ISP is not even aware of it!

Have you tried asking if they could raise the setting?

But true that connections created for data sync has no option to define user-defined 'initialisation statements' - what actually has been requested before!

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.