summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria/alter.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/maria/alter.test')
-rw-r--r--mysql-test/suite/maria/alter.test35
1 files changed, 35 insertions, 0 deletions
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
+#