mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
864d6bc90b
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.
28 lines
678 B
Text
28 lines
678 B
Text
--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;
|