[MDEV-3947] CREATE TABLE IF NOT EXISTS throws an error instead of warning if the table is locked Created: 2012-12-17  Updated: 2012-12-18  Resolved: 2012-12-18

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.29
Fix Version/s: 5.5.29

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-3941 CREATE TABLE xxx IF NOT EXISTS should... Closed

 Description   

The following test case

create table t1 (i int);
lock table t1 read;
 
--connect (con1,localhost,root,,)
# Should produce warning 1050 "Table '<name>' already exists"
create table if not exists t1 (j int);
--disconnect con1
 
--connection default
unlock tables;
drop table t1;
 

fails with an error:

mysqltest: At line 6: query 'create table if not exists t1 (j int)' failed: 1050: Table 't1' already exists

It's a serious change in behavior which most likely won't be welcome in a GA version.

branch: maria/5.5
revision-id: timour@askmonty.org-20121217132358-6af27lb65kf5kwf2
date: 2012-12-17 15:23:58 +0200
build-date: 2012-12-18 00:25:33 +0400
revno: 3596



 Comments   
Comment by Michael Widenius [ 2012-12-18 ]

Fixed

Generated at Thu Feb 08 06:52:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.