diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 14:49:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 14:49:17 +0200 |
commit | 533a13af069d8c9e6c5f4e1a72851497185ade03 (patch) | |
tree | 4623752e0c114e582fbbc0afcc02b67dede26b50 /mysql-test/suite/maria | |
parent | 4b3690b50433a169d9feed5dc45044a8934b5582 (diff) | |
parent | e6290a8270daf884f551230307225b358939bfab (diff) | |
download | mariadb-git-533a13af069d8c9e6c5f4e1a72851497185ade03.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r-- | mysql-test/suite/maria/create.result | 44 | ||||
-rw-r--r-- | mysql-test/suite/maria/create.test | 55 |
2 files changed, 99 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/create.result b/mysql-test/suite/maria/create.result index 82c6b8c9871..f1da0d7105b 100644 --- a/mysql-test/suite/maria/create.result +++ b/mysql-test/suite/maria/create.result @@ -31,3 +31,47 @@ select * from t2; f1 f2 3 qux DROP TABLE t1, t2; +# +# MDEV-23159 Assertion `table_share->tmp_table != NO_TMP_TABLE || +# m_lock_type != 2' + SIGSEGV in trnman_can_read_from +# (on optimized builds) +# +SET @org_sql_mode=@@SQL_MODE; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Aria ROW_FORMAT=COMPRESSED; +INSERT INTO t1 VALUES(1); +CREATE TEMPORARY TABLE t2(b INT); +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT MAX(a) FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 Using index +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +DROP TABLE t1,t2; +SET SQL_MODE=''; +CREATE TABLE t1 (c INT PRIMARY KEY) ENGINE=Aria; +CREATE TABLE t2 (d INT); +INSERT INTO t1 VALUES (1); +SELECT c FROM t1 WHERE (c) IN (SELECT MIN(c) FROM t2); +c +DROP TABLE t1,t2; +USE test; +SET SQL_MODE='ONLY_FULL_GROUP_BY'; +CREATE TABLE t3 (c1 DECIMAL(1,1) PRIMARY KEY,c2 DATE,c3 NUMERIC(10) UNSIGNED) ENGINE=Aria; +CREATE TABLE t2 (f1 INTEGER ) ENGINE=Aria; +INSERT INTO t3 VALUES (0,0,0); +SELECT c1 FROM t3 WHERE (c1) IN (SELECT MIN(DISTINCT c1) FROM t2); +c1 +DROP TABLE t2,t3; +SET @@SQL_MODE=@org_sql_mode; +# +# MDEV-23222 SIGSEGV in maria_status | Assertion `(longlong) +# thd->status_var.local_memory_used >= 0 +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = 'MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1;; +flush tables; +CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = 'MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1;; +Got one of the listed errors +DROP TABLE t1; +# +# End of 10.3 tests +# diff --git a/mysql-test/suite/maria/create.test b/mysql-test/suite/maria/create.test index 8f2ffd7492f..cac1f8bd7e1 100644 --- a/mysql-test/suite/maria/create.test +++ b/mysql-test/suite/maria/create.test @@ -40,3 +40,58 @@ 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; + +--echo # +--echo # MDEV-23159 Assertion `table_share->tmp_table != NO_TMP_TABLE || +--echo # m_lock_type != 2' + SIGSEGV in trnman_can_read_from +--echo # (on optimized builds) +--echo # + +SET @org_sql_mode=@@SQL_MODE; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Aria ROW_FORMAT=COMPRESSED; +INSERT INTO t1 VALUES(1); +CREATE TEMPORARY TABLE t2(b INT); +EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT MAX(a) FROM t2); +DROP TABLE t1,t2; + +SET SQL_MODE=''; +CREATE TABLE t1 (c INT PRIMARY KEY) ENGINE=Aria; +CREATE TABLE t2 (d INT); +INSERT INTO t1 VALUES (1); +SELECT c FROM t1 WHERE (c) IN (SELECT MIN(c) FROM t2); +DROP TABLE t1,t2; + +USE test; +SET SQL_MODE='ONLY_FULL_GROUP_BY'; +CREATE TABLE t3 (c1 DECIMAL(1,1) PRIMARY KEY,c2 DATE,c3 NUMERIC(10) UNSIGNED) ENGINE=Aria; +CREATE TABLE t2 (f1 INTEGER ) ENGINE=Aria; +INSERT INTO t3 VALUES (0,0,0); +SELECT c1 FROM t3 WHERE (c1) IN (SELECT MIN(DISTINCT c1) FROM t2); +DROP TABLE t2,t3; +SET @@SQL_MODE=@org_sql_mode; + +--echo # +--echo # MDEV-23222 SIGSEGV in maria_status | Assertion `(longlong) +--echo # thd->status_var.local_memory_used >= 0 +--echo # + +let $mysqld_datadir= `select @@datadir`; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +--eval CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = '$MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1; +flush tables; +--remove_file $mysqld_datadir/test/MDEV_23222.frm +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +--error 1,ER_TABLE_EXISTS_ERROR +--eval CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = '$MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1; +DROP TABLE t1; +--disable_warnings +--remove_file $mysqld_datadir/test/MDEV_23222.MAD +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +--remove_file $MYSQL_TMP_DIR/MDEV_23222.MAD +--enable_warnings + +--echo # +--echo # End of 10.3 tests +--echo # |