summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-20 09:22:10 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-20 09:22:10 +0300
commit49e5323dbd8a0ab074abdaeb16fe42aa47f4e6b6 (patch)
tree3d55494498a695d00f7b2807db5a7718a1204d6f /mysql-test/suite/maria
parent16ac8404ac4a0b7a7bc260200204e3373476a020 (diff)
parentcfbd714868d6af284f1acfff361c098cbc525fff (diff)
downloadmariadb-git-49e5323dbd8a0ab074abdaeb16fe42aa47f4e6b6.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r--mysql-test/suite/maria/alter.result43
-rw-r--r--mysql-test/suite/maria/alter.test35
-rw-r--r--mysql-test/suite/maria/temporary.result23
-rw-r--r--mysql-test/suite/maria/temporary.test20
4 files changed, 121 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result
index c63688dddd6..c2ddc813cdc 100644
--- a/mysql-test/suite/maria/alter.result
+++ b/mysql-test/suite/maria/alter.result
@@ -47,3 +47,46 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
CREATE TABLE t2 SELECT * FROM t1;
DROP TABLE t1, t2;
+#
+# MDEV-19055 Assertion `(_my_thread_var())->thr_errno != 0' failed in pagecache_read
+#
+CREATE OR REPLACE TABLE t1 (x INT) ENGINE=Aria;
+CREATE TEMPORARY TABLE t2 (a TIME) ENGINE=Aria;
+ALTER TABLE t2 ADD b DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
+ALTER TABLE t2 ADD CHECK (b = 4);
+INSERT IGNORE INTO t2 () VALUES (),(),(),();
+ALTER IGNORE TABLE t2 ADD c INT;
+SELECT count(a),sum(a) FROM t2;
+count(a) sum(a)
+0 NULL
+DELETE FROM t2 ORDER BY c LIMIT 1;
+INSERT IGNORE INTO t2 SELECT * FROM t2;
+OPTIMIZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 optimize status OK
+SELECT count(a),sum(a) FROM t2;
+count(a) sum(a)
+0 NULL
+INSERT IGNORE INTO t2 SELECT * FROM t2;
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+SELECT count(a),sum(a) FROM t2;
+count(a) sum(a)
+0 NULL
+ALTER TABLE t2 CHANGE IF EXISTS d c INT;
+ERROR 22007: Truncated incorrect datetime value: '4'
+SELECT count(a),sum(a) FROM t2;
+count(a) sum(a)
+0 NULL
+ALTER IGNORE TABLE t2 ADD IF NOT EXISTS e BIT;
+ALTER TABLE t1 MODIFY IF EXISTS xx INT;
+INSERT IGNORE INTO t2 () VALUES (),(),(),();
+SELECT count(a),sum(a) FROM t2;
+count(a) sum(a)
+0 NULL
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+check table t2;
+Table Op Msg_type Msg_text
+test.t2 check status OK
+DROP TABLE t1,t2;
diff --git a/mysql-test/suite/maria/alter.test b/mysql-test/suite/maria/alter.test
index 09672cdfa3b..ef21ab2e5d2 100644
--- a/mysql-test/suite/maria/alter.test
+++ b/mysql-test/suite/maria/alter.test
@@ -42,3 +42,38 @@ ALTER TABLE t1 ORDER BY unknown_column;
SHOW CREATE TABLE t1;
CREATE TABLE t2 SELECT * FROM t1;
DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-19055 Assertion `(_my_thread_var())->thr_errno != 0' failed in pagecache_read
+--echo #
+
+--disable_warnings
+CREATE OR REPLACE TABLE t1 (x INT) ENGINE=Aria;
+CREATE TEMPORARY TABLE t2 (a TIME) ENGINE=Aria;
+ALTER TABLE t2 ADD b DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
+ALTER TABLE t2 ADD CHECK (b = 4);
+INSERT IGNORE INTO t2 () VALUES (),(),(),();
+ALTER IGNORE TABLE t2 ADD c INT;
+SELECT count(a),sum(a) FROM t2;
+DELETE FROM t2 ORDER BY c LIMIT 1;
+INSERT IGNORE INTO t2 SELECT * FROM t2;
+OPTIMIZE TABLE t2;
+SELECT count(a),sum(a) FROM t2;
+INSERT IGNORE INTO t2 SELECT * FROM t2;
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+SELECT count(a),sum(a) FROM t2;
+--error ER_TRUNCATED_WRONG_VALUE
+ALTER TABLE t2 CHANGE IF EXISTS d c INT;
+SELECT count(a),sum(a) FROM t2;
+ALTER IGNORE TABLE t2 ADD IF NOT EXISTS e BIT;
+ALTER TABLE t1 MODIFY IF EXISTS xx INT;
+INSERT IGNORE INTO t2 () VALUES (),(),(),();
+SELECT count(a),sum(a) FROM t2;
+--enable_warnings
+check table t1;
+check table t2;
+DROP TABLE t1,t2;
+
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/maria/temporary.result b/mysql-test/suite/maria/temporary.result
new file mode 100644
index 00000000000..2592e04be2b
--- /dev/null
+++ b/mysql-test/suite/maria/temporary.result
@@ -0,0 +1,23 @@
+CREATE TABLE t1 (b INT);
+INSERT INTO t1 VALUES (5);
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=Aria ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1);
+DELETE FROM t1 LIMIT 2;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+SELECT * FROM t1;
+a
+INSERT INTO t1 VALUES (1),(2);
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+ALTER TABLE t1 CHANGE COLUMN IF EXISTS x x INT;
+Warnings:
+Note 1054 Unknown column 'x' in 't1'
+ALTER TABLE t1;
+DROP TEMPORARY TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/maria/temporary.test b/mysql-test/suite/maria/temporary.test
new file mode 100644
index 00000000000..76f8e2526a4
--- /dev/null
+++ b/mysql-test/suite/maria/temporary.test
@@ -0,0 +1,20 @@
+#
+# MDEV-19595
+# ER_CRASHED_ON_USAGE and Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'
+# failed upon actions on temporary Aria table with ROW_FORMAT DYNAMIC
+#
+
+CREATE TABLE t1 (b INT);
+INSERT INTO t1 VALUES (5);
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=Aria ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1);
+DELETE FROM t1 LIMIT 2;
+OPTIMIZE TABLE t1;
+CHECK TABLE t1;
+SELECT * FROM t1;
+INSERT INTO t1 VALUES (1),(2);
+CHECK TABLE t1;
+ALTER TABLE t1 CHANGE COLUMN IF EXISTS x x INT;
+ALTER TABLE t1;
+DROP TEMPORARY TABLE t1;
+DROP TABLE t1;