List:Commits« Previous MessageNext Message »
From:holyfoot Date:June 1 2007 4:00pm
Subject:bk commit into 5.1 tree (holyfoot:1.2535) BUG#28477
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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, 2007-06-01 19:00:22+05:00, holyfoot@stripped +1 -0
  Bug #28477 innodb assertion and crash during alter table to add/drop partition.
  
  The bug was repeated on MyISAM tables, so isn't InnoDB specific.
  Reason of the bug is that partition-related members of TABLE_SHARE
  wasn't properly updated after ALTER command. So if other thread doesn't
  reread frm file, and just uses cached SHARE, it uses wrong data

  sql/sql_table.cc@stripped, 2007-06-01 19:00:20+05:00, holyfoot@stripped +4 -1
    Bug #28477 innodb assertion and crash during alter table to add/drop partition.
    
    keep share members updated after table modification

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	holyfoot
# Host:	hfmain.(none)
# Root:	/home/hf/work/28477/my51-28477

--- 1.418/sql/sql_table.cc	2007-06-01 19:00:26 +05:00
+++ 1.419/sql/sql_table.cc	2007-06-01 19:00:26 +05:00
@@ -1329,6 +1329,7 @@ bool mysql_write_frm(ALTER_PARTITION_PAR
 
       if (part_info)
       {
+        TABLE_SHARE *share= lpt->table->s;
         if (!(part_syntax_buf= generate_partition_syntax(part_info,
                                                          &syntax_len,
                                                          TRUE, TRUE)))
@@ -1336,7 +1337,9 @@ bool mysql_write_frm(ALTER_PARTITION_PAR
           DBUG_RETURN(TRUE);
         }
         part_info->part_info_string= part_syntax_buf;
-        part_info->part_info_len= syntax_len;
+        share->partition_info_len= part_info->part_info_len= syntax_len;
+        share->partition_info= memdup_root(&share->mem_root,
+                                            part_syntax_buf, syntax_len+1);
       }
     }
 #endif
Thread
bk commit into 5.1 tree (holyfoot:1.2535) BUG#28477holyfoot1 Jun