List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:January 11 2011 3:36pm
Subject:bzr push into mysql-5.1 branch (Dmitry.Shulga:3541 to 3542) Bug#58887
View as plain text  
 3542 Dmitry Shulga	2011-01-11
      Fixed Bug#58887	- server not throwing "Packet too large" error
      if max_allowed_packet >= 16M.
      
      This bug was introduced by patch for bug#42503.
      
      This patch restores behaviour that there was before patch
      for bug#42503 was applied.
     @ sql/net_serv.cc
        Restored original right condition.

    modified:
      sql/net_serv.cc
 3541 Davi Arnaut	2011-01-11
      Bug#42054: SELECT CURDATE() is returning bad value
      
      The problem from a user point of view was that on Solaris the
      time related functions (e.g. NOW(), SYSDATE(), etc) would always
      return a fixed time.
      
      This bug was happening due to a logic in the time retrieving
      wrapper function which would only call the time() function every
      half second. This interval between calls would be calculated
      using the gethrtime() and the logic relied on the fact that time
      returned by it is monotonic.
      
      Unfortunately, due to bugs in the gethrtime() implementation,
      there are some cases where the time returned by it can drift
      (See Solaris bug id 6600939), potentially causing the interval
      calculation logic to fail.
      
      The solution is to retrieve the correct time whenever a drift in
      the time returned by gethrtime() is detected. That is, do not
      use the cached time whenever the values (previous and current)
      returned by gethrtime() are not monotonically increasing.
     @ mysys/my_getsystime.c
        Do not used the cached time if gethrtime is not monotonic.

    modified:
      mysys/my_getsystime.c
=== modified file 'sql/net_serv.cc'
--- a/sql/net_serv.cc	2010-12-28 23:47:05 +0000
+++ b/sql/net_serv.cc	2011-01-11 15:18:25 +0000
@@ -170,17 +170,7 @@ my_bool net_realloc(NET *net, size_t len
   DBUG_ENTER("net_realloc");
   DBUG_PRINT("enter",("length: %lu", (ulong) length));
 
-  /*
-    When compression is off, net->where_b is always 0.
-    With compression turned on, net->where_b may indicate
-    that we still have a piece of the previous logical
-    packet in the buffer, unprocessed. Take it into account
-    when checking that max_allowed_packet is not exceeded.
-    This ensures that the client treats max_allowed_packet
-    limit identically, regardless of compression being on
-    or off.
-  */
-  if (length >= (net->max_packet_size + net->where_b))
+  if (length >= net->max_packet_size)
   {
     DBUG_PRINT("error", ("Packet too large. Max size: %lu",
                          net->max_packet_size));


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20110111151825-d376jh0jefmsdslw.bundle
Thread
bzr push into mysql-5.1 branch (Dmitry.Shulga:3541 to 3542) Bug#58887Dmitry Shulga11 Jan