[MDEV-10390] CREATE OR REPLACE can drop a table Created: 2016-07-18  Updated: 2016-07-18

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.1
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Sergei Golubchik Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

create table t1 (a int);
create or replace table t1 (a blob, index (a));

after the above the table t1 does not exist. But after

create table t1 (a int);
create or replace table t1 (a decimal(200,100));

old table t1 is preserved.

The latter behavior is correct, after create or replace the table must always exist. This can be fixed either the alter table way (create temporary table, rename it over the old one) or by deleting the old table only after all validity checks for a new table have passed.



 Comments   
Comment by Elena Stepanova [ 2016-07-18 ]

Maybe it will also fix MDEV-8062.

Strangely, at some point this behavior (drop but not re-create) was considered expected: MDEV-5589.

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