summaryrefslogtreecommitdiff
path: root/mysql-test/main/reopen_temp_table.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-12 14:26:34 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-12 14:26:34 +0200
commitb32bc70e340b5b0d8fcb9aa48b1b875f3f2f12dc (patch)
tree4edd8565c6eb0b1139cbb37c48f4d5f5a28798be /mysql-test/main/reopen_temp_table.test
parentf010c90807da68487b1ce4c952588c6c3def2afd (diff)
parentf72760df3390407c3cbe876e827818bc52849b71 (diff)
downloadmariadb-git-b32bc70e340b5b0d8fcb9aa48b1b875f3f2f12dc.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main/reopen_temp_table.test')
-rw-r--r--mysql-test/main/reopen_temp_table.test40
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/main/reopen_temp_table.test b/mysql-test/main/reopen_temp_table.test
index 2aa6caa1655..2b3ff3bab5e 100644
--- a/mysql-test/main/reopen_temp_table.test
+++ b/mysql-test/main/reopen_temp_table.test
@@ -182,3 +182,43 @@ DROP TABLE t;
--echo # Cleanup
DROP DATABASE temp_db;
+USE test;
+
+#
+# MDEV-17070 Table corruption or Assertion `table->file->stats.records > 0 || error' or Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon actions on temporary table
+#
+create temporary table t1 (f char(255), b int, index(b)) engine=MyISAM;
+replace into t1 values (null,1),(null,2);
+alter table t1 add fulltext key(f);
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 change if exists a b int, algorithm=inplace;
+check table t1;
+select * from t1;
+drop table t1;
+
+create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=1;
+replace into t1 values (null,1),(null,2);
+alter table t1 add fulltext key(f);
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 change if exists a b int, algorithm=inplace;
+check table t1;
+select * from t1;
+drop table t1;
+
+create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=0 row_format=page;
+replace into t1 values (null,1),(null,2);
+alter table t1 add fulltext key(f);
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 change if exists a b int, algorithm=inplace;
+check table t1;
+select * from t1;
+drop table t1;
+
+create temporary table t1 (f char(255), b int, index(b)) engine=aria transactional=0 row_format=dynamic;
+replace into t1 values (null,1),(null,2);
+alter table t1 add fulltext key(f);
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 change if exists a b int, algorithm=inplace;
+check table t1;
+select * from t1;
+drop table t1;