summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/r/autoinc_crash_safe.result
blob: ae29b4e415d325337a8c551792af6a658cd56706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
create table t (i int primary key auto_increment) engine=rocksdb;
#
# Testing concurrent transactions.
#
begin;
insert into t values ();
begin;
insert into t values ();
begin;
insert into t values ();
insert into t values ();
insert into t values ();
insert into t values ();
commit;
rollback;
commit;
delete from t;
# Master value before restart
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	7
# Slave value before restart
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	6
include/stop_slave.inc
include/rpl_restart_server.inc [server_number=1]
# Master value after restart
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	6
include/rpl_restart_server.inc [server_number=2]
include/start_slave.inc
# Slave value after restart
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	6
#
# Testing interaction of merge markers with various DDL statements.
#
include/stop_slave.inc
# Drop and add primary key.
alter table t modify i int;
alter table t drop primary key;
alter table t add primary key (i);
alter table t modify i int auto_increment;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	6
# Remove auto_increment property.
alter table t modify i int;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	NULL
# Add auto_increment property.
insert into t values (123);
alter table t modify i int auto_increment;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	124
# Add column j.
alter table t add column j int;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	124
# Rename tables.
rename table t to t2;
rename table t2 to t;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	124
# Change auto_increment property
alter table t auto_increment = 1000;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	1000
alter table t auto_increment = 1;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	124
alter table t drop primary key, add key (i), auto_increment = 1;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	124
alter table t add key (j), auto_increment = 1;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	124
alter table t modify i int;
alter table t add column (k int auto_increment), add key(k), auto_increment=15;
include/rpl_restart_server.inc [server_number=1]
select table_schema, table_name, auto_increment from information_schema.tables where table_name = 't';
table_schema	table_name	auto_increment
test	t	16
# Drop table.
drop table t;
include/rpl_restart_server.inc [server_number=1]
include/start_slave.inc
include/rpl_end.inc