[MDEV-4955] discover of table non-existance on CREATE Created: 2013-08-27  Updated: 2014-02-28  Resolved: 2014-02-28

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.4
Fix Version/s: 10.0.7, 10.0.9

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

Discovery of table non-existance does not work for CREATE TABLE:

create table t1 (a int) engine=archive;
select * from t1;
flush tables;
remove_file $mysqld_datadir/test/t1.ARZ;
create table t1 (a int) engine=archive;

This fails with very unexpected 1146: Table 'test.t1' doesn't exist



 Comments   
Comment by Michael Widenius [ 2014-01-09 ]

After implementing CREATE .. REPLACE and cleaning up the CREATE TABLE code so that we don't open the table anymore, the error for the above has changed to:

Table 't1' already exists.

This should be ok as the create can't go forward if the .frm already exists.

If the .frm is also deleted then the CREATE will succeed.

In case of discovery, it will happen on the next usage of the table.

Comment by Sergei Golubchik [ 2014-01-09 ]

I don't understand. The bug is fixed and closed. There is no error anymore in test case above.
Have you reintroduced the error?

Comment by Sergei Golubchik [ 2014-01-16 ]

When CREATE-OR-REPLACE (MDEV-5491) is pushed, this will need to be fixed again

Generated at Thu Feb 08 07:00:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.