summaryrefslogtreecommitdiff
path: root/mysql-test/main/temp_table.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-02 06:17:51 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-02 06:17:51 +0300
commit1df1a6392477ad211b2a66c6eccbe9d5c6316c7e (patch)
tree7f38ad7d6e69ea53fb9c887ff9aaa953f103ea54 /mysql-test/main/temp_table.test
parent6d3747a294d75ab8153f82c5b2d61c3bf17b04de (diff)
parentdba7e1e8e14254c9de61e74b7e68cdbbad0038a8 (diff)
downloadmariadb-git-1df1a6392477ad211b2a66c6eccbe9d5c6316c7e.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main/temp_table.test')
-rw-r--r--mysql-test/main/temp_table.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test
index bd3bba34f89..dc5fe7f3cd0 100644
--- a/mysql-test/main/temp_table.test
+++ b/mysql-test/main/temp_table.test
@@ -639,3 +639,22 @@ ALTER TABLE t1 CHANGE no_such_col1 col1 BIGINT NULL;
# was not dropped during the first TRUNCATE due to extra table handles.
TRUNCATE TABLE t1;
DROP TEMPORARY TABLE t1;
+
+--echo #
+--echo # MDEV-21695 Server crashes in TABLE::evaluate_update_default_function upon UPDATE on temporary table
+--echo #
+
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30');
+CREATE TEMPORARY TABLE t1 (a DATETIME ON UPDATE CURRENT_TIMESTAMP);
+ALTER TABLE t1 ADD b INT;
+INSERT INTO t1 (b) VALUES (1),(2);
+--error ER_BAD_FIELD_ERROR
+ALTER TABLE t1 CHANGE COLUMN x xx INT;
+UPDATE t1 SET b = 3;
+SELECT * FROM t1;
+DROP TEMPORARY TABLE t1;
+
+
+--echo #
+--echo # End of 10.2 tests
+--echo #