List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:February 24 2012 9:45am
Subject:bzr push into mysql-trunk-wl3584 branch (alfranio.correia:3668 to 3669)
View as plain text  
 3669 Alfranio Correia	2012-02-24 [merge]
      merge mysql-trunk --> mysql-trunk-wl3584 (local)

    modified:
      mysql-test/t/disabled.def
      sql/events.cc
      sql/sql_test.cc
 3668 Alfranio Correia	2012-02-23
      BUG#13738296 - INSUFFICIENT SIZE OF MAX_ALLOWED_PACKET ON MASTER CAUSING SLAVE TO FAILED ON WIN
      
      Transactions' changes are gathered in caches which upon commit are
      written to the binary log. This cache however does not support seek
      operations and an attempt to issue a seek operation against it may
      corrupt the binary log.
      
      This happens when the content of the cache does not fit in-memory
      and a swap are is used. In this case, when a seek is issued the
      content of the swap are is not read back to memory so that any
      attempt to write the in-memory part back to the swap are will
      write garbage into it.
      
      In the WL#3584, we used a seek to reposition the cursor on the file
      and rewrite the GTID thus leading to a corrupted binary log.
      
      To fix the problem, we flush the in-memory part of the cache to the
      swap area, call reinit_io_cache to reposition the cursor and read
      the correct content back to memory, update the gtid and flush the
      memory back to disk. This solution though has a performance drawback
      as a flush to the swap area is required even when there is enough
      memory to accommodate all transaction's changes.

    modified:
      sql/binlog.cc
=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2012-02-23 13:10:18 +0000
+++ b/mysql-test/t/disabled.def	2012-02-24 09:28:02 +0000
@@ -14,4 +14,3 @@ read_many_rows_innodb    : Bug#11748886
 sum_distinct-big         : Bug#11764126 2010-11-15 mattiasj was not tested
 archive-big              : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc
 log_tables-big           : Bug#11756699 2010-11-15 mattiasj report already exists
-events_restart @windows  : Bug#11748899 2012-02-23 hemant The test started failing on windows after the fix for bug#11748899 and followup patch didnot work.

=== modified file 'sql/events.cc'
--- a/sql/events.cc	2012-02-09 14:56:44 +0000
+++ b/sql/events.cc	2012-02-24 06:32:57 +0000
@@ -1117,7 +1117,7 @@ Events::load_events_from_db(THD *thd)
   while (!(read_record_info.read_record(&read_record_info)))
   {
     Event_queue_element *et;
-    bool created;
+    bool created, dropped;
 
     if (!(et= new Event_queue_element))
       goto end;
@@ -1133,6 +1133,12 @@ Events::load_events_from_db(THD *thd)
       goto end;
     }
 
+    /**
+      Since the Event_queue_element object could be deleted inside
+      Event_queue::create_event we should save the value of dropped flag
+      into the temporary variable.
+    */
+    dropped= et->dropped;
     if (event_queue->create_event(thd, et, &created))
     {
       /* Out of memory */
@@ -1141,7 +1147,7 @@ Events::load_events_from_db(THD *thd)
     }
     if (created)
       count++;
-    else if (et->dropped)
+    else if (dropped)
     {
       /*
         If not created, a stale event - drop if immediately if

=== modified file 'sql/sql_test.cc'
--- a/sql/sql_test.cc	2012-02-15 13:57:17 +0000
+++ b/sql/sql_test.cc	2012-02-24 06:43:23 +0000
@@ -572,7 +572,6 @@ Next alarm time: %lu\n",
 	 alarm_info.next_alarm_time);
 #endif
   display_table_locks();
-  fflush(stdout);
 #ifdef HAVE_MALLINFO
   struct mallinfo info= mallinfo();
   printf("\nMemory status:\n\
@@ -604,6 +603,7 @@ Estimated memory (with thread stack):
   Events::dump_internal_status();
 #endif
   puts("");
+  fflush(stdout);
 }
 
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl3584 branch (alfranio.correia:3668 to 3669) Alfranio Correia24 Feb