summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorVasil Dimov <vasil.dimov@oracle.com>2010-05-27 12:47:57 +0300
committerVasil Dimov <vasil.dimov@oracle.com>2010-05-27 12:47:57 +0300
commit96c47c4df1edfa7e51e51044150d85c5a1758af1 (patch)
tree2589cf05b7b91380340406f180c301c410386242 /mysql-test
parent0efa64d44027590d969ff5011e857a89db73ca47 (diff)
parent2857b55a463a288753f2b860b7bfb9bf538d00ed (diff)
downloadmariadb-git-96c47c4df1edfa7e51e51044150d85c5a1758af1.tar.gz
Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(skipping the change to storage/innobase/os/os0file.c because that issue has already been addressed in mysql-trunk-innodb)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/information_schema_part.result14
-rw-r--r--mysql-test/r/partition.result42
-rw-r--r--mysql-test/r/partition_binlog_stmt.result13
-rw-r--r--mysql-test/r/partition_column.result114
-rw-r--r--mysql-test/r/partition_error.result70
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result2
-rw-r--r--mysql-test/t/partition.test22
-rw-r--r--mysql-test/t/partition_binlog_stmt.test28
-rw-r--r--mysql-test/t/partition_column.test26
-rw-r--r--mysql-test/t/partition_error.test35
10 files changed, 320 insertions, 46 deletions
diff --git a/mysql-test/r/information_schema_part.result b/mysql-test/r/information_schema_part.result
index 11c57ceb2c2..b34183ebdee 100644
--- a/mysql-test/r/information_schema_part.result
+++ b/mysql-test/r/information_schema_part.result
@@ -37,9 +37,9 @@ partitions 3;
select * from information_schema.partitions where table_schema="test"
and table_name="t4";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
-def test t4 p0 NULL 1 NULL KEY NULL f1,f2 NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
-def test t4 p1 NULL 2 NULL KEY NULL f1,f2 NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
-def test t4 p2 NULL 3 NULL KEY NULL f1,f2 NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t4 p0 NULL 1 NULL KEY NULL `f1`,`f2` NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t4 p1 NULL 2 NULL KEY NULL `f1`,`f2` NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t4 p2 NULL 3 NULL KEY NULL `f1`,`f2` NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
drop table t1,t2,t3,t4;
create table t1 (a int not null,b int not null,c int not null,primary key (a,b))
partition by range (a)
@@ -67,10 +67,10 @@ def test t1 x1 x11 1 1 RANGE HASH a a+b 1 0 0 0 # 1024 0 # # NULL NULL default
def test t1 x1 x12 1 2 RANGE HASH a a+b 1 0 0 0 # 1024 0 # # NULL NULL default t2
def test t1 x2 x21 2 1 RANGE HASH a a+b 5 0 0 0 # 1024 0 # # NULL NULL default t1
def test t1 x2 x22 2 2 RANGE HASH a a+b 5 0 0 0 # 1024 0 # # NULL NULL default t2
-def test t2 x1 x11 1 1 RANGE KEY a a 1 0 0 0 # 1024 0 # # NULL NULL default t1
-def test t2 x1 x12 1 2 RANGE KEY a a 1 0 0 0 # 1024 0 # # NULL NULL default t2
-def test t2 x2 x21 2 1 RANGE KEY a a 5 0 0 0 # 1024 0 # # NULL NULL default t1
-def test t2 x2 x22 2 2 RANGE KEY a a 5 0 0 0 # 1024 0 # # NULL NULL default t2
+def test t2 x1 x11 1 1 RANGE KEY a `a` 1 0 0 0 # 1024 0 # # NULL NULL default t1
+def test t2 x1 x12 1 2 RANGE KEY a `a` 1 0 0 0 # 1024 0 # # NULL NULL default t2
+def test t2 x2 x21 2 1 RANGE KEY a `a` 5 0 0 0 # 1024 0 # # NULL NULL default t1
+def test t2 x2 x22 2 2 RANGE KEY a `a` 5 0 0 0 # 1024 0 # # NULL NULL default t2
drop table t1,t2;
create table t1 (
a int not null,
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 77c1778fc55..66f8ac68dfe 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1,4 +1,46 @@
drop table if exists t1, t2;
+# Bug#39338: Fieldnames in
+# INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION become unescaped
+# NOTE: the partition expression is saved as a string, so changing from
+# normal quotes to ansi quotes does not change the expression, only
+# for partition by KEY.
+CREATE TABLE t1 (
+ID int(11) NOT NULL,
+`aaaa,aaaaa` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
+ddddddddd int(11) NOT NULL DEFAULT '0',
+new_field0 varchar(50),
+PRIMARY KEY(ID, `aaaa,aaaaa`, ddddddddd))
+PARTITION BY RANGE(ID)
+PARTITIONS 3
+SUBPARTITION BY LINEAR KEY(ID,`aaaa,aaaaa`)
+SUBPARTITIONS 2 (
+PARTITION p01 VALUES LESS THAN(100),
+PARTITION p11 VALUES LESS THAN(200),
+PARTITION p21 VALUES LESS THAN MAXVALUE);
+SELECT PARTITION_EXPRESSION, SUBPARTITION_EXPRESSION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+PARTITION_EXPRESSION SUBPARTITION_EXPRESSION
+ID `ID`,`aaaa,aaaaa`
+ID `ID`,`aaaa,aaaaa`
+ID `ID`,`aaaa,aaaaa`
+ID `ID`,`aaaa,aaaaa`
+ID `ID`,`aaaa,aaaaa`
+ID `ID`,`aaaa,aaaaa`
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `ID` int(11) NOT NULL,
+ `aaaa,aaaaa` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `ddddddddd` int(11) NOT NULL DEFAULT '0',
+ `new_field0` varchar(50) DEFAULT NULL,
+ PRIMARY KEY (`ID`,`aaaa,aaaaa`,`ddddddddd`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (ID)
+SUBPARTITION BY LINEAR KEY (ID,`aaaa,aaaaa`)
+SUBPARTITIONS 2
+(PARTITION p01 VALUES LESS THAN (100) ENGINE = MyISAM,
+ PARTITION p11 VALUES LESS THAN (200) ENGINE = MyISAM,
+ PARTITION p21 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+drop table t1;
CREATE TABLE t1 (a INT, b INT)
PARTITION BY LIST (a)
SUBPARTITION BY HASH (b)
diff --git a/mysql-test/r/partition_binlog_stmt.result b/mysql-test/r/partition_binlog_stmt.result
new file mode 100644
index 00000000000..9be23636ca6
--- /dev/null
+++ b/mysql-test/r/partition_binlog_stmt.result
@@ -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;
diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result
index 458343a6b92..7b45ffcb0de 100644
--- a/mysql-test/r/partition_column.result
+++ b/mysql-test/r/partition_column.result
@@ -1,4 +1,44 @@
drop table if exists t1;
+#
+# Bug#52815: LIST COLUMNS doesn't insert rows in correct partition
+# if muliple columns used
+CREATE TABLE t1 (
+id INT NOT NULL,
+name VARCHAR(255),
+department VARCHAR(10),
+country VARCHAR(255)
+) PARTITION BY LIST COLUMNS (department, country) (
+PARTITION first_office VALUES IN (('dep1', 'Russia'), ('dep1', 'Croatia')),
+PARTITION second_office VALUES IN (('dep2', 'Russia'))
+);
+INSERT INTO t1 VALUES(1, 'Ann', 'dep1', 'Russia');
+INSERT INTO t1 VALUES(2, 'Bob', 'dep1', 'Croatia');
+INSERT INTO t1 VALUES(3, 'Cecil', 'dep2', 'Russia');
+INSERT INTO t1 VALUES(3, 'Dan', 'dep2', 'Croatia');
+ERROR HY000: Table has no partition for value from column_list
+SELECT PARTITION_NAME,TABLE_ROWS
+FROM INFORMATION_SCHEMA.PARTITIONS
+WHERE TABLE_NAME = 't1';
+PARTITION_NAME TABLE_ROWS
+first_office 2
+second_office 1
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `name` varchar(255) DEFAULT NULL,
+ `department` varchar(10) DEFAULT NULL,
+ `country` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(department,country)
+(PARTITION first_office VALUES IN (('dep1','Russia'),('dep1','Croatia')) ENGINE = MyISAM,
+ PARTITION second_office VALUES IN (('dep2','Russia')) ENGINE = MyISAM) */
+SELECT * FROM t1 WHERE department = 'dep2' and country = 'Croatia';
+id name department country
+SELECT * FROM t1 WHERE department = 'dep1' and country = 'Croatia';
+id name department country
+2 Bob dep1 Croatia
+DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL)
PARTITION BY RANGE COLUMNS (a)
(PARTITION p0 VALUES LESS THAN (0));
@@ -168,22 +208,22 @@ partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description
-RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
-RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
-RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
-RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
-RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
-RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
-RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
-RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
-RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
-RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'0',MAXVALUE,'1900-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'0',MAXVALUE,'1900-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'0',MAXVALUE,'1900-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'0',MAXVALUE,'1900-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'a',MAXVALUE,'1999-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'a',MAXVALUE,'1999-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'a',MAXVALUE,'1999-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'a',MAXVALUE,'1999-01-01'
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'b',MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'b',MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'b',MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,'b',MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,MAXVALUE,MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,MAXVALUE,MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,MAXVALUE,MAXVALUE,MAXVALUE
+RANGE COLUMNS `a`,`b`,`c`,`d` 1,MAXVALUE,MAXVALUE,MAXVALUE
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -266,9 +306,9 @@ partition p2 values in ((3, NULL), (NULL, 1)));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description
-LIST COLUMNS a,b (1,NULL),(2,NULL),(NULL,NULL)
-LIST COLUMNS a,b (1,1),(2,2)
-LIST COLUMNS a,b (3,NULL),(NULL,1)
+LIST COLUMNS `a`,`b` (1,NULL),(2,NULL),(NULL,NULL)
+LIST COLUMNS `a`,`b` (1,1),(2,2)
+LIST COLUMNS `a`,`b` (3,NULL),(NULL,1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -298,11 +338,11 @@ select * from t1 where a > 8;
a b
select * from t1 where a not between 8 and 8;
a b
+1 NULL
2 NULL
+1 1
2 2
3 NULL
-1 NULL
-1 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -356,8 +396,8 @@ partition p1 values in (4, NULL, 3));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description
-LIST COLUMNS a 2,1
-LIST COLUMNS a 4,NULL,3
+LIST COLUMNS `a` 2,1
+LIST COLUMNS `a` 4,NULL,3
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -393,18 +433,18 @@ partition p3 values less than (4,'abc','abc'));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description
-RANGE COLUMNS a,b,c 1,'abc','abc'
-RANGE COLUMNS a,b,c 1,'abc','abc'
-RANGE COLUMNS a,b,c 1,'abc','abc'
-RANGE COLUMNS a,b,c 2,'abc','abc'
-RANGE COLUMNS a,b,c 2,'abc','abc'
-RANGE COLUMNS a,b,c 2,'abc','abc'
-RANGE COLUMNS a,b,c 3,'abc','abc'
-RANGE COLUMNS a,b,c 3,'abc','abc'
-RANGE COLUMNS a,b,c 3,'abc','abc'
-RANGE COLUMNS a,b,c 4,'abc','abc'
-RANGE COLUMNS a,b,c 4,'abc','abc'
-RANGE COLUMNS a,b,c 4,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 1,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 1,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 1,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 2,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 2,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 2,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 3,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 3,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 3,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 4,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 4,'abc','abc'
+RANGE COLUMNS `a`,`b`,`c` 4,'abc','abc'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -437,8 +477,8 @@ partition p1 values less than (1, 'B', 1));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description
-RANGE COLUMNS a,b,c 1,'A',1
-RANGE COLUMNS a,b,c 1,'B',1
+RANGE COLUMNS `a`,`b`,`c` 1,'A',1
+RANGE COLUMNS `a`,`b`,`c` 1,'B',1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index ce304b136d0..6c7b7127975 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1,5 +1,75 @@
drop table if exists t1;
#
+# Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
+# subpartitions
+SET @org_mode=@@sql_mode;
+SET @@sql_mode='NO_DIR_IN_CREATE';
+SELECT @@sql_mode;
+@@sql_mode
+NO_DIR_IN_CREATE
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+DATA DIRECTORY = '/tmp/not-existing'
+INDEX DIRECTORY = '/tmp/not-existing');
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) DEFAULT NULL,
+ `purchased` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (YEAR(purchased))
+SUBPARTITION BY HASH (TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+DROP TABLE t1;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+(SUBPARTITION sp0
+DATA DIRECTORY = '/tmp/not-existing'
+INDEX DIRECTORY = '/tmp/not-existing',
+SUBPARTITION sp1));
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) DEFAULT NULL,
+ `purchased` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (YEAR(purchased))
+SUBPARTITION BY HASH (TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION sp0 ENGINE = MyISAM,
+ SUBPARTITION sp1 ENGINE = MyISAM)) */
+DROP TABLE t1;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+DATA DIRECTORY = '/tmp/not-existing'
+INDEX DIRECTORY = '/tmp/not-existing');
+Warnings:
+Warning 1618 <DATA DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) DEFAULT NULL,
+ `purchased` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (YEAR(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+DROP TABLE t1;
+SET @@sql_mode= @org_mode;
+#
# Bug#50392: insert_id is not reset for partitioned tables
# auto_increment on duplicate entry
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 448aaa7400f..73dc1178a54 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -8,12 +8,12 @@ wait/synch/mutex/sql/Cversion_lock YES YES
wait/synch/mutex/sql/Delayed_insert::mutex YES YES
wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state YES YES
wait/synch/mutex/sql/hash_filo::lock YES YES
+wait/synch/mutex/sql/HA_DATA_PARTITION::LOCK_auto_inc YES YES
wait/synch/mutex/sql/LOCK_active_mi YES YES
wait/synch/mutex/sql/LOCK_audit_mask YES YES
wait/synch/mutex/sql/LOCK_connection_count YES YES
wait/synch/mutex/sql/LOCK_crypt YES YES
wait/synch/mutex/sql/LOCK_delayed_create YES YES
-wait/synch/mutex/sql/LOCK_delayed_insert YES YES
select * from performance_schema.SETUP_INSTRUMENTS
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 4b7be00148f..bcb5d4b5d92 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -14,6 +14,28 @@
drop table if exists t1, t2;
--enable_warnings
+--echo # Bug#39338: Fieldnames in
+--echo # INFORMATIONSCHEMA.PARTITIONS.PARTITION_EXPRESSION become unescaped
+--echo # NOTE: the partition expression is saved as a string, so changing from
+--echo # normal quotes to ansi quotes does not change the expression, only
+--echo # for partition by KEY.
+CREATE TABLE t1 (
+ ID int(11) NOT NULL,
+ `aaaa,aaaaa` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
+ ddddddddd int(11) NOT NULL DEFAULT '0',
+ new_field0 varchar(50),
+ PRIMARY KEY(ID, `aaaa,aaaaa`, ddddddddd))
+PARTITION BY RANGE(ID)
+PARTITIONS 3
+SUBPARTITION BY LINEAR KEY(ID,`aaaa,aaaaa`)
+SUBPARTITIONS 2 (
+ PARTITION p01 VALUES LESS THAN(100),
+ PARTITION p11 VALUES LESS THAN(200),
+ PARTITION p21 VALUES LESS THAN MAXVALUE);
+SELECT PARTITION_EXPRESSION, SUBPARTITION_EXPRESSION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1';
+show create table t1;
+drop table t1;
+
#
# Bug#48276: can't add column if subpartition exists
CREATE TABLE t1 (a INT, b INT)
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;
diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test
index d1d2d666a39..95a2be36395 100644
--- a/mysql-test/t/partition_column.test
+++ b/mysql-test/t/partition_column.test
@@ -8,6 +8,32 @@
drop table if exists t1;
--enable_warnings
+--echo #
+--echo # Bug#52815: LIST COLUMNS doesn't insert rows in correct partition
+--echo # if muliple columns used
+CREATE TABLE t1 (
+id INT NOT NULL,
+name VARCHAR(255),
+department VARCHAR(10),
+country VARCHAR(255)
+) PARTITION BY LIST COLUMNS (department, country) (
+PARTITION first_office VALUES IN (('dep1', 'Russia'), ('dep1', 'Croatia')),
+PARTITION second_office VALUES IN (('dep2', 'Russia'))
+);
+
+INSERT INTO t1 VALUES(1, 'Ann', 'dep1', 'Russia');
+INSERT INTO t1 VALUES(2, 'Bob', 'dep1', 'Croatia');
+INSERT INTO t1 VALUES(3, 'Cecil', 'dep2', 'Russia');
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+INSERT INTO t1 VALUES(3, 'Dan', 'dep2', 'Croatia');
+SELECT PARTITION_NAME,TABLE_ROWS
+FROM INFORMATION_SCHEMA.PARTITIONS
+WHERE TABLE_NAME = 't1';
+SHOW CREATE TABLE t1;
+SELECT * FROM t1 WHERE department = 'dep2' and country = 'Croatia';
+SELECT * FROM t1 WHERE department = 'dep1' and country = 'Croatia';
+DROP TABLE t1;
+
#
# Bug#51347: assertion with show create table + partition by columns
# on decimal column
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index bfa1206fe2d..d1b152c8799 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -7,7 +7,40 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-
+
+--echo #
+--echo # Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
+--echo # subpartitions
+SET @org_mode=@@sql_mode;
+SET @@sql_mode='NO_DIR_IN_CREATE';
+SELECT @@sql_mode;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ DATA DIRECTORY = '/tmp/not-existing'
+ INDEX DIRECTORY = '/tmp/not-existing');
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION sp0
+ DATA DIRECTORY = '/tmp/not-existing'
+ INDEX DIRECTORY = '/tmp/not-existing',
+ SUBPARTITION sp1));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE(YEAR(purchased))
+(PARTITION p0 VALUES LESS THAN MAXVALUE
+ DATA DIRECTORY = '/tmp/not-existing'
+ INDEX DIRECTORY = '/tmp/not-existing');
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET @@sql_mode= @org_mode;
+
--echo #
--echo # Bug#50392: insert_id is not reset for partitioned tables
--echo # auto_increment on duplicate entry