diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-14 18:10:06 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-14 18:10:06 +0300 |
commit | 73e038520f3ee70f7ad575283f4c368eba3104aa (patch) | |
tree | b54fb8d053f76e89b9b8395e8df77e8c5e883a82 /mysql-test/main | |
parent | 874f8f30f2319166ff08509937d4eab366607c6b (diff) | |
parent | 409e210e74a6dc7a6e267c71ab32677b2bf12103 (diff) | |
download | mariadb-git-73e038520f3ee70f7ad575283f4c368eba3104aa.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/temp_table.result | 12 | ||||
-rw-r--r-- | mysql-test/main/temp_table.test | 16 |
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/main/temp_table.result b/mysql-test/main/temp_table.result index 5de86e47fb1..69f3b8e5155 100644 --- a/mysql-test/main/temp_table.result +++ b/mysql-test/main/temp_table.result @@ -572,3 +572,15 @@ LOCK TABLES t2 WRITE; TRUNCATE TABLE t1; UNLOCK TABLES; DROP TABLE t1, t2; +# +# MDEV-19449 1030: Got error 168 "Unknown (generic) error from engine" +# for valid TRUNCATE (temporary) TABLE +# +CREATE TEMPORARY TABLE t1 (col1 BIGINT) ENGINE = InnoDB; +INSERT INTO t1 (no_such_col) SELECT * FROM t1; +ERROR 42S22: Unknown column 'no_such_col' in 'field list' +TRUNCATE TABLE t1; +ALTER TABLE t1 CHANGE no_such_col1 col1 BIGINT NULL; +ERROR 42S22: Unknown column 'no_such_col1' in 't1' +TRUNCATE TABLE t1; +DROP TEMPORARY TABLE t1; diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test index a1e61b31a82..bd3bba34f89 100644 --- a/mysql-test/main/temp_table.test +++ b/mysql-test/main/temp_table.test @@ -623,3 +623,19 @@ TRUNCATE TABLE t1; UNLOCK TABLES; DROP TABLE t1, t2; + +--echo # +--echo # MDEV-19449 1030: Got error 168 "Unknown (generic) error from engine" +--echo # for valid TRUNCATE (temporary) TABLE +--echo # + +CREATE TEMPORARY TABLE t1 (col1 BIGINT) ENGINE = InnoDB; +--error ER_BAD_FIELD_ERROR +INSERT INTO t1 (no_such_col) SELECT * FROM t1; +TRUNCATE TABLE t1; +--error ER_BAD_FIELD_ERROR +ALTER TABLE t1 CHANGE no_such_col1 col1 BIGINT NULL; +# This would wrongly try to re-truncate the old copy of the table that +# was not dropped during the first TRUNCATE due to extra table handles. +TRUNCATE TABLE t1; +DROP TEMPORARY TABLE t1; |