summaryrefslogtreecommitdiff
path: root/mysql-test/t/lowercase_table2.test
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2009-12-10 12:46:16 +0100
committerJon Olav Hauglid <jon.hauglid@sun.com>2009-12-10 12:46:16 +0100
commit84e35f5e1c627a7129b3a4d79140219de81acb1e (patch)
treed574ec46241c8a5fc3246ccef5826bd00ddbe170 /mysql-test/t/lowercase_table2.test
parent5e1dfa4c066ec0e48a725b4976bdb5aa09c79685 (diff)
downloadmariadb-git-84e35f5e1c627a7129b3a4d79140219de81acb1e.tar.gz
Backport of revno: 2617.68.3
Followup to Bug#42546 Backup: RESTORE fails, thinking it finds an existing table This patch updates lowercase_table2.test with the changed error message CREATE TABLE produces if it fails because it finds an matching TABLE_SHARE in the TDC even if the .FRM/.MYD has been removed from disk. With the changes introduced in Bug#42546, CREATE TABLE uses open_tables() which will find the TDC entry and fail in open_table_from_share() with ER_FILE_NOT_FOUND. Before, CREATE TABLE would not use open_tables() and fail with ER_TABLE_EXISTS_ERROR upon finding the TDC entry in mysql_create_table_no_lock().
Diffstat (limited to 'mysql-test/t/lowercase_table2.test')
-rw-r--r--mysql-test/t/lowercase_table2.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/mysql-test/t/lowercase_table2.test b/mysql-test/t/lowercase_table2.test
index 92add60616a..b8c7f532cde 100644
--- a/mysql-test/t/lowercase_table2.test
+++ b/mysql-test/t/lowercase_table2.test
@@ -201,10 +201,9 @@ create table t_bug44738_UPPERCASE (i int);
drop table t_bug44738_UPPERCASE;
--echo # Finally, let us check that another issue which was exposed by
---echo # the original test case is solved. I.e. that fuse in CREATE TABLE
---echo # which ensures that table is not created if there is an entry for
---echo # it in TDC even though it was removed from disk uses normalized
---echo # version of the table name.
+--echo # the original test case is solved. I.e. that the table is not
+--echo # created if there is an entry for it in TDC even though it was
+--echo # removed from disk.
create table t_bug44738_UPPERCASE (i int) engine = myisam;
--echo # Load table definition in TDC.
select table_schema, table_name, table_comment from information_schema.tables
@@ -214,9 +213,10 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--remove_file $MYSQLD_DATADIR/test/t_bug44738_UPPERCASE.frm
--remove_file $MYSQLD_DATADIR/test/t_bug44738_UPPERCASE.MYD
--remove_file $MYSQLD_DATADIR/test/t_bug44738_UPPERCASE.MYI
---echo # After manual removal of table still there should be an entry for table
---echo # in TDC so attempt to create table with the same name should fail.
---error ER_TABLE_EXISTS_ERROR
+--echo # Check that still there is an entry for table in TDC.
+show open tables like 't_bug44738_%';
+--echo # So attempt to create table with the same name should fail.
+--error ER_FILE_NOT_FOUND
create table t_bug44738_UPPERCASE (i int);
--echo # And should succeed after FLUSH TABLES.
flush tables;