diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2010-03-30 22:52:45 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2010-03-30 22:52:45 +0200 |
commit | 864d6bc90bc7e4a983fbc69a963b3365dbc3966f (patch) | |
tree | 8edd91e616222b12e1b2bf54c848e345d37ad590 /mysql-test/t | |
parent | 58d8bfab4f10c7f6163d23d08bf79db21016eb07 (diff) | |
download | mariadb-git-864d6bc90bc7e4a983fbc69a963b3365dbc3966f.tar.gz |
Bug#51851: Server with SBR locks mutex twice on LOAD DATA
into partitioned MyISAM table
Problem was that the ha_data structure was introduced in 5.1
and only used for partitioning first, but with the intention
of be of use for others engines as well, and when used by other
engines it would clash if it also was partitioned.
Solution is to move the partitioning specific data to a separate
structure, with its own mutex (which is used for auto_increment).
Also did rename PARTITION_INFO to PARTITION_STATS since there
already exist a class named partition_info, also cleaned up
some related variables.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/partition_binlog_stmt.test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/partition_binlog_stmt.test b/mysql-test/t/partition_binlog_stmt.test new file mode 100644 index 00000000000..bb52c2210f3 --- /dev/null +++ b/mysql-test/t/partition_binlog_stmt.test @@ -0,0 +1,28 @@ +--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 +perl; +open( INIT, ">init_file.txt"); +print INIT "abcd\n"; +close( INIT ); +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; |