-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jon Drukman wrote: > My master has two databases: channel and hardware. I'm only interested > in replicating hardware, so I set up replicate-do-db=hardware on the slaves. > > However, I am having problems because of giant LOAD DATA operations > performed nightly on channel. Replication blows up with "max packet > exceeded" errors. Due to this weird java program we have to use to load > data from our partner, I can't just make the packet size really large on > the master and slave and be done with it. I tried doing that, but the > java program freaks out if i set mysql's packet size too big for the > java heap. (I hate java so much.) So, my questions are: > > - does anyone know how to make java not care how big the mysql packet is?
Not really fixable, due to the way the MySQL protocol works, a query (including the data for LOAD DATA LOCAL INFILE) has to fit in an entire packet, the packet size needs to be sent to the server _first_, so that means the clients have to allocate all memory required for a query, plus some overhead to escape any 'special' characters...The c-based client would have problems as well (it would have to allocate just as much memory), you just wouldn't get an exception, your program would end up in swap instead. The JDBC client only grows the packet to max_allowed_packet if it needs to. The one case where it probably doesn't need to is for LOAD DATA LOCAL INFILE....The C-library implementation of LOAD DATA LOCAL INFILE _does_ use max_allowed_packet sized packets to send the file from client - -> server. Are you using LOAD DATA LOCAL INFILE with JDBC? If so, check out a nightly build of Connector/J 3.1.x from http://downloads.mysql.com/snapshots.php ... It has a change to it where it will use the smaller of 1MB or max_allowed_packet for LOAD DATA LOCAL INFILE operations (this still works, it's just not the 'normal' way the client library works). -Mark - -- Mark Matthews MySQL AB, Software Development Manager - Client Connectivity Office: +1 708 332 0507 www.mysql.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBpTKctvXNTca6JD8RArT9AJ4/gvtsg3u9449Kk8y7N62zglfZOQCgrcXq Ga820/B6m+joEVsKueFf/18= =UHTi -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]