diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index cf87fd1b5a4..b621a466a29 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -226,10 +226,9 @@ drop table t_bug44738_UPPERCASE; create table t_bug44738_UPPERCASE (i int); drop table t_bug44738_UPPERCASE; # Finally, let us check that another issue which was exposed by -# the original test case is solved. I.e. that fuse in CREATE TABLE -# which ensures that table is not created if there is an entry for -# it in TDC even though it was removed from disk uses normalized -# version of the table name. +# the original test case is solved. I.e. that the table is not +# created if there is an entry for it in TDC even though it was +# removed from disk. create table t_bug44738_UPPERCASE (i int) engine = myisam; # Load table definition in TDC. select table_schema, table_name, table_comment from information_schema.tables @@ -237,10 +236,13 @@ where table_schema = 'test' and table_name like 't_bug44738_%'; table_schema table_name table_comment test t_bug44738_UPPERCASE # Simulate manual removal of the table. -# After manual removal of table still there should be an entry for table -# in TDC so attempt to create table with the same name should fail. +# Check that still there is an entry for table in TDC. +show open tables like 't_bug44738_%'; +Database Table In_use Name_locked +test t_bug44738_uppercase 0 0 +# So attempt to create table with the same name should fail. create table t_bug44738_UPPERCASE (i int); -ERROR 42S01: Table 't_bug44738_uppercase' already exists +ERROR HY000: Can't find file: 't_bug44738_uppercase' (errno: 2) # And should succeed after FLUSH TABLES. flush tables; create table t_bug44738_UPPERCASE (i int); 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;