#At file:///Users/joh/z/mysql-next-bugfixing/ based on revid:mats@stripped
2798 Jon Olav Hauglid 2009-08-26
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().
modified:
mysql-test/r/lowercase_table2.result
mysql-test/t/lowercase_table2.test
=== modified file 'mysql-test/r/lowercase_table2.result'
--- a/mysql-test/r/lowercase_table2.result 2009-05-15 08:00:35 +0000
+++ b/mysql-test/r/lowercase_table2.result 2009-08-26 11:56:48 +0000
@@ -228,10 +228,9 @@ Database Table In_use Name_locked
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
@@ -245,7 +244,7 @@ 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);
=== modified file 'mysql-test/t/lowercase_table2.test'
--- a/mysql-test/t/lowercase_table2.test 2009-05-15 08:00:35 +0000
+++ b/mysql-test/t/lowercase_table2.test 2009-08-26 11:56:48 +0000
@@ -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
@@ -217,7 +216,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--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_TABLE_EXISTS_ERROR
+--error ER_FILE_NOT_FOUND
create table t_bug44738_UPPERCASE (i int);
--echo # And should succeed after FLUSH TABLES.
flush tables;
Attachment: [text/bzr-bundle] bzr/jon.hauglid@sun.com-20090826115648-5vtj0mqj4767q00v.bundle
| Thread |
|---|
| • bzr commit into mysql-5.4 branch (jon.hauglid:2798) Bug#42546 | Jon Olav Hauglid | 26 Aug |