diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-10-31 08:46:37 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-10-31 08:46:37 +0200 |
commit | d6ee7ab1a1cec0143e66f3ac75d8cee7c60f69b0 (patch) | |
tree | 3db0ed5372812c7eaa6754db689f1baa6418c572 /mysql-test | |
parent | b0fe082b365d989fcf905e5c40c3fe60fd756858 (diff) | |
parent | a737135ae39dafe8b1136386ce23dfa8bed877f9 (diff) | |
download | mariadb-git-d6ee7ab1a1cec0143e66f3ac75d8cee7c60f69b0.tar.gz |
Merge remote-tracking branch 'origin/10.0' into bb-10.0-galera
Diffstat (limited to 'mysql-test')
67 files changed, 1734 insertions, 130 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_foreign_key.test b/mysql-test/extra/rpl_tests/rpl_foreign_key.test deleted file mode 100644 index db646a736f9..00000000000 --- a/mysql-test/extra/rpl_tests/rpl_foreign_key.test +++ /dev/null @@ -1,62 +0,0 @@ -# Check the replication of the FOREIGN_KEY_CHECKS variable. - --- source include/master-slave.inc - -eval CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=$engine_type; -eval CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=$engine_type; - -SET FOREIGN_KEY_CHECKS=0; -INSERT INTO t1 VALUES (10); -INSERT INTO t1 VALUES (NULL),(NULL),(NULL); -INSERT INTO t2 VALUES (5,0); -INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); -SET FOREIGN_KEY_CHECKS=1; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY b; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY b; - -connection master; -SET TIMESTAMP=1000000000; -CREATE TABLE t3 ( a INT UNIQUE ); -SET FOREIGN_KEY_CHECKS=0; -# Had to add 1022 for run with ndb as ndb uses different -# error and error code for error ER_DUP_ENTRY. Bug 16677 ---error 1022, ER_DUP_ENTRY -INSERT INTO t3 VALUES (1),(1); -sync_slave_with_master; - -connection master; -SET FOREIGN_KEY_CHECKS=0; -DROP TABLE IF EXISTS t1,t2,t3; -SET FOREIGN_KEY_CHECKS=1; -sync_slave_with_master; - -# -# Bug #32468 delete rows event on a table with foreign key constraint fails -# - -connection master; - -eval create table t1 (b int primary key) engine = $engine_type; -eval create table t2 (a int primary key, b int, foreign key (b) references t1(b)) - engine = $engine_type; - -insert into t1 set b=1; -insert into t2 set a=1, b=1; - -set foreign_key_checks=0; -delete from t1; - ---echo must sync w/o a problem (could not with the buggy code) -sync_slave_with_master; -select count(*) from t1 /* must be zero */; - - -# cleanup for bug#32468 - -connection master; -drop table t2,t1; - ---source include/rpl_end.inc diff --git a/mysql-test/include/have_32bit.inc b/mysql-test/include/have_32bit.inc new file mode 100644 index 00000000000..d62093d8be4 --- /dev/null +++ b/mysql-test/include/have_32bit.inc @@ -0,0 +1,9 @@ +disable_query_log; +disable_warnings; +let $VERSION_COMPILE_64BIT= + `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +enable_warnings; +enable_query_log; +if ($VERSION_COMPILE_64BIT) { + skip Need a 32 bit machine/binary; +} diff --git a/mysql-test/include/have_64bit.inc b/mysql-test/include/have_64bit.inc new file mode 100644 index 00000000000..38c11156a53 --- /dev/null +++ b/mysql-test/include/have_64bit.inc @@ -0,0 +1,9 @@ +disable_query_log; +disable_warnings; +let $VERSION_COMPILE_64BIT= + `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +enable_warnings; +enable_query_log; +if (!$VERSION_COMPILE_64BIT) { + skip Need a 64 bit machine/binary; +} diff --git a/mysql-test/include/maybe_debug.combinations b/mysql-test/include/maybe_debug.combinations new file mode 100644 index 00000000000..5ee57c0bfd8 --- /dev/null +++ b/mysql-test/include/maybe_debug.combinations @@ -0,0 +1,5 @@ +[debug] +--enable-gdb + +[release] +--disable-gdb diff --git a/mysql-test/include/maybe_debug.inc b/mysql-test/include/maybe_debug.inc new file mode 100644 index 00000000000..2f6c2848f9f --- /dev/null +++ b/mysql-test/include/maybe_debug.inc @@ -0,0 +1,3 @@ +# include file for test files that can be run with and without debug +# having debug and non-debug tests. +let $have_debug=`select version() like '%debug%'`; diff --git a/mysql-test/r/contributors.result b/mysql-test/r/contributors.result index 36d033f4cb3..3e4bf5f0d43 100644 --- a/mysql-test/r/contributors.result +++ b/mysql-test/r/contributors.result @@ -8,12 +8,14 @@ MariaDB Corporation https://mariadb.com Founding member, Platinum Sponsor of the Visma https://visma.com Gold Sponsor of the MariaDB Foundation DBS https://dbs.com Gold Sponsor of the MariaDB Foundation IBM https://www.ibm.com Gold Sponsor of the MariaDB Foundation +Tencent Games http://game.qq.com/ Gold Sponsor of the MariaDB Foundation Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation -Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation +Acronis https://www.acronis.com Silver Sponsor of the MariaDB Foundation Verkkokauppa.com https://www.verkkokauppa.com Bronze Sponsor of the MariaDB Foundation Virtuozzo https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation Tencent Game DBA http://tencentdba.com/about Bronze Sponsor of the MariaDB Foundation Tencent TDSQL http://tdsql.org Bronze Sponsor of the MariaDB Foundation +Percona https://www.percona.com/ Bronze Sponsor of the MariaDB Foundation Google USA Sponsoring encryption, parallel replication and GTID Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction diff --git a/mysql-test/r/create_or_replace.result b/mysql-test/r/create_or_replace.result index 0d171f9f87a..85602462de5 100644 --- a/mysql-test/r/create_or_replace.result +++ b/mysql-test/r/create_or_replace.result @@ -473,3 +473,38 @@ ERROR HY000: Table 't1' was not locked with LOCK TABLES UNLOCK TABLES; DROP FUNCTION f1; DROP TABLE t1; +# +# MDEV-14410 - Assertion `table->pos_in_locked_tables == __null || +# table->pos_in_locked_tables->table == table' failed in +# mark_used_tables_as_free_for_reuse +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +CREATE TABLE t3 (c INT); +CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t1 VALUES (); +CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW INSERT INTO t3 SELECT * FROM t1; +LOCK TABLE t1 WRITE, t2 WRITE; +CREATE OR REPLACE TABLE t1 (i INT); +UNLOCK TABLES; +INSERT INTO t2 VALUES (1); +DROP TABLE t1, t2, t3; +# +# MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in +# Locked_tables_list::unlock_locked_tables +# +CREATE TEMPORARY TABLE t1(a INT) ENGINE=InnoDB; +CREATE TEMPORARY TABLE t2(a INT); +CREATE TABLE t3(a INT); +LOCK TABLE t2 WRITE; +SELECT * FROM t2; +a +CREATE OR REPLACE TEMPORARY TABLE t1(c INT DEFAULT ''); +ERROR 42000: Invalid default value for 'c' +SELECT * FROM t3; +ERROR HY000: Table 't3' was not locked with LOCK TABLES +CREATE OR REPLACE TEMPORARY TABLE t2(c INT DEFAULT ''); +ERROR 42000: Invalid default value for 'c' +SELECT * FROM t3; +ERROR HY000: Table 't3' was not locked with LOCK TABLES +UNLOCK TABLES; +DROP TABLE t3; diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 02809f3be22..9d561ee0b11 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -13571,5 +13571,26 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe')) DROP TABLE t1; # +# MDEV-17064 LIKE function has error behavior on the fields in which the collation is xxx_unicode_xx +# +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +name +radio! test +ALTER TABLE t1 CHANGE COLUMN name name VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +name +radio! test +DROP TABLE t1; +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT name LIKE '%!!%' ESCAPE '!' AS c1, +name LIKE '%!!%' COLLATE utf8_general_ci ESCAPE '!' AS c2 +FROM t1; +c1 c2 +1 1 +DROP TABLE t1; +# # End of MariaDB-10.0 tests # diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result index 9ab6f74653e..acde1be051b 100644 --- a/mysql-test/r/func_concat.result +++ b/mysql-test/r/func_concat.result @@ -268,3 +268,23 @@ SET optimizer_switch=@save_optimizer_switch; SELECT UNHEX(CONCAT('414C2', HEX(8 + ROUND(RAND()*7)), SUBSTR(SHA(UUID()),6,33),HEX(2+ROUND(RAND()*8)))) IS NULL AS c1; c1 0 +# +# MDEV-13119 Wrong results with CAST(AS CHAR) and subquery +# +SET optimizer_switch=_utf8'derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CAST(t AS CHAR CHARACTER SET utf8) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# MDEV-13120 Wrong results with MAKE_SET() and subquery +# +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub; +c2 +abcdefghi,abcdefghi-abcdefghi,abcdefghi +DROP TABLE t1; diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index f77cd4d14bf..fc69c13516f 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1659,5 +1659,21 @@ c2 DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; # +# MDEV-16995: ER_CANT_CREATE_GEOMETRY_OBJECT encountered for a query with +# optimizer_use_condition_selectivity>=3 +# +CREATE TABLE t1 (a POINT); +INSERT INTO t1 VALUES (POINT(1,1)),(POINT(1,2)),(POINT(1,3)); +set @save_use_stat_tables= @@use_stat_tables; +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @@use_stat_tables= PREFERABLY; +set @@optimizer_use_condition_selectivity=3; +SELECT COUNT(*) FROM t1 WHERE a IN ('test','test1'); +COUNT(*) +0 +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1; +# # End 10.0 tests # diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index 25cd4a25279..a4cb8da5cce 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -3733,5 +3733,33 @@ id MIN(a) MAX(a) 4 2001-01-04 2001-01-04 DROP TABLE t1; # +# MDEV-17039: Query plan changes when we use GROUP BY optimization with optimizer_use_condition_selectivity=4 +# and use_stat_tables= PREFERABLY +# +CREATE TABLE t1 (a INT, b INT,c INT DEFAULT 0, INDEX (a,b)); +INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), +(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6); +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables=PREFERABLY; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8 100.00 +1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 100.00 Using index +2 MATERIALIZED t1 range NULL a 5 NULL 8 100.00 Using index for group-by +Warnings: +Note 1003 select `test`.`t1_outer`.`a` AS `a` from <materialize> (select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where (`test`.`t1_outer`.`a` = `<subquery2>`.`max(b)`) +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set @@use_stat_tables=@save_use_stat_tables; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8 100.00 +1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 100.00 Using index +2 MATERIALIZED t1 range NULL a 5 NULL 8 100.00 Using index for group-by +Warnings: +Note 1003 select `test`.`t1_outer`.`a` AS `a` from <materialize> (select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where (`test`.`t1_outer`.`a` = `<subquery2>`.`max(b)`) +drop table t1; +# # End of 10.0 tests # diff --git a/mysql-test/r/order_by_zerolength-4285.result b/mysql-test/r/order_by_zerolength-4285.result index f60ce7d90c7..e4c117b26af 100644 --- a/mysql-test/r/order_by_zerolength-4285.result +++ b/mysql-test/r/order_by_zerolength-4285.result @@ -24,3 +24,23 @@ Warning 1292 Truncated incorrect CHAR(0) value: '8' Warning 1292 Truncated incorrect CHAR(0) value: '9' Warning 1292 Truncated incorrect CHAR(0) value: '10' drop table t1; +# +# MDEV-17020: Assertion `length > 0' failed in ptr_compare upon ORDER BY with bad conversion +# +set @save_sql_mode= @@sql_mode; +SET @@sql_mode= ''; +CREATE TABLE t1 (pk INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2); +explain +SELECT * FROM t1 ORDER BY 'foo', CONVERT(pk, CHAR(0)) LIMIT 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index; Using filesort +SELECT * FROM t1 ORDER BY 'foo', Cast(pk as CHAR(0)) LIMIT 2; +pk +1 +2 +Warnings: +Warning 1292 Truncated incorrect CHAR(0) value: '1' +Warning 1292 Truncated incorrect CHAR(0) value: '2' +set @@sql_mode= @save_sql_mode; +drop table t1; diff --git a/mysql-test/r/partition_explicit_prune.result b/mysql-test/r/partition_explicit_prune.result index 3ca1e688e8f..c8ab243c34c 100644 --- a/mysql-test/r/partition_explicit_prune.result +++ b/mysql-test/r/partition_explicit_prune.result @@ -1870,3 +1870,22 @@ CREATE TABLE t2 LIKE t1 PARTITION (p0, p2); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITION (p0, p2)' at line 1 DROP TABLE t1; SET @@default_storage_engine = @old_default_storage_engine; +# +# MDEV-14815 - Server crash or AddressSanitizer errors or valgrind warnings in thr_lock / has_old_lock upon FLUSH TABLES +# +CREATE TABLE t1 (i INT) ENGINE=MEMORY PARTITION BY RANGE (i) (PARTITION p0 VALUES LESS THAN (4), PARTITION pm VALUES LESS THAN MAXVALUE); +CREATE TABLE t2 (i INT) ENGINE=MEMORY; +LOCK TABLE t1 WRITE, t2 WRITE; +SELECT * FROM t1 PARTITION (p0); +i +FLUSH TABLES; +SELECT * FROM t1 PARTITION (p0); +i +ALTER TABLE t1 TRUNCATE PARTITION p0; +SELECT * FROM t1 PARTITION (p0); +i +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; +SELECT * FROM t1 PARTITION (p0); +i +UNLOCK TABLES; +DROP TABLE t1, t2; diff --git a/mysql-test/r/selectivity.result b/mysql-test/r/selectivity.result index 3e8fb8e2e41..6af4f9a9ace 100644 --- a/mysql-test/r/selectivity.result +++ b/mysql-test/r/selectivity.result @@ -782,9 +782,9 @@ set optimizer_use_condition_selectivity=3; explain extended select * from t1 where a < 1 and a > 7; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` < 1) and (`test`.`t1`.`a` > 7)) select * from t1 where a < 1 and a > 7; a drop table t1; @@ -1600,3 +1600,43 @@ drop table t1,t0; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; +# +# MDEV-15306: Wrong/Unexpected result with the value +# optimizer_use_condition_selectivity set to 4 +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +CREATE FUNCTION f1() RETURNS INT DETERMINISTIC +BEGIN +SET @cnt := @cnt + 1; +RETURN 1; +END;| +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@use_stat_tables='complementary'; +set @@optimizer_use_condition_selectivity=4; +SET @cnt= 0; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +1 +set @@use_stat_tables='preferably'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET @cnt := 0; +set @@optimizer_use_condition_selectivity=4; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +2 +alter table t1 force; +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +drop function f1; diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result index 748ef0cb6ca..e0ed2865f13 100644 --- a/mysql-test/r/selectivity_innodb.result +++ b/mysql-test/r/selectivity_innodb.result @@ -789,9 +789,9 @@ set optimizer_use_condition_selectivity=3; explain extended select * from t1 where a < 1 and a > 7; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` < 1) and (`test`.`t1`.`a` > 7)) select * from t1 where a < 1 and a > 7; a drop table t1; @@ -1604,6 +1604,46 @@ drop table t1,t0; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; +# +# MDEV-15306: Wrong/Unexpected result with the value +# optimizer_use_condition_selectivity set to 4 +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +CREATE FUNCTION f1() RETURNS INT DETERMINISTIC +BEGIN +SET @cnt := @cnt + 1; +RETURN 1; +END;| +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@use_stat_tables='complementary'; +set @@optimizer_use_condition_selectivity=4; +SET @cnt= 0; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +1 +set @@use_stat_tables='preferably'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET @cnt := 0; +set @@optimizer_use_condition_selectivity=4; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +2 +alter table t1 force; +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +drop function f1; set optimizer_switch=@save_optimizer_switch_for_selectivity_test; set @tmp_ust= @@use_stat_tables; set @tmp_oucs= @@optimizer_use_condition_selectivity; diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result index c1457d5e91a..cd78d44462e 100644 --- a/mysql-test/r/stat_tables.result +++ b/mysql-test/r/stat_tables.result @@ -577,3 +577,16 @@ SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; +# +# MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4 +# +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables= PREFERABLY; +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL +1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/r/stat_tables_innodb.result b/mysql-test/r/stat_tables_innodb.result index 2ac868e9341..02a07fa8bbb 100644 --- a/mysql-test/r/stat_tables_innodb.result +++ b/mysql-test/r/stat_tables_innodb.result @@ -604,5 +604,18 @@ SELECT * FROM mysql.column_stats; db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; +# +# MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4 +# +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables= PREFERABLY; +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL +1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; set optimizer_switch=@save_optimizer_switch_for_stat_tables_test; SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/subselect_extra_no_semijoin.result b/mysql-test/r/subselect_extra_no_semijoin.result index 79bca388181..200682b4065 100644 --- a/mysql-test/r/subselect_extra_no_semijoin.result +++ b/mysql-test/r/subselect_extra_no_semijoin.result @@ -482,3 +482,22 @@ DROP TABLE t1,t2; set optimizer_switch= @tmp_subselect_extra_derived; set optimizer_switch= @subselect_extra_no_sj_tmp; set @optimizer_switch_for_subselect_extra_test=null; +# +# MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset +# +SET NAMES tis620; +set @tmp= @@global.slow_query_log; +SET GLOBAL slow_query_log = 1; +SET long_query_time = 0.000001; +SET log_slow_verbosity = 'explain'; +CREATE TABLE t1 (a VARCHAR(3)) ENGINE=MyISAM; +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo'); +a +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' UNION SELECT 'bar' ); +ERROR HY000: Illegal mix of collations (tis620_thai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<=' +create table t2 (b int); +insert into t2 values (1),(2),(3); +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' FROM t2); +ERROR HY000: Illegal mix of collations (tis620_thai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<=' +drop table t1,t2; +SET GLOBAL slow_query_log=@tmp; diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 38bddd42cfa..e9be0798426 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -394,3 +394,16 @@ select a from t1 where a=b; a drop table t1; drop function y2k; +# +# Start of 10.0 tests +# +# +# MDEV-17257 Server crashes in Item::field_type_for_temporal_comparison or in get_datetime_value on SELECT with YEAR field and IN +# +CREATE TABLE t1 (y YEAR); +SELECT * FROM t1 WHERE y IN ( CAST( '1993-03-26 10:14:20' AS DATE ), NULL ); +y +DROP TABLE t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 199cfba3b8f..52025801974 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -23,6 +23,9 @@ sub skip_combinations { # don't run tests for the wrong platform $skip{'include/platform.combinations'} = [ (IS_WINDOWS) ? 'unix' : 'win' ]; + $skip{'include/maybe_debug.combinations'} = + [ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ]; + # as a special case, disable certain include files as a whole $skip{'include/not_embedded.inc'} = 'Not run for embedded server' if $::opt_embedded_server; diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result new file mode 100644 index 00000000000..38c8ca2f553 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result @@ -0,0 +1,15 @@ +update performance_schema.setup_instruments set enabled='yes'; +update performance_schema.setup_consumers set enabled='yes'; +CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB; +BEGIN; +COMMIT; +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone'; +ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE; +SET DEBUG_SYNC = 'now WAIT_FOR go'; +SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long +WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; +object_name +tmp/Innodb Merge Temp File +SET DEBUG_SYNC = 'now SIGNAL gone'; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result index 53ddf618244..66fc00e34d0 100644 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -14,3 +14,76 @@ ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` (`people_id`); drop table title, department, people; +create table t1 (a int primary key, b int) engine=innodb; +create table t2 (c int primary key, d int, +foreign key (d) references t1 (a) on update cascade) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +insert t2 values (4,1),(5,2),(6,3); +flush table t2 with read lock; +connect con1,localhost,root; +delete from t1 where a=2; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) +update t1 set a=10 where a=1; +connection default; +unlock tables; +connection con1; +connection default; +lock table t2 write; +connection con1; +delete from t1 where a=2; +connection default; +unlock tables; +connection con1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) +connection default; +unlock tables; +disconnect con1; +create user foo; +grant select,update on test.t1 to foo; +connect foo,localhost,foo; +update t1 set a=30 where a=3; +disconnect foo; +connection default; +select * from t2; +c d +5 2 +4 10 +6 30 +drop table t2, t1; +drop user foo; +create table t1 (f1 int primary key) engine=innodb; +create table t2 (f2 int primary key) engine=innodb; +create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; +insert into t1 values (1),(2),(3),(4),(5); +insert into t2 values (1),(2),(3),(4),(5); +insert into t3 values (1),(2),(3),(4),(5); +connect con1,localhost,root; +set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; +alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; +connection default; +set debug_sync='before_execute_sql_command wait_for g1'; +update t1 set f1 = f1 + 100000 limit 2; +connect con2,localhost,root; +kill query UPDATE; +disconnect con2; +connection default; +ERROR 70100: Query execution was interrupted +set debug_sync='now signal g2'; +connection con1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f2` int(11) NOT NULL, + PRIMARY KEY (`f2`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +disconnect con1; +connection default; +select * from t2 where f2 not in (select f1 from t1); +f2 +select * from t3 where f3 not in (select f2 from t2); +f3 +drop table t3; +drop table t2; +drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result new file mode 100644 index 00000000000..b6462000b46 --- /dev/null +++ b/mysql-test/suite/innodb/r/foreign_key.result @@ -0,0 +1,51 @@ +SET FOREIGN_KEY_CHECKS=0; +CREATE TABLE staff ( +staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, +store_id TINYINT UNSIGNED NOT NULL, +PRIMARY KEY (staff_id), +KEY idx_fk_store_id (store_id), +CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +CREATE TABLE store ( +store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, +manager_staff_id TINYINT UNSIGNED NOT NULL, +PRIMARY KEY (store_id), +UNIQUE KEY idx_unique_manager (manager_staff_id), +CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +SET FOREIGN_KEY_CHECKS=DEFAULT; +LOCK TABLE staff WRITE; +UNLOCK TABLES; +DROP TABLES staff, store; +SET FOREIGN_KEY_CHECKS=1; +# +# MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE DATABASE best; +CREATE TABLE t3 (a INT PRIMARY KEY, +CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB; +CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b), +FOREIGN KEY (a) REFERENCES test.t1(a)) ENGINE=InnoDB; +RENAME TABLE best.t2 TO test.t2; +ERROR 42S01: Table 't2' already exists +SHOW CREATE TABLE best.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + `b` text, + PRIMARY KEY (`a`), + FULLTEXT KEY `b` (`b`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP DATABASE best; +# +# MDEV-17541 KILL QUERY during lock wait in FOREIGN KEY check hangs +# +INSERT INTO t1 SET a=1; +BEGIN; +DELETE FROM t1; +INSERT INTO t3 SET a=1; +kill query @id; +ERROR 70100: Query execution was interrupted +DROP TABLE t3,t1; diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result index 78976030ac8..d888fb5b034 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-debug.result +++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result @@ -54,3 +54,17 @@ SET DEBUG_SYNC = 'now SIGNAL s2'; ERROR 23000: Duplicate entry '1' for key 'uk' SET DEBUG_SYNC = 'RESET'; drop table t1; +# +# Bug #27753193 ASSERTION `PREBUILT->TRX->ERROR_KEY_NUM < +# HA_ALTER_INFO->KEY_COUNT' +CREATE TABLE t1 (a INT, UNIQUE KEY(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET DEBUG_SYNC = 'row_log_table_apply1_before signal S1 WAIT_FOR S2'; +ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; +SET DEBUG_SYNC = 'now WAIT_FOR S1'; +INSERT INTO t1 VALUES (1); +ERROR 23000: Duplicate entry '1' for key 'a' +SET DEBUG_SYNC = 'now SIGNAL S2'; +ERROR 23000: Duplicate entry '1' for key 'a' +SET DEBUG_SYNC='RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff new file mode 100644 index 00000000000..83e40b2d3fd --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,4k,debug.rdiff @@ -0,0 +1,128 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,4k,debug.reject +@@ -10,81 +10,81 @@ + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + SYS_TABLES clustered index root page (8): + N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', +- DB_TRX_ID=0x000000000301, +- DB_ROLL_PTR=0x81000001320194, +- ID=0x000000000000000e, ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', ++ DB_TRX_ID=0x000000000302, ++ DB_ROLL_PTR=0x81000003270194, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0110, +- ID=0x000000000000000b, ++ DB_ROLL_PTR=0x8000000320016f, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0201, +- ID=0x000000000000000c, ++ DB_ROLL_PTR=0x80000003200260, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501fc (NAME='SYS_TABLESPACES', +- DB_TRX_ID=0x000000000301, +- DB_ROLL_PTR=0x81000001320110, +- ID=0x000000000000000d, ++header=0x040028150209 (NAME='SYS_TABLESPACES', ++ DB_TRX_ID=0x000000000302, ++ DB_ROLL_PTR=0x81000003270110, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000038150240 (NAME='test/tc', +- DB_TRX_ID=0x000000000303, +- DB_ROLL_PTR=0x83000001360110, +- ID=0x0000000000000010, ++header=0x00003815024d (NAME='test/tc', ++ DB_TRX_ID=0x000000000304, ++ DB_ROLL_PTR=0x830000032c0110, ++ ID=0x0000000000000011, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x0000401502c8 (NAME='test/td', +- DB_TRX_ID=0x000000000304, +- DB_ROLL_PTR=0x84000001370110, +- ID=0x0000000000000011, ++header=0x0000401502d5 (NAME='test/td', ++ DB_TRX_ID=0x000000000305, ++ DB_ROLL_PTR=0x840000032d0110, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x0000501501b8 (NAME='test/tp', +- DB_TRX_ID=0x000000000306, +- DB_ROLL_PTR=0x86000001390110, +- ID=0x0000000000000013, ++header=0x00005015008d (NAME='test/tp', ++ DB_TRX_ID=0x000000000307, ++ DB_ROLL_PTR=0x86000003300110, ++ ID=0x0000000000000014, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x000030150284 (NAME='test/tr', +- DB_TRX_ID=0x000000000302, +- DB_ROLL_PTR=0x82000001350110, +- ID=0x000000000000000f, ++header=0x000010150291 (NAME='test/tr', ++ DB_TRX_ID=0x000000000303, ++ DB_ROLL_PTR=0x820000032b0110, ++ ID=0x0000000000000010, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -92,9 +92,9 @@ + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000001) + header=0x000048150074 (NAME='test/tz', +- DB_TRX_ID=0x000000000305, +- DB_ROLL_PTR=0x85000001380110, +- ID=0x0000000000000012, ++ DB_TRX_ID=0x000000000306, ++ DB_ROLL_PTR=0x850000032e0110, ++ ID=0x0000000000000013, + N_COLS=0x80000001, + TYPE=0x00000023, + MIX_ID=0x0000000000000000, diff --git a/mysql-test/suite/innodb/r/table_flags,4k.rdiff b/mysql-test/suite/innodb/r/table_flags,4k,release.rdiff index faa8a408c65..faa8a408c65 100644 --- a/mysql-test/suite/innodb/r/table_flags,4k.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,4k,release.rdiff diff --git a/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff new file mode 100644 index 00000000000..14fa7509c19 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,8k,debug.rdiff @@ -0,0 +1,128 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,8k,debug.reject +@@ -10,81 +10,81 @@ + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + SYS_TABLES clustered index root page (8): + N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', +- DB_TRX_ID=0x000000000301, +- DB_ROLL_PTR=0x81000001320194, +- ID=0x000000000000000e, ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', ++ DB_TRX_ID=0x000000000302, ++ DB_ROLL_PTR=0x81000001d80194, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0110, +- ID=0x000000000000000b, ++ DB_ROLL_PTR=0x80000001d1016f, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0201, +- ID=0x000000000000000c, ++ DB_ROLL_PTR=0x80000001d10260, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501fc (NAME='SYS_TABLESPACES', +- DB_TRX_ID=0x000000000301, +- DB_ROLL_PTR=0x81000001320110, +- ID=0x000000000000000d, ++header=0x040028150209 (NAME='SYS_TABLESPACES', ++ DB_TRX_ID=0x000000000302, ++ DB_ROLL_PTR=0x81000001d80110, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000038150240 (NAME='test/tc', +- DB_TRX_ID=0x000000000303, +- DB_ROLL_PTR=0x83000001360110, +- ID=0x0000000000000010, ++header=0x00003815024d (NAME='test/tc', ++ DB_TRX_ID=0x000000000304, ++ DB_ROLL_PTR=0x83000001dc0110, ++ ID=0x0000000000000011, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x0000401502c8 (NAME='test/td', +- DB_TRX_ID=0x000000000304, +- DB_ROLL_PTR=0x84000001370110, +- ID=0x0000000000000011, ++header=0x0000401502d5 (NAME='test/td', ++ DB_TRX_ID=0x000000000305, ++ DB_ROLL_PTR=0x84000001dd0110, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x0000501501b8 (NAME='test/tp', +- DB_TRX_ID=0x000000000306, +- DB_ROLL_PTR=0x86000001390110, +- ID=0x0000000000000013, ++header=0x00005015008d (NAME='test/tp', ++ DB_TRX_ID=0x000000000307, ++ DB_ROLL_PTR=0x86000001df0110, ++ ID=0x0000000000000014, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x000030150284 (NAME='test/tr', +- DB_TRX_ID=0x000000000302, +- DB_ROLL_PTR=0x82000001350110, +- ID=0x000000000000000f, ++header=0x000010150291 (NAME='test/tr', ++ DB_TRX_ID=0x000000000303, ++ DB_ROLL_PTR=0x82000001db0110, ++ ID=0x0000000000000010, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -92,9 +92,9 @@ + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000001) + header=0x000048150074 (NAME='test/tz', +- DB_TRX_ID=0x000000000305, +- DB_ROLL_PTR=0x85000001380110, +- ID=0x0000000000000012, ++ DB_TRX_ID=0x000000000306, ++ DB_ROLL_PTR=0x85000001de0110, ++ ID=0x0000000000000013, + N_COLS=0x80000001, + TYPE=0x00000023, + MIX_ID=0x0000000000000000, diff --git a/mysql-test/suite/innodb/r/table_flags,8k.rdiff b/mysql-test/suite/innodb/r/table_flags,8k,release.rdiff index ba3439fc6cf..ba3439fc6cf 100644 --- a/mysql-test/suite/innodb/r/table_flags,8k.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,8k,release.rdiff diff --git a/mysql-test/suite/innodb/r/table_flags,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,debug.rdiff new file mode 100644 index 00000000000..d038515ffe5 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,debug.rdiff @@ -0,0 +1,128 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,debug.reject +@@ -10,81 +10,81 @@ + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + SYS_TABLES clustered index root page (8): + N_RECS=9; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', +- DB_TRX_ID=0x000000000301, +- DB_ROLL_PTR=0x81000001320194, +- ID=0x000000000000000e, ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', ++ DB_TRX_ID=0x000000000302, ++ DB_ROLL_PTR=0x81000001330194, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0110, +- ID=0x000000000000000b, ++ DB_ROLL_PTR=0x800000012d016f, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000300, +- DB_ROLL_PTR=0x800000012d0201, +- ID=0x000000000000000c, ++ DB_ROLL_PTR=0x800000012d0260, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501fc (NAME='SYS_TABLESPACES', +- DB_TRX_ID=0x000000000301, +- DB_ROLL_PTR=0x81000001320110, +- ID=0x000000000000000d, ++header=0x040028150209 (NAME='SYS_TABLESPACES', ++ DB_TRX_ID=0x000000000302, ++ DB_ROLL_PTR=0x81000001330110, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000038150240 (NAME='test/tc', +- DB_TRX_ID=0x000000000303, +- DB_ROLL_PTR=0x83000001360110, +- ID=0x0000000000000010, ++header=0x00003815024d (NAME='test/tc', ++ DB_TRX_ID=0x000000000304, ++ DB_ROLL_PTR=0x83000001370110, ++ ID=0x0000000000000011, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x0000401502c8 (NAME='test/td', +- DB_TRX_ID=0x000000000304, +- DB_ROLL_PTR=0x84000001370110, +- ID=0x0000000000000011, ++header=0x0000401502d5 (NAME='test/td', ++ DB_TRX_ID=0x000000000305, ++ DB_ROLL_PTR=0x84000001380110, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x0000501501b8 (NAME='test/tp', +- DB_TRX_ID=0x000000000306, +- DB_ROLL_PTR=0x86000001390110, +- ID=0x0000000000000013, ++header=0x00005015008d (NAME='test/tp', ++ DB_TRX_ID=0x000000000307, ++ DB_ROLL_PTR=0x860000013a0110, ++ ID=0x0000000000000014, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x000030150284 (NAME='test/tr', +- DB_TRX_ID=0x000000000302, +- DB_ROLL_PTR=0x82000001350110, +- ID=0x000000000000000f, ++header=0x000010150291 (NAME='test/tr', ++ DB_TRX_ID=0x000000000303, ++ DB_ROLL_PTR=0x82000001360110, ++ ID=0x0000000000000010, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -92,9 +92,9 @@ + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000001) + header=0x000048150074 (NAME='test/tz', +- DB_TRX_ID=0x000000000305, +- DB_ROLL_PTR=0x85000001380110, +- ID=0x0000000000000012, ++ DB_TRX_ID=0x000000000306, ++ DB_ROLL_PTR=0x85000001390110, ++ ID=0x0000000000000013, + N_COLS=0x80000001, + TYPE=0x00000023, + MIX_ID=0x0000000000000000, diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.opt b/mysql-test/suite/innodb/t/alter_inplace_perfschema.opt new file mode 100644 index 00000000000..f56125521fc --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.opt @@ -0,0 +1,2 @@ +--innodb-sort-buffer-size=64k +--tmpdir=$MYSQLTEST_VARDIR/tmp diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test new file mode 100644 index 00000000000..5f1e1f3491d --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test @@ -0,0 +1,40 @@ +--source include/have_innodb.inc +--source include/have_perfschema.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/not_embedded.inc + +connect (ddl, localhost, root,,); +update performance_schema.setup_instruments set enabled='yes'; +update performance_schema.setup_consumers set enabled='yes'; +CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB; + +BEGIN; +let $n=10; +--disable_query_log +while ($n) { +dec $n; +INSERT INTO t1 SELECT NULL, REPEAT('b',255); +} +--enable_query_log +COMMIT; + +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone'; +send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE; + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR go'; +--replace_regex /.*[\\\/]tmp/tmp/ +SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long +WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; + +#--exec lsof -p `pidof mysqld` +SET DEBUG_SYNC = 'now SIGNAL gone'; + +connection ddl; +reap; +disconnect ddl; + +connection default; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index 2d586e2d6be..7ef440b260b 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -1,5 +1,8 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_debug_sync.inc + +--enable_connect_log --echo # --echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE @@ -24,3 +27,87 @@ ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` (`people_id`); drop table title, department, people; + +# +# FK and prelocking: +# child table accesses (reads and writes) wait for locks. +# +create table t1 (a int primary key, b int) engine=innodb; +create table t2 (c int primary key, d int, + foreign key (d) references t1 (a) on update cascade) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +insert t2 values (4,1),(5,2),(6,3); +flush table t2 with read lock; # this takes MDL_SHARED_NO_WRITE +connect (con1,localhost,root); +--error ER_ROW_IS_REFERENCED_2 +delete from t1 where a=2; +send update t1 set a=10 where a=1; +connection default; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +unlock tables; +connection con1; +reap; +connection default; +lock table t2 write; # this takes MDL_SHARED_NO_READ_WRITE +connection con1; +send delete from t1 where a=2; +connection default; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +unlock tables; +connection con1; +--error ER_ROW_IS_REFERENCED_2 +reap; +connection default; +unlock tables; +disconnect con1; + +# but privileges should not be checked +create user foo; +grant select,update on test.t1 to foo; +connect(foo,localhost,foo); +update t1 set a=30 where a=3; +disconnect foo; +connection default; +select * from t2; +drop table t2, t1; +drop user foo; + +# +# MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys +# +create table t1 (f1 int primary key) engine=innodb; +create table t2 (f2 int primary key) engine=innodb; +create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; +insert into t1 values (1),(2),(3),(4),(5); +insert into t2 values (1),(2),(3),(4),(5); +insert into t3 values (1),(2),(3),(4),(5); +connect con1,localhost,root; +set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; +send alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; +connection default; +let $conn=`select connection_id()`; +set debug_sync='before_execute_sql_command wait_for g1'; +send update t1 set f1 = f1 + 100000 limit 2; +connect con2,localhost,root; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock' and info like 'update t1 %'; +source include/wait_condition.inc; +--replace_result $conn UPDATE +eval kill query $conn; +disconnect con2; +connection default; +error ER_QUERY_INTERRUPTED; +reap; +set debug_sync='now signal g2'; +connection con1; +reap; +show create table t2; +disconnect con1; +connection default; +select * from t2 where f2 not in (select f1 from t1); +select * from t3 where f3 not in (select f2 from t2); +drop table t3; +drop table t2; +drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test new file mode 100644 index 00000000000..c1a92697dab --- /dev/null +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -0,0 +1,75 @@ +--source include/have_innodb.inc + +# +# MDEV-12669 Circular foreign keys cause a loop and OOM upon LOCK TABLE +# +SET FOREIGN_KEY_CHECKS=0; +CREATE TABLE staff ( + staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + store_id TINYINT UNSIGNED NOT NULL, + PRIMARY KEY (staff_id), + KEY idx_fk_store_id (store_id), + CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +CREATE TABLE store ( + store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + manager_staff_id TINYINT UNSIGNED NOT NULL, + PRIMARY KEY (store_id), + UNIQUE KEY idx_unique_manager (manager_staff_id), + CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +SET FOREIGN_KEY_CHECKS=DEFAULT; + +LOCK TABLE staff WRITE; +UNLOCK TABLES; +DROP TABLES staff, store; + +SET FOREIGN_KEY_CHECKS=1; + +--echo # +--echo # MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX +--echo # + +--disable_query_log +call mtr.add_suppression("InnoDB: Error; possible reasons:"); +--enable_query_log + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE DATABASE best; +CREATE TABLE t3 (a INT PRIMARY KEY, +CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB; +CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b), +FOREIGN KEY (a) REFERENCES test.t1(a)) ENGINE=InnoDB; +--replace_regex /Table '.*t2'/Table 't2'/ +--error ER_TABLE_EXISTS_ERROR +RENAME TABLE best.t2 TO test.t2; +SHOW CREATE TABLE best.t2; +DROP DATABASE best; + +--echo # +--echo # MDEV-17541 KILL QUERY during lock wait in FOREIGN KEY check hangs +--echo # +connect (fk, localhost, root,,); +INSERT INTO t1 SET a=1; +BEGIN; +DELETE FROM t1; + +connection default; +let $ID= `SELECT @id := CONNECTION_ID()`; +send INSERT INTO t3 SET a=1; + +connection fk; +# Check that the above SELECT is blocked +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = 'update' and info = 'INSERT INTO t3 SET a=1'; +--source include/wait_condition.inc +let $ignore= `SELECT @id := $ID`; +kill query @id; + +connection default; +--error ER_QUERY_INTERRUPTED +reap; +disconnect fk; + +DROP TABLE t3,t1; diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test index f4996916e9f..bc4b2ad8e56 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-debug.test +++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test @@ -64,7 +64,6 @@ set DEBUG_SYNC = 'now WAIT_FOR s1'; --error ER_DUP_ENTRY update t1 set a=1 where id=2; SET DEBUG_SYNC = 'now SIGNAL s2'; -disconnect con1; --echo /* connection default */ connection default; @@ -75,5 +74,29 @@ SET DEBUG_SYNC = 'RESET'; drop table t1; +--echo # +--echo # Bug #27753193 ASSERTION `PREBUILT->TRX->ERROR_KEY_NUM < +--echo # HA_ALTER_INFO->KEY_COUNT' + +CREATE TABLE t1 (a INT, UNIQUE KEY(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +SET DEBUG_SYNC = 'row_log_table_apply1_before signal S1 WAIT_FOR S2'; +send ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; + +connection con1; +SET DEBUG_SYNC = 'now WAIT_FOR S1'; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (1); +SET DEBUG_SYNC = 'now SIGNAL S2'; +disconnect con1; + +CONNECTION default; +--error ER_DUP_ENTRY +reap; +SET DEBUG_SYNC='RESET'; + +DROP TABLE t1; + # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/table_flags.test b/mysql-test/suite/innodb/t/table_flags.test index 4d3afcb2dec..59ae0a69ae6 100644 --- a/mysql-test/suite/innodb/t/table_flags.test +++ b/mysql-test/suite/innodb/t/table_flags.test @@ -1,6 +1,7 @@ --source include/innodb_page_size.inc # Embedded server tests do not support restarting --source include/not_embedded.inc +--source include/maybe_debug.inc --disable_query_log call mtr.add_suppression("InnoDB: New log files created, LSN="); @@ -22,6 +23,9 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags; --let $d=--innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir --let $d=$d --innodb-data-file-path=ibdata1:10M:autoextend --let $d=$d --innodb-undo-tablespaces=0 +if ($have_debug) { +--let $d=$d --debug=d,create_and_drop_garbage +} --let $restart_parameters=$d --innodb-stats-persistent=0 --innodb-file-format=1 --source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb_fts/r/fts_kill_query.result b/mysql-test/suite/innodb_fts/r/fts_kill_query.result new file mode 100644 index 00000000000..45623f96ab0 --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/fts_kill_query.result @@ -0,0 +1,6 @@ +CREATE TABLE t1 (a VARCHAR(7), b text, FULLTEXT KEY idx (a,b)) ENGINE=InnoDB; +COMMIT; +SELECT COUNT(*) FROM t1 +WHERE MATCH (a,b) AGAINST ('foo bar' IN BOOLEAN MODE); +KILL QUERY @id; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/fts_kill_query.test b/mysql-test/suite/innodb_fts/t/fts_kill_query.test new file mode 100644 index 00000000000..3dda29a3876 --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/fts_kill_query.test @@ -0,0 +1,30 @@ +--source include/have_innodb.inc + +CREATE TABLE t1 (a VARCHAR(7), b text, FULLTEXT KEY idx (a,b)) ENGINE=InnoDB; + +--disable_query_log +BEGIN; +let $n=1000; +while ($n) { +INSERT INTO t1 VALUES('foo bar','boo far'); +dec $n; +} +--enable_query_log +COMMIT; + +let $id = `SELECT CONNECTION_ID()`; +send SELECT COUNT(*) FROM t1 +WHERE MATCH (a,b) AGAINST ('foo bar' IN BOOLEAN MODE); + +connect (con1,localhost,root,,); +let $ignore= `SELECT @id := $ID`; +KILL QUERY @id; +disconnect con1; + +connection default; +# The following would return a result set if the KILL was not fast enough. +--disable_result_log +--error 0,ER_QUERY_INTERRUPTED,HA_ERR_ABORTED_BY_USER +reap; +--enable_result_log +DROP TABLE t1; diff --git a/mysql-test/suite/maria/create.result b/mysql-test/suite/maria/create.result new file mode 100644 index 00000000000..82c6b8c9871 --- /dev/null +++ b/mysql-test/suite/maria/create.result @@ -0,0 +1,33 @@ +CREATE OR REPLACE TABLE t1 ( +f1 DECIMAL(43,0) NOT NULL, +f2 TIME(4) NULL, +f3 BINARY(101) NULL, +f4 TIMESTAMP(4) NULL, +f5 DATETIME(1) NULL, +f6 SET('a','b','c') NOT NULL DEFAULT 'a', +f7 VARBINARY(2332) NOT NULL DEFAULT '', +f8 DATE NULL, +f9 BLOB NULL, +f10 MEDIUMINT(45) NOT NULL DEFAULT 0, +f11 YEAR NULL, +f12 BIT(58) NULL, +v2 TIME(1) AS (f2) VIRTUAL, +v3 BINARY(115) AS (f3) VIRTUAL, +v4 TIMESTAMP(3) AS (f4) VIRTUAL, +v7 VARBINARY(658) AS (f7) PERSISTENT, +v8 DATE AS (f8) PERSISTENT, +v9 TINYTEXT AS (f9) PERSISTENT, +v11 YEAR AS (f11) VIRTUAL +) ENGINE=Aria; +INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES +(0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1'); +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a INT(45)); +INSERT IGNORE INTO t1 VALUES (1),(2); +CREATE OR REPLACE TABLE t2 ENGINE=Aria AS SELECT SUM(a) AS f1, IFNULL( 'qux', ExtractValue( 'foo', 'bar' ) ) AS f2 FROM t1; +select * from t2; +f1 f2 +3 qux +DROP TABLE t1, t2; diff --git a/mysql-test/suite/maria/create.test b/mysql-test/suite/maria/create.test new file mode 100644 index 00000000000..8f2ffd7492f --- /dev/null +++ b/mysql-test/suite/maria/create.test @@ -0,0 +1,42 @@ +--source include/have_maria.inc + +# MDEV-17021 +# Server crash or assertion `length <= column->length' failure in +# write_block_record +# + +CREATE OR REPLACE TABLE t1 ( + f1 DECIMAL(43,0) NOT NULL, + f2 TIME(4) NULL, + f3 BINARY(101) NULL, + f4 TIMESTAMP(4) NULL, + f5 DATETIME(1) NULL, + f6 SET('a','b','c') NOT NULL DEFAULT 'a', + f7 VARBINARY(2332) NOT NULL DEFAULT '', + f8 DATE NULL, + f9 BLOB NULL, + f10 MEDIUMINT(45) NOT NULL DEFAULT 0, + f11 YEAR NULL, + f12 BIT(58) NULL, + v2 TIME(1) AS (f2) VIRTUAL, + v3 BINARY(115) AS (f3) VIRTUAL, + v4 TIMESTAMP(3) AS (f4) VIRTUAL, + v7 VARBINARY(658) AS (f7) PERSISTENT, + v8 DATE AS (f8) PERSISTENT, + v9 TINYTEXT AS (f9) PERSISTENT, + v11 YEAR AS (f11) VIRTUAL +) ENGINE=Aria; +INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES + (0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1'); +DROP TABLE t1; + +# +# MDEV-17067 Server crash in write_block_record +# + +CREATE OR REPLACE TABLE t1 (a INT(45)); +INSERT IGNORE INTO t1 VALUES (1),(2); + +CREATE OR REPLACE TABLE t2 ENGINE=Aria AS SELECT SUM(a) AS f1, IFNULL( 'qux', ExtractValue( 'foo', 'bar' ) ) AS f2 FROM t1; +select * from t2; +DROP TABLE t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result index f778e76adc0..efe8155ec08 100644 --- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -32,13 +32,12 @@ SET TIMESTAMP=1000000000; CREATE TABLE t3 ( a INT UNIQUE ); SET FOREIGN_KEY_CHECKS=0; INSERT INTO t3 VALUES (1),(1); -Got one of the listed errors +ERROR 23000: Duplicate entry '1' for key 'a' SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS t1,t2,t3; SET FOREIGN_KEY_CHECKS=1; create table t1 (b int primary key) engine = INNODB; -create table t2 (a int primary key, b int, foreign key (b) references t1(b)) -engine = INNODB; +create table t2 (a int primary key, b int, foreign key (b) references t1(b)) engine = INNODB; insert into t1 set b=1; insert into t2 set a=1, b=1; set foreign_key_checks=0; diff --git a/mysql-test/suite/rpl/t/rpl_15919-master.opt b/mysql-test/suite/rpl/t/rpl_15919-master.opt deleted file mode 100644 index 9b27aef9bf8..00000000000 --- a/mysql-test/suite/rpl/t/rpl_15919-master.opt +++ /dev/null @@ -1 +0,0 @@ ---lower_case_table_names=0 diff --git a/mysql-test/suite/rpl/t/rpl_15919.test b/mysql-test/suite/rpl/t/rpl_15919.test index 0462f7fd067..a5b25929ad0 100644 --- a/mysql-test/suite/rpl/t/rpl_15919.test +++ b/mysql-test/suite/rpl/t/rpl_15919.test @@ -1,5 +1,7 @@ ---source include/master-slave.inc +--source include/have_case_sensitive_file_system.inc --source include/have_innodb.inc +--source include/master-slave.inc + --connection master create table RPL(a int); insert into RPL values(1); diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test index ce28c0334ec..53db1723325 100644 --- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test @@ -1,4 +1,61 @@ --- source include/not_ndb_default.inc -- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_foreign_key.test + +# Check the replication of the FOREIGN_KEY_CHECKS variable. + +-- source include/master-slave.inc + +CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; +CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; + +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL); +INSERT INTO t2 VALUES (5,0); +INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); +SET FOREIGN_KEY_CHECKS=1; +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY b; +sync_slave_with_master; +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY b; + +connection master; +SET TIMESTAMP=1000000000; +CREATE TABLE t3 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +--error ER_DUP_ENTRY +INSERT INTO t3 VALUES (1),(1); +sync_slave_with_master; + +connection master; +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS t1,t2,t3; +SET FOREIGN_KEY_CHECKS=1; +sync_slave_with_master; + +# +# Bug #32468 delete rows event on a table with foreign key constraint fails +# + +connection master; + +create table t1 (b int primary key) engine = INNODB; +create table t2 (a int primary key, b int, foreign key (b) references t1(b)) engine = INNODB; + +insert into t1 set b=1; +insert into t2 set a=1, b=1; + +set foreign_key_checks=0; +delete from t1; + +--echo must sync w/o a problem (could not with the buggy code) +sync_slave_with_master; +select count(*) from t1 /* must be zero */; + + +# cleanup for bug#32468 + +connection master; +drop table t2,t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_32.result b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_32.result new file mode 100644 index 00000000000..b3bec1eecdd --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_32.result @@ -0,0 +1,7 @@ +set global innodb_ft_result_cache_limit=5000000000; +Warnings: +Warning 1292 Truncated incorrect innodb_ft_result_cache_limit value: '5000000000' +select @@innodb_ft_result_cache_limit; +@@innodb_ft_result_cache_limit +4294967295 +set global innodb_ft_result_cache_limit=2000000000; diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_64.result b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_64.result new file mode 100644 index 00000000000..c86331a8a1c --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_64.result @@ -0,0 +1,5 @@ +set global innodb_ft_result_cache_limit=5000000000; +select @@innodb_ft_result_cache_limit; +@@innodb_ft_result_cache_limit +5000000000 +set global innodb_ft_result_cache_limit=2000000000; diff --git a/mysql-test/suite/sys_vars/r/thread_pool_size_high.result b/mysql-test/suite/sys_vars/r/thread_pool_size_high.result index f581ae8e315..bc30104b79d 100644 --- a/mysql-test/suite/sys_vars/r/thread_pool_size_high.result +++ b/mysql-test/suite/sys_vars/r/thread_pool_size_high.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Could not increase number of max_open_files to more than"); SELECT @@global.thread_pool_size; @@global.thread_pool_size 200 diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_32.test b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_32.test new file mode 100644 index 00000000000..d9defc7447b --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_32.test @@ -0,0 +1,9 @@ +--source include/have_32bit.inc +--source include/have_innodb.inc + +let $innodb_ft_result_cache_limit_orig=`select @@innodb_ft_result_cache_limit`; + +set global innodb_ft_result_cache_limit=5000000000; +select @@innodb_ft_result_cache_limit; + +eval set global innodb_ft_result_cache_limit=$innodb_ft_result_cache_limit_orig; diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_64.test b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_64.test new file mode 100644 index 00000000000..2606d2b5ca8 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_64.test @@ -0,0 +1,9 @@ +--source include/have_64bit.inc +--source include/have_innodb.inc + +let $innodb_ft_result_cache_limit_orig=`select @@innodb_ft_result_cache_limit`; + +set global innodb_ft_result_cache_limit=5000000000; +select @@innodb_ft_result_cache_limit; + +eval set global innodb_ft_result_cache_limit=$innodb_ft_result_cache_limit_orig; diff --git a/mysql-test/suite/sys_vars/t/thread_pool_size_high.test b/mysql-test/suite/sys_vars/t/thread_pool_size_high.test index 761aeee2b0a..d1e68f026f0 100644 --- a/mysql-test/suite/sys_vars/t/thread_pool_size_high.test +++ b/mysql-test/suite/sys_vars/t/thread_pool_size_high.test @@ -1,6 +1,7 @@ --source include/not_windows.inc --source include/not_embedded.inc --source include/have_pool_of_threads.inc +call mtr.add_suppression("Could not increase number of max_open_files to more than"); SELECT @@global.thread_pool_size; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 9703b9a1455..30300efb34e 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1345,6 +1345,53 @@ DROP TABLE t1, t2, t3; SET SQL_MODE=default; SET GLOBAL max_allowed_packet=default; + + +SET GLOBAL max_allowed_packet=17825792; + +--connect(con1, localhost, root,,) +CREATE TABLE t1 (t1_fld1 TEXT); +CREATE TABLE t2 (t2_fld1 MEDIUMTEXT); +CREATE TABLE t3 (t3_fld1 LONGTEXT); + +INSERT INTO t1 VALUES (REPEAT('a',300)); +INSERT INTO t2 VALUES (REPEAT('b',65680)); +INSERT INTO t3 VALUES (REPEAT('c',16777300)); + +SELECT LENGTH(t1_fld1) FROM t1; +SELECT LENGTH(t2_fld1) FROM t2; +SELECT LENGTH(t3_fld1) FROM t3; + +--echo # With strict mode +SET SQL_MODE='STRICT_ALL_TABLES'; + +--error ER_DATA_TOO_LONG +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +--error ER_DATA_TOO_LONG +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +--error ER_DATA_TOO_LONG +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + +--echo # With non-strict mode +SET SQL_MODE=''; + +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + +SELECT LENGTH(my_t1_fld1) FROM t1; +SELECT LENGTH(my_t2_fld1) FROM t2; +SELECT LENGTH(my_t3_fld1) FROM t3; + +# Cleanup +--disconnect con1 +--source include/wait_until_disconnected.inc + +--connection default +DROP TABLE t1, t2, t3; + +SET SQL_MODE=default; +SET GLOBAL max_allowed_packet=default; CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); SHOW CREATE TABLE t1; @@ -1856,4 +1903,3 @@ ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS (`ID`, `CHECK_POINT`); SHOW CREATE TABLE t1; ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS (`ID`, `CHECK_POINT`); DROP TABLE t1; - diff --git a/mysql-test/t/create_or_replace.test b/mysql-test/t/create_or_replace.test index 5ebb3031be3..9a1c77f38ee 100644 --- a/mysql-test/t/create_or_replace.test +++ b/mysql-test/t/create_or_replace.test @@ -423,3 +423,48 @@ UNLOCK TABLES; DROP FUNCTION f1; DROP TABLE t1; + + +--echo # +--echo # MDEV-14410 - Assertion `table->pos_in_locked_tables == __null || +--echo # table->pos_in_locked_tables->table == table' failed in +--echo # mark_used_tables_as_free_for_reuse +--echo # +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +CREATE TABLE t3 (c INT); + +CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t1 VALUES (); +CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW INSERT INTO t3 SELECT * FROM t1; + +LOCK TABLE t1 WRITE, t2 WRITE; +CREATE OR REPLACE TABLE t1 (i INT); +UNLOCK TABLES; +INSERT INTO t2 VALUES (1); + +# Cleanup +DROP TABLE t1, t2, t3; + +--echo # +--echo # MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in +--echo # Locked_tables_list::unlock_locked_tables +--echo # +CREATE TEMPORARY TABLE t1(a INT) ENGINE=InnoDB; +CREATE TEMPORARY TABLE t2(a INT); +CREATE TABLE t3(a INT); +LOCK TABLE t2 WRITE; +SELECT * FROM t2; +# drops t2 +--error ER_INVALID_DEFAULT +CREATE OR REPLACE TEMPORARY TABLE t1(c INT DEFAULT ''); +# make sure we didn't leave locked tables mode +--error ER_TABLE_NOT_LOCKED +SELECT * FROM t3; +# drops t1 +--error ER_INVALID_DEFAULT +CREATE OR REPLACE TEMPORARY TABLE t2(c INT DEFAULT ''); +# make sure we didn't leave locked tables mode +--error ER_TABLE_NOT_LOCKED +SELECT * FROM t3; +UNLOCK TABLES; +DROP TABLE t3; diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 5e8195e4718..34a6c5637ed 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -618,5 +618,23 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe DROP TABLE t1; --echo # +--echo # MDEV-17064 LIKE function has error behavior on the fields in which the collation is xxx_unicode_xx +--echo # + +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +ALTER TABLE t1 CHANGE COLUMN name name VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +DROP TABLE t1; + +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT name LIKE '%!!%' ESCAPE '!' AS c1, + name LIKE '%!!%' COLLATE utf8_general_ci ESCAPE '!' AS c2 +FROM t1; +DROP TABLE t1; + +--echo # --echo # End of MariaDB-10.0 tests --echo # diff --git a/mysql-test/t/func_concat.test b/mysql-test/t/func_concat.test index 69dd2c4063e..e1bda4be29e 100644 --- a/mysql-test/t/func_concat.test +++ b/mysql-test/t/func_concat.test @@ -242,3 +242,25 @@ SET optimizer_switch=@save_optimizer_switch; --echo # SELECT UNHEX(CONCAT('414C2', HEX(8 + ROUND(RAND()*7)), SUBSTR(SHA(UUID()),6,33),HEX(2+ROUND(RAND()*8)))) IS NULL AS c1; + + +--echo # +--echo # MDEV-13119 Wrong results with CAST(AS CHAR) and subquery +--echo # + +SET optimizer_switch=_utf8'derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CAST(t AS CHAR CHARACTER SET utf8) t2 FROM t1) sub; +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; + + +--echo # +--echo # MDEV-13120 Wrong results with MAKE_SET() and subquery +--echo # + +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub; +DROP TABLE t1; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 4192a3284b7..e41b236f864 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -1516,6 +1516,21 @@ SELECT LENGTH(CONCAT(t2,'--',t2)) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FR DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; +--echo # +--echo # MDEV-16995: ER_CANT_CREATE_GEOMETRY_OBJECT encountered for a query with +--echo # optimizer_use_condition_selectivity>=3 +--echo # + +CREATE TABLE t1 (a POINT); +INSERT INTO t1 VALUES (POINT(1,1)),(POINT(1,2)),(POINT(1,3)); +set @save_use_stat_tables= @@use_stat_tables; +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @@use_stat_tables= PREFERABLY; +set @@optimizer_use_condition_selectivity=3; +SELECT COUNT(*) FROM t1 WHERE a IN ('test','test1'); +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1; --echo # --echo # End 10.0 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index feca35086f0..b96f8033be5 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -2232,6 +2232,28 @@ DROP USER foo@'127.0.0.1'; --echo # End of Bug#12766319 +# +# Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS +# +create user foo@localhost; +create database foodb; +grant create routine on foodb.* to foo@localhost; +connect con1,localhost,foo; +create procedure fooproc() select 'i am fooproc'; +show grants; +disconnect con1; +connection default; +rename table mysql.procs_priv to mysql.procs_priv1; +flush privileges; +show grants for foo@localhost; +rename table mysql.procs_priv1 to mysql.procs_priv; +show grants for foo@localhost; +flush privileges; +show grants for foo@localhost; +drop user foo@localhost; +drop procedure fooproc; +drop database foodb; + --echo # --echo # Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS @@ -2265,26 +2287,5 @@ disconnect con1; DROP USER untrusted@localhost; DROP DATABASE secret; -# -# Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS -# -create user foo@localhost; -create database foodb; -grant create routine on foodb.* to foo@localhost; -connect con1,localhost,foo; -create procedure fooproc() select 'i am fooproc'; -show grants; -disconnect con1; -connection default; -rename table mysql.procs_priv to mysql.procs_priv1; -error ER_NO_SUCH_TABLE; -flush privileges; -show grants for foo@localhost; -rename table mysql.procs_priv1 to mysql.procs_priv; -drop user foo@localhost; -drop procedure fooproc; -drop database foodb; - - # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test index 8c9be0ca8db..b10cfc7c8e7 100644 --- a/mysql-test/t/group_min_max.test +++ b/mysql-test/t/group_min_max.test @@ -1519,6 +1519,23 @@ ALTER TABLE t1 ADD KEY(id,a); SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=DATE'2001-01-04' GROUP BY id; DROP TABLE t1; +--echo # +--echo # MDEV-17039: Query plan changes when we use GROUP BY optimization with optimizer_use_condition_selectivity=4 +--echo # and use_stat_tables= PREFERABLY +--echo # + +CREATE TABLE t1 (a INT, b INT,c INT DEFAULT 0, INDEX (a,b)); +INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), +(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6); +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables=PREFERABLY; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set @@use_stat_tables=@save_use_stat_tables; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +drop table t1; --echo # --echo # End of 10.0 tests diff --git a/mysql-test/t/lowercase_fs_off.test b/mysql-test/t/lowercase_fs_off.test index 8729efde02c..f4df5e8188d 100644 --- a/mysql-test/t/lowercase_fs_off.test +++ b/mysql-test/t/lowercase_fs_off.test @@ -112,3 +112,13 @@ create procedure test.pr() begin end; --exec $MYSQL_UPGRADE --force 2>&1 drop procedure test.pr; drop database TEST; + +# End of 5.5 tests + +# +# MDEV-9014 SHOW TRIGGERS not case sensitive +# +create table t1 (a int); +create trigger t1_bi before insert on t1 for each row set new.a= 1; +show triggers like '%T1%'; +drop table t1; diff --git a/mysql-test/t/order_by_zerolength-4285.test b/mysql-test/t/order_by_zerolength-4285.test index 2fb58edd36d..9533f2cc62e 100644 --- a/mysql-test/t/order_by_zerolength-4285.test +++ b/mysql-test/t/order_by_zerolength-4285.test @@ -6,3 +6,16 @@ insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); select * from t1 order by now(), cast(pk as char(0)); drop table t1; +--echo # +--echo # MDEV-17020: Assertion `length > 0' failed in ptr_compare upon ORDER BY with bad conversion +--echo # + +set @save_sql_mode= @@sql_mode; +SET @@sql_mode= ''; +CREATE TABLE t1 (pk INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2); +explain +SELECT * FROM t1 ORDER BY 'foo', CONVERT(pk, CHAR(0)) LIMIT 2; +SELECT * FROM t1 ORDER BY 'foo', Cast(pk as CHAR(0)) LIMIT 2; +set @@sql_mode= @save_sql_mode; +drop table t1; diff --git a/mysql-test/t/partition_explicit_prune.test b/mysql-test/t/partition_explicit_prune.test index 68b829fbcc3..b8b6e480ce9 100644 --- a/mysql-test/t/partition_explicit_prune.test +++ b/mysql-test/t/partition_explicit_prune.test @@ -858,3 +858,22 @@ CREATE TABLE t2 LIKE t1 PARTITION (p0, p2); DROP TABLE t1; SET @@default_storage_engine = @old_default_storage_engine; + + +--echo # +--echo # MDEV-14815 - Server crash or AddressSanitizer errors or valgrind warnings in thr_lock / has_old_lock upon FLUSH TABLES +--echo # +CREATE TABLE t1 (i INT) ENGINE=MEMORY PARTITION BY RANGE (i) (PARTITION p0 VALUES LESS THAN (4), PARTITION pm VALUES LESS THAN MAXVALUE); +CREATE TABLE t2 (i INT) ENGINE=MEMORY; +LOCK TABLE t1 WRITE, t2 WRITE; +SELECT * FROM t1 PARTITION (p0); +FLUSH TABLES; +SELECT * FROM t1 PARTITION (p0); +ALTER TABLE t1 TRUNCATE PARTITION p0; +SELECT * FROM t1 PARTITION (p0); +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; +SELECT * FROM t1 PARTITION (p0); +UNLOCK TABLES; + +# Cleanup +DROP TABLE t1, t2; diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test index afaa937c360..557a4e92bca 100644 --- a/mysql-test/t/selectivity.test +++ b/mysql-test/t/selectivity.test @@ -1064,3 +1064,39 @@ drop table t1,t0; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-15306: Wrong/Unexpected result with the value +--echo # optimizer_use_condition_selectivity set to 4 +--echo # + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); + +delimiter |; +CREATE FUNCTION f1() RETURNS INT DETERMINISTIC +BEGIN + SET @cnt := @cnt + 1; + RETURN 1; +END;| +delimiter ;| +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@use_stat_tables='complementary'; +set @@optimizer_use_condition_selectivity=4; +SET @cnt= 0; +SELECT * FROM t1 WHERE a = f1(); +SELECT @cnt; + +set @@use_stat_tables='preferably'; +analyze table t1 persistent for all; +SET @cnt := 0; +set @@optimizer_use_condition_selectivity=4; +SELECT * FROM t1 WHERE a = f1(); +SELECT @cnt; +alter table t1 force; +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +drop function f1; + diff --git a/mysql-test/t/sp-security.test b/mysql-test/t/sp-security.test index 6a596b4febb..53dc4f8c7ac 100644 --- a/mysql-test/t/sp-security.test +++ b/mysql-test/t/sp-security.test @@ -999,7 +999,16 @@ DROP DATABASE db1; # Bug#27407480: AUTOMATIC_SP_PRIVILEGES REQUIRES NEED THE INSERT PRIVILEGES FOR MYSQL.USER TABLE # create user foo@local_ost; -create user foo@`local\_ost` identified by 'nevermore'; +# +# Create a user with an authentification plugin 'foobar'. +# Instead of using a normal "CREATE USER <user> IDENTIFIED VIA <plugin>" +# we do CREATE (without VIA) followed by UPDATE and FLUSH. +# This is to avoid installing a real plugin and thus avoid the test dependency. +# We won't login under this user in the below test, so this is fine. +# +create user foo@`local\_ost`; +update mysql.user set plugin='foobar' where host='local\\_ost'; +flush privileges; create database foodb; grant create routine on foodb.* to foo@local_ost; connect con1,localhost,foo; @@ -1013,6 +1022,7 @@ drop user foo@local_ost; drop user foo@`local\_ost`; drop procedure fooproc; drop database foodb; + --echo # --echo # Test for bug#12602983 - User without privilege on routine can discover --echo # its existence by executing "select non_existing_func();" or by diff --git a/mysql-test/t/stat_tables.test b/mysql-test/t/stat_tables.test index d69b00618ea..a0b2a22b946 100644 --- a/mysql-test/t/stat_tables.test +++ b/mysql-test/t/stat_tables.test @@ -356,3 +356,15 @@ SELECT * FROM mysql.column_stats; DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4 +--echo # + +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables= PREFERABLY; +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/t/subselect_extra_no_semijoin.test b/mysql-test/t/subselect_extra_no_semijoin.test index 8aba3dde72b..d8809c7f981 100644 --- a/mysql-test/t/subselect_extra_no_semijoin.test +++ b/mysql-test/t/subselect_extra_no_semijoin.test @@ -6,4 +6,33 @@ set @optimizer_switch_for_subselect_extra_test='semijoin=off,firstmatch=off,loo set optimizer_switch= @subselect_extra_no_sj_tmp; -set @optimizer_switch_for_subselect_extra_test=null;
\ No newline at end of file +set @optimizer_switch_for_subselect_extra_test=null; + +--echo # +--echo # MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset +--echo # + +## Using a separate client connection is easier than restoring state +connect(con1,localhost,root,,); + +SET NAMES tis620; +set @tmp= @@global.slow_query_log; +SET GLOBAL slow_query_log = 1; +SET long_query_time = 0.000001; +SET log_slow_verbosity = 'explain'; + +CREATE TABLE t1 (a VARCHAR(3)) ENGINE=MyISAM; +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo'); +--error ER_CANT_AGGREGATE_2COLLATIONS +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' UNION SELECT 'bar' ); + +create table t2 (b int); +insert into t2 values (1),(2),(3); + +--error ER_CANT_AGGREGATE_2COLLATIONS +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' FROM t2); + +drop table t1,t2; +SET GLOBAL slow_query_log=@tmp; +disconnect con1; +connection default; diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index 3f96673c43f..cf6835d436e 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -175,12 +175,12 @@ set @@sql_mode= @org_mode; ## ( Bug#29290 type_datetime.test failure in 5.1 ) ## Therefore we sleep a bit if we are too close to midnight. ## The complete test itself needs around 1 second. -## Therefore a time_distance to midnight of 5 seconds should be sufficient. -if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`) +## Therefore a time_distance to midnight of 10 seconds should be sufficient. +if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 10)`) { - # We are here when CURTIME() is between '23:59:56' and '23:59:59'. - # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'. - --real_sleep 5 + # We are here when CURTIME() is between '23:59:51' and '23:59:59'. + # So a sleep time of 10 seconds brings us between '00:00:01' and '00:00:09'. + --real_sleep 10 } create table t1 (f1 date, f2 datetime, f3 timestamp); insert into t1(f1) values(curdate()); diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index 297860f1e05..ebed9550afe 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -360,6 +360,35 @@ INSERT INTO t1 VALUES (1e30),(0); SELECT LEFT('a', SUM(a)) FROM t1; SELECT LEFT('a', AVG(a)) FROM t1; DROP TABLE t1; + + +--echo # +--echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result +--echo # + +SELECT LEFT('a',EXP(50)); +SELECT LEFT('a', COALESCE(1e30)); + +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (1e30); +SELECT LEFT('a',a), LEFT('a',1e30) FROM t1; +DROP TABLE t1; + +PREPARE stmt FROM 'SELECT LEFT(111,?)'; +SET @a=1e30; +EXECUTE stmt USING @a; +DEALLOCATE PREPARE stmt; + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1)); +DROP TABLE t1; + +CREATE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (1e30),(0); +SELECT LEFT('a', SUM(a)) FROM t1; +SELECT LEFT('a', AVG(a)) FROM t1; +DROP TABLE t1; SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a; SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a; --echo # t2 should NOT be eliminated diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test index 685587fe3c5..eb6290033f4 100644 --- a/mysql-test/t/type_year.test +++ b/mysql-test/t/type_year.test @@ -188,3 +188,19 @@ drop table t1; drop function y2k; +--echo # +--echo # Start of 10.0 tests +--echo # + +--echo # +--echo # MDEV-17257 Server crashes in Item::field_type_for_temporal_comparison or in get_datetime_value on SELECT with YEAR field and IN +--echo # + +CREATE TABLE t1 (y YEAR); +SELECT * FROM t1 WHERE y IN ( CAST( '1993-03-26 10:14:20' AS DATE ), NULL ); +DROP TABLE t1; + + +--echo # +--echo # End of 10.0 tests +--echo # diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index e8bb02f51e0..6725e2ae9ff 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,9 +23,9 @@ # ############################################################################## -# Based on 10.0 e52315a4a2c7e752e786f9fcf63b0b5685b0d474 +# Based on 10.0 6ced789186fabd7dce97b3d6d171ff9e5ddc5f48 -main.alter_table : Modified in 10.0.36 +main.alter_table : Modified in 10.0.37 main.assign_key_cache : Added in 10.0.36 main.assign_key_cache_debug : Added in 10.0.36 main.auto_increment : Modified in 10.0.36 @@ -33,39 +33,45 @@ main.bootstrap : Modified in 10.0.36 main.connect_debug : Added in 10.0.36 main.count_distinct2 : MDEV-11768 - timeout main.create_delayed : MDEV-10605 - failed with timeout -main.create_or_replace : Modified in 10.0.36 -ctype_binary : Modified in 10.0.36 -ctype_eucjpms : Modified in 10.0.36 -ctype_euckr : Modified in 10.0.36 -ctype_gbk : Modified in 10.0.36 -ctype_latin1 : Modified in 10.0.36 -ctype_ucs : Modified in 10.0.36 -ctype_ujis : Modified in 10.0.36 -ctype_utf16le : Modified in 10.0.36 -ctype_utf16 : Modified in 10.0.36 -ctype_utf32 : Modified in 10.0.36 -ctype_utf8mb4 : Modified in 10.0.36 -ctype_utf8 : Modified in 10.0.36 +main.create_or_replace : Modified in 10.0.37 +main.ctype_binary : Modified in 10.0.36 +main.ctype_eucjpms : Modified in 10.0.36 +main.ctype_euckr : Modified in 10.0.36 +main.ctype_gbk : Modified in 10.0.36 +main.ctype_latin1 : Modified in 10.0.36 +main.ctype_uca : Modified in 10.0.37 +main.ctype_ucs : Modified in 10.0.36 +main.ctype_ujis : Modified in 10.0.36 +main.ctype_utf16le : Modified in 10.0.36 +main.ctype_utf16 : Modified in 10.0.36 +main.ctype_utf32 : Modified in 10.0.36 +main.ctype_utf8mb4 : Modified in 10.0.36 +main.ctype_utf8 : Modified in 10.0.36 main.debug_sync : MDEV-10607 - internal error main.derived : Modified in 10.0.36 -main.derived_opt : MDEV-11768 - timeout +main.derived_opt : MDEV-11768 - timeout; modified in 10.0.37 main.events_slowlog : MDEV-12821 - wrong result -main.gis : MDEV-13411 - wrong result on P8 -main.grant : Modified in 10.0.36 +main.func_concat : Modified in 10.0.37 +main.func_isnull : Modified in 10.0.37 +main.func_time : Modified in 10.0.37 +main.gis : MDEV-13411 - wrong result on P8; modified in 10.0.37 +main.grant : Modified in 10.0.37 main.grant2 : Modified in 10.0.36 main.grant_not_windows : Added in 10.0.36 +main.group_min_max : Modified in 10.0.37 main.having : Modified in 10.0.36 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - wrong result main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure main.insert_select : Modified in 10.0.36 -main.join : Modified in 10.0.36 +main.join : Modified in 10.0.37 main.join_cache : Modified in 10.0.36 main.join_outer : Modified in 10.0.36 main.kill_processlist-6619 : MDEV-10793 - wrong result main.limit : Modified in 10.0.36 main.log_tables-big : MDEV-13408 - wrong result +main.lowercase_fs_off : Modified in 10.0.37 main.mdev-504 : MDEV-10607 - sporadic "can't connect" main.mdev375 : MDEV-10607 - sporadic "can't connect" main.merge : MDEV-10607 - sporadic "can't connect" @@ -77,26 +83,32 @@ main.mysqlhotcopy_myisam : MDEV-10995 - test hangs on debug build main.mysqlslap : Modified in 10.0.36 main.mysqltest : MDEV-9269 - fails on Alpha main.mysql_client_test_nonblock : MDEV-15096 - exec failed +main.order_by_zerolength-4285 : Modified in 10.0.37 +main.partition_explicit_prune : Modified in 10.0.37 main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count main.rename : Modified in 10.0.36 main.query_cache_debug : MDEV-15281 - resize or similar command in progress -main.selectivity : Modified in 10.0.36 +main.selectivity : Modified in 10.0.37 main.show_explain : MDEV-10674 - wrong result +main.sp : Modified in 10.0.37 main.sp-innodb : Modified in 10.0.36 main.sp_notembedded : MDEV-10607 - internal error -main.sp-security : MDEV-10607 - sporadic "can't connect" +main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.0.37 main.statistics : Modified in 10.0.36 main.statistics_close : Added in 10.0.36 -main.stat_tables : Modified in 10.0.36 +main.stat_tables : Modified in 10.0.37 main.stat_tables_par_innodb : MDEV-14155 - wrong rounding main.subselect : Modified in 10.0.36 +main.subselect_extra_no_semijoin : Modified in 10.0.37 main.subselect_innodb : MDEV-10614 - sporadic wrong results main.subselect_sj : Modified in 10.0.36 main.subselect_sj_mat : Modified in 10.0.36 main.subselect_sj2_mat : Modified in 10.0.36 main.subselect4 : Modified in 10.0.36 main.tc_heuristic_recover : MDEV-15200 - wrong error on mysqld_stub_cmd -main.type_datetime : MDEV-14322 - wrong result +main.type_datetime : Modified in 10.0.37 +main.type_float : Modified in 10.0.37 +main.type_year : Modified in 10.0.37 main.union : Modified in 10.0.36 main.xa : MDEV-11769 - lock wait timeout @@ -148,14 +160,19 @@ handler.ps : Added in 10.0.36 #---------------------------------------------------------------- heap.heap_auto_increment : Modified in 10.0.36 +heap.heap_btree : Modified in 10.0.37 #---------------------------------------------------------------- +innodb.alter_inplace_perfschema : Added in 10.0.37 innodb.alter_partitioned_xa : Added in 10.0.36 innodb.binlog_consistent : MDEV-10618 - Server fails to start +innodb.foreign-keys : Modified in 10.0.37 +innodb.foreign_key : Added in 10.0.37 innodb.group_commit_crash : MDEV-11770 - checksum mismatch innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - checksum mismatch innodb.innodb-alter : Modified in 10.0.36 +innodb.innodb-alter-debug : Modified in 10.0.37 innodb.innodb-alter-table : MDEV-10619 - Testcase timeout innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan innodb.innodb_bug48024 : MDEV-14352 - Assertion failure @@ -167,9 +184,11 @@ innodb.log_file_size : MDEV-15668 - Not found pattern innodb.recovery_shutdown : MDEV-15671 - Warning: database page corruption innodb.rename_table : Added in 10.0.36 innodb.table_definition_cache_debug : MDEV-14206 - Unexpected warning +innodb.table_flags : Modified in 10.0.37 innodb.xa_recovery : MDEV-15279 - mysqld got exception innodb_fts.basic : Added in 10.0.36 +innodb_fts.fts_kill_query : Modified in 10.0.37 innodb_fts.innodb-fts-fic : MDEV-14154 - Assertion failure innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.sync_ddl : Added in 10.0.36 @@ -177,8 +196,10 @@ innodb_fts.sync_ddl : Added in 10.0.36 #---------------------------------------------------------------- maria.alter : Modified in 10.0.36 +maria.create : Added in 10.0.37 +maria.fulltext2 : Added in 10.0.37 maria.lock : Modified in 10.0.36 -maria.maria : MDEV-14430 - Wrong result; modified in 10.0.36 +maria.maria : MDEV-14430 - Wrong result; modified in 10.0.37 #---------------------------------------------------------------- @@ -205,9 +226,11 @@ parts.partition_auto_increment_archive : MDEV-16491 - Table marked as crashed parts.partition_auto_increment_maria : MDEV-14430 - wrong result parts.partition_exch_qa_10 : MDEV-11765 - wrong result parts.truncate_locked : Added in 10.0.36 +parts.update_and_cache : Added in 10.0.37 #---------------------------------------------------------------- +perfschema.connect_attrs : MDEV-17283 - Wrong result perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x perfschema.hostcache_ipv6_ssl : MDEV-10696 - crash on shutdown @@ -219,7 +242,6 @@ perfschema_stress.* : MDEV-10996 - tests not maintained #---------------------------------------------------------------- plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url, MDEV-11118 - wrong result -plugins.processlist : MDEV-16818 - Added in 10.0.36 plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.0.36 plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc, MDEV-14295 - wrong result @@ -231,11 +253,13 @@ roles.create_and_grant_role : MDEV-11772 - wrong result rpl.last_insert_id : MDEV-10625 - warnings in error log rpl.rename : Added in 10.0.36 +rpl.rpl_15919 : Added in 10.0.37 rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master rpl.rpl_ddl : MDEV-10417 - Fails on Mips +rpl.rpl_foreign_key_innodb : Modified in 10.0.37 rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown rpl.rpl_gtid_until : MDEV-10625 - warnings in error log @@ -244,6 +268,7 @@ rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips +rpl.rpl_lcase_tblnames_rewrite_db : Added in 10.0.37 rpl.rpl_mdev6020 : MDEV-10417 - Timeouts, fails on Mips rpl.rpl_mixed_implicit_commit_binlog : Included file modified in 10.0.36 rpl.rpl_parallel : MDEV-10653 - Timeouts @@ -254,13 +279,16 @@ rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start rpl.rpl_row_implicit_commit_binlog : Included file modified in 10.0.36 rpl.rpl_row_index_choice : MDEV-13409 - Server crash +rpl.rpl_row_lcase_tblnames : Added in 10.0.37 rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_row_spatial : Added in 10.0.37 rpl.rpl_semi_sync : MDEV-11220 - Wrong result rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status rpl.rpl_show_slave_hosts : MDEV-12171 - Server failed to start rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock rpl.rpl_stm_implicit_commit_binlog : Included file modified in 10.0.36 +rpl.rpl_stm_lcase_tblnames : Added in 10.0.37 rpl.rpl_sync : MDEV-10633 - Database page corruption rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries @@ -294,6 +322,8 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #---------------------------------------------------------------- sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x +sys_vars.innodb_ft_result_cache_limit_32 : Added in 10.0.37 +sys_vars.innodb_ft_result_cache_limit_64 : Added in 10.0.37 sys_vars.thread_cache_size_func : MDEV-11775 - wrong result #---------------------------------------------------------------- @@ -314,6 +344,8 @@ tokudb.savepoint-5 : MDEV-15280 - wrong result tokudb_backup.* : MDEV-11001 - tests don't work +tokudb_bugs.PS-3773 : Added in 10.0.37 +tokudb_bugs.alter_table_comment_rebuild_data : Added in 10.0.37 tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output tokudb_bugs.frm_store : MDEV-12823 - Valgrind |