mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#51851: Server with SBR locks mutex twice on
LOAD DATA into partitioned MyISAM table Problem was that both partitioning and myisam used the same table_share->mutex for different protections (auto inc and repair). Solved by adding a specific mutex for the partitioning auto_increment. Also adding destroying the ha_data structure in free_table_share (which is to be propagated into 5.5). This is a 5.1 ONLY patch, already fixed in 5.5+.
This commit is contained in:
13
mysql-test/r/partition_binlog_stmt.result
Normal file
13
mysql-test/r/partition_binlog_stmt.result
Normal file
@ -0,0 +1,13 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
#
|
||||
# Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
|
||||
# partitioned MyISAM table
|
||||
CREATE TABLE t1
|
||||
(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
name TINYBLOB NOT NULL,
|
||||
modified TIMESTAMP DEFAULT '0000-00-00 00:00:00',
|
||||
INDEX namelocs (name(255))) ENGINE = MyISAM
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
LOAD DATA LOCAL INFILE 'init_file.txt'
|
||||
INTO TABLE t1 (name);
|
||||
DROP TABLE t1;
|
26
mysql-test/t/partition_binlog_stmt.test
Normal file
26
mysql-test/t/partition_binlog_stmt.test
Normal file
@ -0,0 +1,26 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
|
||||
--echo # partitioned MyISAM table
|
||||
--write_file init_file.txt
|
||||
abcd
|
||||
EOF
|
||||
|
||||
CREATE TABLE t1
|
||||
(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
name TINYBLOB NOT NULL,
|
||||
modified TIMESTAMP DEFAULT '0000-00-00 00:00:00',
|
||||
INDEX namelocs (name(255))) ENGINE = MyISAM
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
|
||||
LOAD DATA LOCAL INFILE 'init_file.txt'
|
||||
INTO TABLE t1 (name);
|
||||
|
||||
--remove_file init_file.txt
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user