mariadb/mysql-test/suite/sql_sequence/read_only.result
Marko Mäkelä 43eec57fab Merge 10.2 into bb-10.2-ext; also, fix MDEV-13015 After restart, InnoDB wrongly thinks that a SEQUENCE is a TABLE
sql_sequence.read_only: Show that the sequence can be read in
both read-only and read-write mode, and that the sequence remains
accessible after a server restart.
2017-06-15 18:06:55 +03:00

38 lines
1.3 KiB
Text

create sequence s1 cache 2 engine=innodb;
connection default;
show global variables like 'innodb_read_only';
Variable_name Value
innodb_read_only ON
use test;
set session binlog_format= row;
###########################################
read_only create error.
###########################################
show global variables like 'innodb_read_only';
Variable_name Value
innodb_read_only ON
use test;
create sequence s2 cache 5 engine=innodb;
ERROR HY000: Can't create table `test`.`s2` (errno: 165 "Table is read only")
###########################################
read_only query error.
###########################################
select next value for s1;
ERROR HY000: Table 's1' is read only
select next value for s1;
ERROR HY000: Table 's1' is read only
select next value for s1;
ERROR HY000: Table 's1' is read only
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 2 0 0
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 2 0 0
select next value for s1;
next value for s1
1
select * from s1;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
3 1 9223372036854775806 1 1 2 0 0
drop sequence s1;