summaryrefslogtreecommitdiff
path: root/mysql-test/t/create_not_windows.test
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-07-25 14:52:24 +0200
committerunknown <andrey@lmy004.>2006-07-25 14:52:24 +0200
commit7c9d15af31d55f4b96c6470fac76b0fb0672fd50 (patch)
treea3e08e803aa360e113f7deafc7881ab7dc8cba28 /mysql-test/t/create_not_windows.test
parentd090462abc2925a22a4d2dee4c87d679a9ad32f1 (diff)
downloadmariadb-git-7c9d15af31d55f4b96c6470fac76b0fb0672fd50.tar.gz
Fix for bug#16532 mysql server assert in debug if table definition is removed
Emit an error instead of doing ASSERT mysql-test/r/create_not_windows.result: update result mysql-test/t/create_not_windows.test: Add test case for bug #16532: mysql server assert in debug if table definition is removed sql/sql_table.cc: it could happen that an user deletes the frm file on OS level. In addition if the table was already opened, the file system level check for existance of table.frm will pass but get_cached_table_share() will return non-NULL value. In this case we will emit the standard error that the table exist. The error case is quite obscure but error message is better than a sigabort.
Diffstat (limited to 'mysql-test/t/create_not_windows.test')
-rw-r--r--mysql-test/t/create_not_windows.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/create_not_windows.test b/mysql-test/t/create_not_windows.test
index 71ad9ccd7fe..2c1700d9e49 100644
--- a/mysql-test/t/create_not_windows.test
+++ b/mysql-test/t/create_not_windows.test
@@ -18,3 +18,24 @@ show create table `about:text`;
drop table `about:text`;
# End of 5.0 tests
+
+#
+# Bug#16532:mysql server assert in debug if table det is removed
+#
+use test;
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1(a int) engine=myisam;
+insert into t1 values(1);
+--system rm -f $MYSQLTEST_VARDIR/master-data/test/t1.frm
+--echo "We get an error because the table is in the definition cache"
+--error ER_TABLE_EXISTS_ERROR
+create table t1(a int, b int);
+--echo "Flush the cache and recreate the table anew to be able to drop it"
+flush tables;
+show open tables like "t%";
+create table t1(a int, b int, c int);
+--echo "Try to select from the table. This should not crash the server"
+select count(a) from t1;
+drop table t1;