mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-13714 Value of SEQUENCE table option is ignored upon creation
CREATE TABLE ... sequence=0 and sequence=DEFAULT created sequence tables when they should not. Signed-off-by: Monty <monty@mariadb.org>
This commit is contained in:
@ -498,3 +498,55 @@ previous value for t1
|
||||
drop sequence t1;
|
||||
create table t1 (a int) engine=sql_sequence;
|
||||
ERROR 42000: Unknown storage engine 'sql_sequence'
|
||||
#
|
||||
# MDEV-13714 SEQUENCE option fix
|
||||
#
|
||||
create or replace table s (
|
||||
`next_value` bigint(21) not null,
|
||||
`min_value` bigint(21) not null,
|
||||
`max_value` bigint(21) not null,
|
||||
`start` bigint(21) not null,
|
||||
`increment` bigint(21) not null,
|
||||
`cache` bigint(21) not null,
|
||||
`cycle` tinyint(1) unsigned not null,
|
||||
`round` bigint(21) not null)
|
||||
sequence=0;
|
||||
create or replace table s2 (
|
||||
`next_value` bigint(21) not null,
|
||||
`min_value` bigint(21) not null,
|
||||
`max_value` bigint(21) not null,
|
||||
`start` bigint(21) not null,
|
||||
`increment` bigint(21) not null,
|
||||
`cache` bigint(21) not null,
|
||||
`cycle` tinyint(1) unsigned not null,
|
||||
`round` bigint(21) not null)
|
||||
sequence=default;
|
||||
show create table s;
|
||||
Table Create Table
|
||||
s CREATE TABLE `s` (
|
||||
`next_value` bigint(21) NOT NULL,
|
||||
`min_value` bigint(21) NOT NULL,
|
||||
`max_value` bigint(21) NOT NULL,
|
||||
`start` bigint(21) NOT NULL,
|
||||
`increment` bigint(21) NOT NULL,
|
||||
`cache` bigint(21) NOT NULL,
|
||||
`cycle` tinyint(1) unsigned NOT NULL,
|
||||
`round` bigint(21) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
show create table s2;
|
||||
Table Create Table
|
||||
s2 CREATE TABLE `s2` (
|
||||
`next_value` bigint(21) NOT NULL,
|
||||
`min_value` bigint(21) NOT NULL,
|
||||
`max_value` bigint(21) NOT NULL,
|
||||
`start` bigint(21) NOT NULL,
|
||||
`increment` bigint(21) NOT NULL,
|
||||
`cache` bigint(21) NOT NULL,
|
||||
`cycle` tinyint(1) unsigned NOT NULL,
|
||||
`round` bigint(21) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
show create sequence s;
|
||||
ERROR 42S02: 'test.s' is not a SEQUENCE
|
||||
show create sequence s2;
|
||||
ERROR 42S02: 'test.s2' is not a SEQUENCE
|
||||
drop table s,s2;
|
||||
|
Reference in New Issue
Block a user