List:Commits« Previous MessageNext Message »
From:mattiasj Date:March 17 2008 2:56pm
Subject:bk commit into 5.1 tree (mattiasj:1.2565) BUG#32943
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mattiasj.  When mattiasj does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-03-17 15:56:53+01:00, mattiasj@witty. +2 -0
  Valgrind warnings found after bug#32943 and after merge from -main
  into -engines tree.
  
  hander::table_share was not updated after changing table->s.

  sql/ha_partition.cc@stripped, 2008-03-17 15:56:51+01:00, mattiasj@witty. +9 -0
    Valgrind warning after merge -main -> -engines, after bug#32943
    
    change_table_ptr can happen in a middle of
    alter table rename/drop/... partition
    
    the newly created partitions must get the updated table_share too.

  sql/sql_base.cc@stripped, 2008-03-17 15:56:51+01:00, mattiasj@witty. +1 -0
    Bug#32943 was missing a call to change_table_ptr, this was found by valgrind
    after a merge from -main to -engines.

diff -Nrup a/sql/ha_partition.cc b/sql/ha_partition.cc
--- a/sql/ha_partition.cc	2008-02-24 19:13:17 +01:00
+++ b/sql/ha_partition.cc	2008-03-17 15:56:51 +01:00
@@ -1646,6 +1646,15 @@ void ha_partition::change_table_ptr(TABL
   {
     (*file_array)->change_table_ptr(table_arg, share);
   } while (*(++file_array));
+  if (m_added_file && m_added_file[0])
+  {
+    /* if in middle of a drop/rename etc */
+    file_array= m_added_file;
+    do
+    {
+      (*file_array)->change_table_ptr(table_arg, share);
+    } while (*(++file_array));
+  }
 }
 
 /*
diff -Nrup a/sql/sql_base.cc b/sql/sql_base.cc
--- a/sql/sql_base.cc	2008-03-12 09:13:21 +01:00
+++ b/sql/sql_base.cc	2008-03-17 15:56:51 +01:00
@@ -747,6 +747,7 @@ void close_handle_and_leave_table_as_loc
   table->db_stat= 0;                            // Mark file closed
   release_table_share(table->s, RELEASE_NORMAL);
   table->s= share;
+  table->file->change_table_ptr(table, table->s);
 
   DBUG_VOID_RETURN;
 }
Thread
bk commit into 5.1 tree (mattiasj:1.2565) BUG#32943mattiasj17 Mar