title: Not Getting "Packet Too Large" Error With Huge Packets
body: <p>My situation is pretty straight forward.</p>
  
  <p>I have a server configured with max_allowed_packet set to 16M. It's running Percona Server 5.1.52.</p>
  
  <p>I wrote a simple script in perl to do huge bulk inserts. I know roughly the size the packets are going to be by knowing how big the data string I'm sending through DBI is.</p>
  
  <p>No matter what size the bulk insert MySQL seems to accept the packet and do the insert, but I'm expecting it to give me a Packet Too Large error for anything over 16M.</p>
  
  <p>Here's where it gets really weird...</p>
  
  <p>If I set the max_allowed_packet to 16777215 (one byte less that 16M) or anything lower I get the error for packets over that size and obviously don't get the error for packets under that size.</p>
  
  <p>So, it appears as if at anything below 16M the packet limit is obeyed, but 16M or greater and it's completely ignored.</p>
  
  <p>Any thoughts as to what could be causing this? It's really bizarre and the opposite problem most people have with max_allowed_packet.</p>
  
  <p>Is it possible that the mysql client could be doing some auto-chunking? The server only appears to be running one big query, so auto-chunking seems really unlikely since it'd probably show up as more than one insert.</p>
  
  <p>Any variables I could check to get more information about what's going on?</p>