[MDEV-29772] CREATE OR REPLACE not atomic for sequences (a.k.a tables with SEQUENCE=1) Created: 2022-10-11  Updated: 2022-10-14  Resolved: 2022-10-14

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Create Table, Sequences
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Not a Bug Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-25292 Atomic CREATE OR REPLACE TABLE Stalled
Relates
relates to MDEV-29798 Document atomic CREATE OR REPLACE Open

 Description   

This may be an expected limitation, in this case specify it for further documentation and feel free to close as not-a-bug or wont-fix.

create table t (a int);
create sequence s;
--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE
create or replace table s sequence=1 as select * from t;
 
show create table s;
 
# Cleanup
drop table if exists t, s;

bb-10.11-midenok 8e82c973eeb

create or replace table s sequence=1 as select * from t;
ERROR HY000: Sequence 'test.t' table structure is invalid (Wrong number of columns)
show create table s;
 
mysqltest: At line 6: query 'show create table s' failed: ER_NO_SUCH_TABLE (1146): Table 'test.s' doesn't exist

Note: While reproducing/modifying the test case, be careful not to hit MDEV-29771.



 Comments   
Comment by Aleksey Midenkov [ 2022-10-14 ]

Specified in MDEV-29798

Generated at Thu Feb 08 10:11:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.