#At file:///Users/mattiasj/mysql-bzr/topush-5.5-bugteam/ based on revid:jon.hauglid@stripped
3213 Mattias Jonsson 2010-10-01 [merge]
Manual merge of bug#51851 from mysql-5.1-bugteam into mysql-5.5-bugteam
modified:
mysql-test/t/partition_binlog_stmt.test
sql/table.cc
=== modified file 'mysql-test/t/partition_binlog_stmt.test'
--- a/mysql-test/t/partition_binlog_stmt.test 2010-03-30 20:52:45 +0000
+++ b/mysql-test/t/partition_binlog_stmt.test 2010-10-01 12:16:00 +0000
@@ -8,10 +8,8 @@ DROP TABLE IF EXISTS t1;
--echo #
--echo # Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
--echo # partitioned MyISAM table
-perl;
-open( INIT, ">init_file.txt");
-print INIT "abcd\n";
-close( INIT );
+--write_file init_file.txt
+abcd
EOF
CREATE TABLE t1
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2010-09-30 13:29:12 +0000
+++ b/sql/table.cc 2010-10-01 12:16:00 +0000
@@ -426,6 +426,18 @@ void TABLE_SHARE::destroy()
info_it->flags= 0;
}
}
+ if (ha_data_destroy)
+ {
+ ha_data_destroy(ha_data);
+ ha_data_destroy= NULL;
+ }
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (ha_part_data_destroy)
+ {
+ ha_part_data_destroy(ha_part_data);
+ ha_part_data_destroy= NULL;
+ }
+#endif /* WITH_PARTITION_STORAGE_ENGINE */
/*
Make a copy since the share is allocated in its own root,
and free_root() updates its argument after freeing the memory.
@@ -1704,11 +1716,17 @@ static int open_binary_frm(THD *thd, TAB
delete handler_file;
my_hash_free(&share->name_hash);
if (share->ha_data_destroy)
+ {
share->ha_data_destroy(share->ha_data);
+ share->ha_data_destroy= NULL;
+ }
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (share->ha_part_data_destroy)
+ {
share->ha_part_data_destroy(share->ha_part_data);
-#endif
+ share->ha_data_destroy= NULL;
+ }
+#endif /* WITH_PARTITION_STORAGE_ENGINE */
open_table_error(share, error, share->open_errno, errarg);
DBUG_RETURN(error);
Attachment: [text/bzr-bundle] bzr/mattias.jonsson@oracle.com-20101001121600-hbm9uphik900sw2x.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-bugteam branch (mattias.jonsson:3213) Bug#51851 | Mattias Jonsson | 1 Oct |