summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria/alter.test
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/alter.test
parent16ac8404ac4a0b7a7bc260200204e3373476a020 (diff)
parentcfbd714868d6af284f1acfff361c098cbc525fff (diff)
downloadmariadb-git-49e5323dbd8a0ab074abdaeb16fe42aa47f4e6b6.tar.gz
Merge 10.4 into 10.5
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
+#