summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/alter_table-big.result
blob: 32689daa3a665c0c93812fe7ddd28c47ec7736b2 (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
114
115
116
117
118
119
drop table if exists t1, t2;
set debug_sync='RESET';
connect  addconroot, localhost, root,,;
connect  addconroot2, localhost, root,,;
connection default;
create table t1 (n1 int, n2 int, n3 int,
key (n1, n2, n3),
key (n2, n3, n1),
key (n3, n1, n2));
create table t2 (i int);
alter table t1 disable keys;
insert into t1 values (1, 2, 3);
reset master;
set debug_sync='alter_table_enable_indexes SIGNAL parked WAIT_FOR go';
alter table t1 enable keys;;
connection addconroot;
set debug_sync='now WAIT_FOR parked';
insert into t2 values (1);
insert into t1 values (1, 1, 1);;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
connection addconroot;
connection default;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t2 values (1)
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; alter table t1 enable keys
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values (1, 1, 1)
master-bin.000001	#	Query	#	#	COMMIT
drop tables t1, t2;
disconnect addconroot;
disconnect addconroot2;
set debug_sync='RESET';
End of 5.0 tests
drop table if exists t1, t2, t3;
connect  addconroot, localhost, root,,;
connect  addconroot2, localhost, root,,;
connection default;
create table t1 (i int);
reset master;
set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go';
alter table t1 change i c char(10) default 'Test1';;
connection addconroot;
set debug_sync='now WAIT_FOR parked';
insert into t1 values ();;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
connection addconroot;
connection default;
select * from t1;
c
Test1
set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go';
alter table t1 change c vc varchar(100) default 'Test2';;
connection addconroot;
set debug_sync='now WAIT_FOR parked';
rename table t1 to t2;;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
connection addconroot;
connection default;
drop table t2;
create table t1 (i int);
set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go';
alter table t1 change i c char(10) default 'Test3', rename to t2;;
connection addconroot;
set debug_sync='now WAIT_FOR parked';
insert into t2 values();;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
connection addconroot;
connection default;
select * from t2;
c
Test3
alter table t2 change c vc varchar(100) default 'Test2', rename to t1;;
connection addconroot;
connection default;
rename table t1 to t3;
disconnect addconroot;
disconnect addconroot2;
drop table t3;
set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go';
set debug_sync='RESET';
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; alter table t1 change i c char(10) default 'Test1'
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t1 values ()
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; alter table t1 change c vc varchar(100) default 'Test2'
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; rename table t1 to t2
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t2` /* generated by server */
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; create table t1 (i int)
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; insert into t2 values()
master-bin.000001	#	Query	#	#	COMMIT
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; rename table t1 to t3
master-bin.000001	#	Gtid	#	#	GTID #-#-#
master-bin.000001	#	Query	#	#	use `test`; DROP TABLE `t3` /* generated by server */
End of 5.1 tests