| 1 |
create sequence s1 cache 2 engine=innodb; |
| 2 |
# restart: --innodb-read-only |
| 3 |
connection default; |
| 4 |
show global variables like 'innodb_read_only'; |
| 5 |
Variable_name Value |
| 6 |
innodb_read_only ON |
| 7 |
use test; |
| 8 |
set session binlog_format= row; |
| 9 |
########################################### |
| 10 |
read_only create error. |
| 11 |
########################################### |
| 12 |
show global variables like 'innodb_read_only'; |
| 13 |
Variable_name Value |
| 14 |
innodb_read_only ON |
| 15 |
use test; |
| 16 |
create sequence s2 cache 5 engine=innodb; |
| 17 |
ERROR HY000: Can't create table `test`.`s2` (errno: 165 "Table is read only") |
| 18 |
########################################### |
| 19 |
read_only query error. |
| 20 |
########################################### |
| 21 |
select next value for s1; |
| 22 |
ERROR HY000: Table 's1' is read only |
| 23 |
select next value for s1; |
| 24 |
ERROR HY000: Table 's1' is read only |
| 25 |
select next value for s1; |
| 26 |
ERROR HY000: Table 's1' is read only |
| 27 |
select * from s1; |
| 28 |
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count |
| 29 |
1 1 9223372036854775806 1 1 2 0 0 |
| 30 |
# restart |
| 31 |
select * from s1; |
| 32 |
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count |
| 33 |
1 1 9223372036854775806 1 1 2 0 0 |
| 34 |
select next value for s1; |
| 35 |
next value for s1 |
| 36 |
1 |
| 37 |
select * from s1; |
| 38 |
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count |
| 39 |
3 1 9223372036854775806 1 1 2 0 0 |
| 40 |
drop sequence s1; |