diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-21 14:02:04 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-21 14:02:04 +0300 |
commit | 620ea816adeceaba7c875679ab8505f4c07a22b8 (patch) | |
tree | a52749e4f0c1fd07bc9f0c2a1159706a4e7789c3 /mysql-test/t | |
parent | a1b6691f93e50ad4a8a53dbf89ba578d6a64b2cb (diff) | |
parent | b4c225ac354686242b5336da84b7a758640936bd (diff) | |
download | mariadb-git-620ea816adeceaba7c875679ab8505f4c07a22b8.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/aria_icp_debug.result | 34 | ||||
-rw-r--r-- | mysql-test/t/aria_icp_debug.test | 5 | ||||
-rw-r--r-- | mysql-test/t/innodb_icp_debug.result | 34 | ||||
-rw-r--r-- | mysql-test/t/innodb_icp_debug.test | 6 | ||||
-rw-r--r-- | mysql-test/t/limit_rows_examined.test | 17 | ||||
-rw-r--r-- | mysql-test/t/log_tables.test | 20 | ||||
-rw-r--r-- | mysql-test/t/myisam_icp_debug.result | 32 | ||||
-rw-r--r-- | mysql-test/t/myisam_icp_debug.test | 1 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 16 |
9 files changed, 164 insertions, 1 deletions
diff --git a/mysql-test/t/aria_icp_debug.result b/mysql-test/t/aria_icp_debug.result new file mode 100644 index 00000000000..fc01ee4fb3b --- /dev/null +++ b/mysql-test/t/aria_icp_debug.result @@ -0,0 +1,34 @@ +set default_storage_engine=aria; +drop table if exists t0,t1,t2; +create table t0(a int primary key); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int primary key); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 ( +kp1 int, +kp2 int, +col char(100), +key(kp1, kp2) +); +insert into t2 select a, a, a from t1; +select engine from information_schema.tables +where table_schema=database() and table_name='t2'; +engine +Aria +explain +select * from t2 where kp1 between 10 and 20 and kp2 +1 >100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range kp1 kp1 5 NULL 10 Using index condition +set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go'; +select * from t2 where kp1 between 10 and 20 and kp2 +1 >100; +connect con1, localhost, root,,; +connection con1; +set debug_sync='now WAIT_FOR at_icp_check'; +kill query $target_id; +set debug_sync='now SIGNAL go'; +connection default; +ERROR 70100: Query execution was interrupted +set debug_sync='RESET'; +disconnect con1; +drop table t0,t1,t2; +set default_storage_engine=default; diff --git a/mysql-test/t/aria_icp_debug.test b/mysql-test/t/aria_icp_debug.test new file mode 100644 index 00000000000..bbdd59d6012 --- /dev/null +++ b/mysql-test/t/aria_icp_debug.test @@ -0,0 +1,5 @@ + +set default_storage_engine=aria; +--source include/icp_debug_kill.inc +set default_storage_engine=default; + diff --git a/mysql-test/t/innodb_icp_debug.result b/mysql-test/t/innodb_icp_debug.result new file mode 100644 index 00000000000..5a169650c8e --- /dev/null +++ b/mysql-test/t/innodb_icp_debug.result @@ -0,0 +1,34 @@ +set default_storage_engine=innodb; +drop table if exists t0,t1,t2; +create table t0(a int primary key); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int primary key); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 ( +kp1 int, +kp2 int, +col char(100), +key(kp1, kp2) +); +insert into t2 select a, a, a from t1; +select engine from information_schema.tables +where table_schema=database() and table_name='t2'; +engine +InnoDB +explain +select * from t2 where kp1 between 10 and 20 and kp2 +1 >100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range kp1 kp1 5 NULL 11 Using index condition +set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go'; +select * from t2 where kp1 between 10 and 20 and kp2 +1 >100; +connect con1, localhost, root,,; +connection con1; +set debug_sync='now WAIT_FOR at_icp_check'; +kill query $target_id; +set debug_sync='now SIGNAL go'; +connection default; +ERROR 70100: Query execution was interrupted +set debug_sync='RESET'; +disconnect con1; +drop table t0,t1,t2; +set default_storage_engine=default; diff --git a/mysql-test/t/innodb_icp_debug.test b/mysql-test/t/innodb_icp_debug.test new file mode 100644 index 00000000000..4aa08c61e87 --- /dev/null +++ b/mysql-test/t/innodb_icp_debug.test @@ -0,0 +1,6 @@ +--source include/have_innodb.inc + +set default_storage_engine=innodb; +--source include/icp_debug_kill.inc +set default_storage_engine=default; + diff --git a/mysql-test/t/limit_rows_examined.test b/mysql-test/t/limit_rows_examined.test index 28b39a4caa1..4ccf25dc17a 100644 --- a/mysql-test/t/limit_rows_examined.test +++ b/mysql-test/t/limit_rows_examined.test @@ -577,3 +577,20 @@ EXECUTE ps; drop view v; drop table t1, t2; + +--echo # +--echo # 10.1 Test +--echo # +--echo # MDEV-17729: Assertion `! is_set() || m_can_overwrite_status' +--echo # failed in Diagnostics_area::set_error_status +--echo # +set @old_mode= @@sql_mode; + +CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,k INT, c CHAR(20)); +INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'); + +SET @@sql_mode='STRICT_TRANS_TABLES'; +INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2; + +SET @@sql_mode=@old_mode; +DROP TABLE t1; diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 1146611ac6c..6e02b80caef 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -54,7 +54,7 @@ select * from general_log where argument like '%general_log%'; # # Check some basic queries interfering with the log tables. -# In our test we'll use a tbale with verbose comments to the short +# In our test we'll use a table with verbose comments to the short # command type names, used in the tables # @@ -475,6 +475,24 @@ drop table slow_log_new, general_log_new; use test; # +# Bug#69953 / MDEV-4851 +# Log tables should be modifable on LOG_OUTPUT != TABLE +# +# + +SET GLOBAL LOG_OUTPUT = 'FILE'; +SET GLOBAL slow_query_log = 1; +SET GLOBAL general_log = 1; + +ALTER TABLE mysql.slow_log ADD COLUMN comment_text TEXT NOT NULL; +ALTER TABLE mysql.general_log ADD COLUMN comment_text TEXT NOT NULL; + +SET GLOBAL LOG_OUTPUT = 'NONE'; +ALTER TABLE mysql.slow_log DROP COLUMN comment_text; +ALTER TABLE mysql.general_log DROP COLUMN comment_text; + + +# # Bug#27857 (Log tables supplies the wrong value for generating # AUTO_INCREMENT numbers) # diff --git a/mysql-test/t/myisam_icp_debug.result b/mysql-test/t/myisam_icp_debug.result new file mode 100644 index 00000000000..cb45a0e2274 --- /dev/null +++ b/mysql-test/t/myisam_icp_debug.result @@ -0,0 +1,32 @@ +drop table if exists t0,t1,t2; +create table t0(a int primary key); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1(a int primary key); +insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t2 ( +kp1 int, +kp2 int, +col char(100), +key(kp1, kp2) +); +insert into t2 select a, a, a from t1; +select engine from information_schema.tables +where table_schema=database() and table_name='t2'; +engine +MyISAM +explain +select * from t2 where kp1 between 10 and 20 and kp2 +1 >100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range kp1 kp1 5 NULL 11 Using index condition +set debug_sync='handler_index_cond_check SIGNAL at_icp_check WAIT_FOR go'; +select * from t2 where kp1 between 10 and 20 and kp2 +1 >100; +connect con1, localhost, root,,; +connection con1; +set debug_sync='now WAIT_FOR at_icp_check'; +kill query $target_id; +set debug_sync='now SIGNAL go'; +connection default; +ERROR 70100: Query execution was interrupted +set debug_sync='RESET'; +disconnect con1; +drop table t0,t1,t2; diff --git a/mysql-test/t/myisam_icp_debug.test b/mysql-test/t/myisam_icp_debug.test new file mode 100644 index 00000000000..d5b1af799fa --- /dev/null +++ b/mysql-test/t/myisam_icp_debug.test @@ -0,0 +1 @@ +--source include/icp_debug_kill.inc diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23f3fa0b4d8..b82485dfc5c 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -2999,5 +2999,21 @@ select id from t1 where data = 'ab' order by id; drop table t1; --echo # +--echo # MDEV-5628: Assertion `! is_set()' or `!is_set() || +--echo # (m_status == DA_OK_BULK && is_bulk_op())' fails on UPDATE on a +--echo # partitioned table with subquery (MySQL:71630) +--echo # + +CREATE TABLE t1 (a INT) PARTITION BY HASH(a) PARTITIONS 2; + +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(2); + +--error ER_SUBQUERY_NO_1_ROW +UPDATE t1 SET a = 7 WHERE a = ( SELECT b FROM t2 ) ORDER BY a LIMIT 6; + +DROP TABLE t1,t2; + +--echo # --echo # End of 10.1 tests --echo # |