summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-10 13:01:42 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-10 13:01:42 +0200
commit9b1824dcd2564c803e58d02ac63b49ec68bd60d2 (patch)
treebeef3faf3e0e6b8264014a0cfb735d4a32be6cbc /mysql-test/t
parent92a13148e80c30422ae5460032169cbe1946fa6d (diff)
parentff579bc814551026a3271fac274f560cef3f523f (diff)
downloadmariadb-git-9b1824dcd2564c803e58d02ac63b49ec68bd60d2.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/assign_key_cache.test13
-rw-r--r--mysql-test/t/assign_key_cache_debug.test (renamed from mysql-test/t/assign_key_cache-5405.test)0
-rw-r--r--mysql-test/t/connect_debug.test12
-rw-r--r--mysql-test/t/sp-innodb.test42
-rw-r--r--mysql-test/t/subselect_sj.test30
5 files changed, 97 insertions, 0 deletions
diff --git a/mysql-test/t/assign_key_cache.test b/mysql-test/t/assign_key_cache.test
new file mode 100644
index 00000000000..401e7bf9138
--- /dev/null
+++ b/mysql-test/t/assign_key_cache.test
@@ -0,0 +1,13 @@
+#
+# MDEV-15216 Assertion `! is_set() || m_can_overwrite_status' failed in Diagnostics_area::set_error_status upon operation inside XA
+#
+--source include/have_partition.inc
+set global my_cache.key_buffer_size = 1024*1024;
+create table t1 (i int) engine=myisam partition by hash (i) partitions 2;
+xa start 'xid';
+cache index t1 partition (non_existing_partition) in my_cache;
+cache index t1 partition (p1) in my_cache;
+xa end 'xid';
+xa rollback 'xid';
+drop table t1;
+set global my_cache.key_buffer_size = 0;
diff --git a/mysql-test/t/assign_key_cache-5405.test b/mysql-test/t/assign_key_cache_debug.test
index 2839e040bd3..2839e040bd3 100644
--- a/mysql-test/t/assign_key_cache-5405.test
+++ b/mysql-test/t/assign_key_cache_debug.test
diff --git a/mysql-test/t/connect_debug.test b/mysql-test/t/connect_debug.test
new file mode 100644
index 00000000000..299b605b2cd
--- /dev/null
+++ b/mysql-test/t/connect_debug.test
@@ -0,0 +1,12 @@
+source include/have_debug.inc;
+set @old_dbug=@@global.debug_dbug;
+
+#
+# use after free if need plugin change and auth aborted
+#
+set global debug_dbug='+d,auth_disconnect';
+create user 'bad' identified by 'worse';
+--error 1
+--exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse
+set global debug_dbug=@old_dbug;
+drop user bad;
diff --git a/mysql-test/t/sp-innodb.test b/mysql-test/t/sp-innodb.test
index 23715166a02..e44a853e713 100644
--- a/mysql-test/t/sp-innodb.test
+++ b/mysql-test/t/sp-innodb.test
@@ -158,5 +158,47 @@ SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved;
--echo # BUG 16041903: End of test case
--echo #
+--echo #
+--echo # MDEV-15035: SP using query with outer join and a parameter
+--echo # in ON expression
+--echo #
+
+CREATE TABLE t1 (
+ id int NOT NULL,
+ PRIMARY KEY (id)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (1), (2);
+
+CREATE TABLE t2 (
+ id int NOT NULL,
+ id_foo int NOT NULL,
+ PRIMARY KEY (id)
+) ENGINE=InnoDB;
+
+INSERT INTO t2 VALUES (1, 1);
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS test_proc;
+--enable_warnings
+
+DELIMITER |;
+CREATE PROCEDURE test_proc(IN param int)
+LANGUAGE SQL
+READS SQL DATA
+BEGIN
+ SELECT DISTINCT f.id
+ FROM t1 f
+ LEFT OUTER JOIN t2 b ON b.id_foo = f.id
+ WHERE (param <> 0 OR b.id IS NOT NULL);
+END|
+DELIMITER ;|
+
+CALL test_proc(0);
+CALL test_proc(1);
+
+DROP PROCEDURE IF EXISTS test_proc;
+DROP TABLE t1, t2;
+
# Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index f90f1e2e927..623e414310a 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2845,5 +2845,35 @@ eval EXPLAIN EXTENDED $q2;
DROP TABLE t1,t2,t3,t4;
+--echo #
+--echo # MDEV-13699: Assertion `!new_field->field_name.str ||
+--echo # strlen(new_field->field_name.str) == new_field->field_name.length'
+--echo # failed in create_tmp_table on 2nd execution of PS with semijoin
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (3),(4);
+
+CREATE TABLE t3 (c INT);
+CREATE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
+INSERT INTO t3 VALUES (5),(6);
+
+PREPARE stmt FROM
+ "SELECT * FROM t1
+ WHERE EXISTS (
+ SELECT * FROM t2 WHERE t1.a IN ( SELECT c AS fld FROM v3 )
+ )";
+EXECUTE stmt;
+EXECUTE stmt;
+EXECUTE stmt;
+
+drop view v3;
+drop table t1,t2,t3;
+
+--echo # End of 5.5 test
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;