2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
8
DROP DATABASE IF EXISTS mysqltest1;
9
DROP DATABASE IF EXISTS mysqltest2;
10
DROP DATABASE IF EXISTS mysqltest3;
11
CREATE DATABASE mysqltest1;
12
CREATE DATABASE mysqltest2;
13
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="NDB";
14
INSERT INTO mysqltest1.t1 SET f1= 0;
15
CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE="NDB";
16
CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE="NDB";
17
CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE="NDB";
18
CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE="NDB";
19
CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE="NDB";
20
CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
21
CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE="NDB";
22
INSERT INTO mysqltest1.t7 SET f1= 0;
23
CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE="NDB";
24
CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE="NDB";
25
CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE="NDB";
26
CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE="NDB";
27
CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE="NDB";
28
CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE="NDB";
29
CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE="NDB";
30
CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE="NDB";
31
CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE="NDB";
32
CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE="NDB";
33
CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE="NDB";
34
CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE="NDB";
35
CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT);
39
-------- switch to slave --------
43
-------- switch to master -------
45
######## COMMIT ########
47
-------- switch to master -------
48
INSERT INTO t1 SET f1= 0 + 1;
49
SELECT MAX(f1) FROM t1;
53
-------- switch to slave --------
54
SELECT MAX(f1) FROM t1;
58
-------- switch to master -------
60
SELECT MAX(f1) FROM t1;
64
-------- switch to slave --------
65
SELECT MAX(f1) FROM t1;
69
-------- switch to master -------
71
SELECT MAX(f1) FROM t1;
75
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
77
-------- switch to slave --------
78
SELECT MAX(f1) FROM t1;
82
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
84
-------- switch to master -------
87
-------- switch to slave --------
90
-------- switch to master -------
92
######## ROLLBACK ########
94
-------- switch to master -------
95
INSERT INTO t1 SET f1= 1 + 1;
96
SELECT MAX(f1) FROM t1;
100
-------- switch to slave --------
101
SELECT MAX(f1) FROM t1;
105
-------- switch to master -------
107
SELECT MAX(f1) FROM t1;
111
-------- switch to slave --------
112
SELECT MAX(f1) FROM t1;
116
-------- switch to master -------
118
SELECT MAX(f1) FROM t1;
122
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
124
-------- switch to slave --------
125
SELECT MAX(f1) FROM t1;
129
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
131
-------- switch to master -------
134
-------- switch to slave --------
137
-------- switch to master -------
139
######## SET AUTOCOMMIT=1 ########
141
-------- switch to master -------
142
INSERT INTO t1 SET f1= 1 + 1;
143
SELECT MAX(f1) FROM t1;
147
-------- switch to slave --------
148
SELECT MAX(f1) FROM t1;
152
-------- switch to master -------
154
SELECT MAX(f1) FROM t1;
158
-------- switch to slave --------
159
SELECT MAX(f1) FROM t1;
163
-------- switch to master -------
165
SELECT MAX(f1) FROM t1;
169
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
171
-------- switch to slave --------
172
SELECT MAX(f1) FROM t1;
176
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
178
-------- switch to master -------
181
-------- switch to slave --------
184
-------- switch to master -------
187
######## START TRANSACTION ########
189
-------- switch to master -------
190
INSERT INTO t1 SET f1= 2 + 1;
191
SELECT MAX(f1) FROM t1;
195
-------- switch to slave --------
196
SELECT MAX(f1) FROM t1;
200
-------- switch to master -------
202
SELECT MAX(f1) FROM t1;
206
-------- switch to slave --------
207
SELECT MAX(f1) FROM t1;
211
-------- switch to master -------
213
SELECT MAX(f1) FROM t1;
217
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
219
-------- switch to slave --------
220
SELECT MAX(f1) FROM t1;
224
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
226
-------- switch to master -------
229
-------- switch to slave --------
232
-------- switch to master -------
234
######## BEGIN ########
236
-------- switch to master -------
237
INSERT INTO t1 SET f1= 3 + 1;
238
SELECT MAX(f1) FROM t1;
242
-------- switch to slave --------
243
SELECT MAX(f1) FROM t1;
247
-------- switch to master -------
249
SELECT MAX(f1) FROM t1;
253
-------- switch to slave --------
254
SELECT MAX(f1) FROM t1;
258
-------- switch to master -------
260
SELECT MAX(f1) FROM t1;
264
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
266
-------- switch to slave --------
267
SELECT MAX(f1) FROM t1;
271
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
273
-------- switch to master -------
276
-------- switch to slave --------
279
-------- switch to master -------
281
######## DROP TABLE mysqltest1.t2 ########
283
-------- switch to master -------
284
INSERT INTO t1 SET f1= 4 + 1;
285
SELECT MAX(f1) FROM t1;
289
-------- switch to slave --------
290
SELECT MAX(f1) FROM t1;
294
-------- switch to master -------
295
DROP TABLE mysqltest1.t2;
296
SELECT MAX(f1) FROM t1;
300
-------- switch to slave --------
301
SELECT MAX(f1) FROM t1;
305
-------- switch to master -------
307
SELECT MAX(f1) FROM t1;
311
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
313
-------- switch to slave --------
314
SELECT MAX(f1) FROM t1;
318
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
320
-------- switch to master -------
323
-------- switch to slave --------
326
-------- switch to master -------
327
SHOW TABLES LIKE 't2';
328
Tables_in_mysqltest1 (t2)
330
-------- switch to slave --------
331
SHOW TABLES LIKE 't2';
332
Tables_in_mysqltest1 (t2)
334
-------- switch to master -------
336
######## DROP TEMPORARY TABLE mysqltest1.t23 ########
338
-------- switch to master -------
339
INSERT INTO t1 SET f1= 5 + 1;
340
SELECT MAX(f1) FROM t1;
344
-------- switch to slave --------
345
SELECT MAX(f1) FROM t1;
349
-------- switch to master -------
350
DROP TEMPORARY TABLE mysqltest1.t23;
351
SELECT MAX(f1) FROM t1;
355
-------- switch to slave --------
356
SELECT MAX(f1) FROM t1;
360
-------- switch to master -------
362
SELECT MAX(f1) FROM t1;
366
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
368
-------- switch to slave --------
369
SELECT MAX(f1) FROM t1;
373
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
375
-------- switch to master -------
378
-------- switch to slave --------
381
-------- switch to master -------
382
SHOW TABLES LIKE 't23';
383
Tables_in_mysqltest1 (t23)
385
-------- switch to slave --------
386
SHOW TABLES LIKE 't23';
387
Tables_in_mysqltest1 (t23)
389
-------- switch to master -------
391
######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ########
393
-------- switch to master -------
394
INSERT INTO t1 SET f1= 5 + 1;
395
SELECT MAX(f1) FROM t1;
399
-------- switch to slave --------
400
SELECT MAX(f1) FROM t1;
404
-------- switch to master -------
405
RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
406
SELECT MAX(f1) FROM t1;
410
-------- switch to slave --------
411
SELECT MAX(f1) FROM t1;
415
-------- switch to master -------
417
SELECT MAX(f1) FROM t1;
421
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
423
-------- switch to slave --------
424
SELECT MAX(f1) FROM t1;
428
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
430
-------- switch to master -------
433
-------- switch to slave --------
436
-------- switch to master -------
437
SHOW TABLES LIKE 't20';
438
Tables_in_mysqltest1 (t20)
441
-------- switch to slave --------
442
SHOW TABLES LIKE 't20';
443
Tables_in_mysqltest1 (t20)
446
-------- switch to master -------
448
######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ########
450
-------- switch to master -------
451
INSERT INTO t1 SET f1= 6 + 1;
452
SELECT MAX(f1) FROM t1;
456
-------- switch to slave --------
457
SELECT MAX(f1) FROM t1;
461
-------- switch to master -------
462
ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
463
SELECT MAX(f1) FROM t1;
467
-------- switch to slave --------
468
SELECT MAX(f1) FROM t1;
472
-------- switch to master -------
474
SELECT MAX(f1) FROM t1;
478
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
480
-------- switch to slave --------
481
SELECT MAX(f1) FROM t1;
485
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
487
-------- switch to master -------
490
-------- switch to slave --------
493
-------- switch to master -------
494
describe mysqltest1.t4;
495
Field Type Null Key Default Extra
496
f1 bigint(20) YES NULL
497
f2 bigint(20) YES NULL
499
-------- switch to slave --------
500
describe mysqltest1.t4;
501
Field Type Null Key Default Extra
502
f1 bigint(20) YES NULL
503
f2 bigint(20) YES NULL
505
-------- switch to master -------
507
######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "NDB" ########
509
-------- switch to master -------
510
INSERT INTO t1 SET f1= 7 + 1;
511
SELECT MAX(f1) FROM t1;
515
-------- switch to slave --------
516
SELECT MAX(f1) FROM t1;
520
-------- switch to master -------
521
CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= "NDB";
522
SELECT MAX(f1) FROM t1;
526
-------- switch to slave --------
527
SELECT MAX(f1) FROM t1;
531
-------- switch to master -------
533
SELECT MAX(f1) FROM t1;
537
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
539
-------- switch to slave --------
540
SELECT MAX(f1) FROM t1;
544
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
546
-------- switch to master -------
549
-------- switch to slave --------
552
-------- switch to master -------
554
######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ########
556
-------- switch to master -------
557
INSERT INTO t1 SET f1= 8 + 1;
558
SELECT MAX(f1) FROM t1;
562
-------- switch to slave --------
563
SELECT MAX(f1) FROM t1;
567
-------- switch to master -------
568
CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT);
569
SELECT MAX(f1) FROM t1;
573
-------- switch to slave --------
574
SELECT MAX(f1) FROM t1;
578
-------- switch to master -------
580
SELECT MAX(f1) FROM t1;
584
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
586
-------- switch to slave --------
587
SELECT MAX(f1) FROM t1;
591
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
593
-------- switch to master -------
596
-------- switch to slave --------
599
-------- switch to master -------
601
######## TRUNCATE TABLE mysqltest1.t7 ########
603
-------- switch to master -------
604
INSERT INTO t1 SET f1= 8 + 1;
605
SELECT MAX(f1) FROM t1;
609
-------- switch to slave --------
610
SELECT MAX(f1) FROM t1;
614
-------- switch to master -------
615
TRUNCATE TABLE mysqltest1.t7;
616
SELECT MAX(f1) FROM t1;
620
-------- switch to slave --------
621
SELECT MAX(f1) FROM t1;
625
-------- switch to master -------
627
SELECT MAX(f1) FROM t1;
631
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
633
-------- switch to slave --------
634
SELECT MAX(f1) FROM t1;
638
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
640
-------- switch to master -------
643
-------- switch to slave --------
646
-------- switch to master -------
647
SELECT * FROM mysqltest1.t7;
649
-------- switch to slave --------
650
SELECT * FROM mysqltest1.t7;
652
-------- switch to master -------
654
######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ########
656
-------- switch to master -------
657
INSERT INTO t1 SET f1= 9 + 1;
658
SELECT MAX(f1) FROM t1;
662
-------- switch to slave --------
663
SELECT MAX(f1) FROM t1;
667
-------- switch to master -------
668
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
669
SELECT MAX(f1) FROM t1;
673
-------- switch to slave --------
674
SELECT MAX(f1) FROM t1;
678
-------- switch to master -------
680
SELECT MAX(f1) FROM t1;
684
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
686
-------- switch to slave --------
687
SELECT MAX(f1) FROM t1;
691
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
693
-------- switch to master -------
696
-------- switch to slave --------
699
-------- switch to master -------
702
######## UNLOCK TABLES ########
704
-------- switch to master -------
705
INSERT INTO t1 SET f1= 10 + 1;
706
SELECT MAX(f1) FROM t1;
710
-------- switch to slave --------
711
SELECT MAX(f1) FROM t1;
715
-------- switch to master -------
717
SELECT MAX(f1) FROM t1;
721
-------- switch to slave --------
722
SELECT MAX(f1) FROM t1;
726
-------- switch to master -------
728
SELECT MAX(f1) FROM t1;
732
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
734
-------- switch to slave --------
735
SELECT MAX(f1) FROM t1;
739
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
741
-------- switch to master -------
744
-------- switch to slave --------
747
-------- switch to master -------
748
LOCK TABLES mysqltest1.t1 READ;
750
######## UNLOCK TABLES ########
752
-------- switch to master -------
753
INSERT INTO t1 SET f1= 10 + 1;
754
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
755
SELECT MAX(f1) FROM t1;
759
-------- switch to slave --------
760
SELECT MAX(f1) FROM t1;
764
-------- switch to master -------
766
SELECT MAX(f1) FROM t1;
770
-------- switch to slave --------
771
SELECT MAX(f1) FROM t1;
775
-------- switch to master -------
777
SELECT MAX(f1) FROM t1;
781
TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
783
-------- switch to slave --------
784
SELECT MAX(f1) FROM t1;
788
TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
790
-------- switch to master -------
793
-------- switch to slave --------
796
-------- switch to master -------
797
LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
799
######## UNLOCK TABLES ########
801
-------- switch to master -------
802
INSERT INTO t1 SET f1= 10 + 1;
803
SELECT MAX(f1) FROM t1;
807
-------- switch to slave --------
808
SELECT MAX(f1) FROM t1;
812
-------- switch to master -------
814
SELECT MAX(f1) FROM t1;
818
-------- switch to slave --------
819
SELECT MAX(f1) FROM t1;
823
-------- switch to master -------
825
SELECT MAX(f1) FROM t1;
829
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
831
-------- switch to slave --------
832
SELECT MAX(f1) FROM t1;
836
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
838
-------- switch to master -------
841
-------- switch to slave --------
844
-------- switch to master -------
846
######## DROP INDEX my_idx6 ON mysqltest1.t6 ########
848
-------- switch to master -------
849
INSERT INTO t1 SET f1= 11 + 1;
850
SELECT MAX(f1) FROM t1;
854
-------- switch to slave --------
855
SELECT MAX(f1) FROM t1;
859
-------- switch to master -------
860
DROP INDEX my_idx6 ON mysqltest1.t6;
861
SELECT MAX(f1) FROM t1;
865
-------- switch to slave --------
866
SELECT MAX(f1) FROM t1;
870
-------- switch to master -------
872
SELECT MAX(f1) FROM t1;
876
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
878
-------- switch to slave --------
879
SELECT MAX(f1) FROM t1;
883
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
885
-------- switch to master -------
888
-------- switch to slave --------
891
-------- switch to master -------
892
SHOW INDEX FROM mysqltest1.t6;
893
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
895
-------- switch to slave --------
896
SHOW INDEX FROM mysqltest1.t6;
897
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
899
-------- switch to master -------
901
######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ########
903
-------- switch to master -------
904
INSERT INTO t1 SET f1= 12 + 1;
905
SELECT MAX(f1) FROM t1;
909
-------- switch to slave --------
910
SELECT MAX(f1) FROM t1;
914
-------- switch to master -------
915
CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
916
SELECT MAX(f1) FROM t1;
920
-------- switch to slave --------
921
SELECT MAX(f1) FROM t1;
925
-------- switch to master -------
927
SELECT MAX(f1) FROM t1;
931
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
933
-------- switch to slave --------
934
SELECT MAX(f1) FROM t1;
938
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
940
-------- switch to master -------
943
-------- switch to slave --------
946
-------- switch to master -------
947
SHOW INDEX FROM mysqltest1.t5;
948
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
949
t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
951
-------- switch to slave --------
952
SHOW INDEX FROM mysqltest1.t5;
953
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
954
t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
956
-------- switch to master -------
958
######## DROP DATABASE mysqltest2 ########
960
-------- switch to master -------
961
INSERT INTO t1 SET f1= 13 + 1;
962
SELECT MAX(f1) FROM t1;
966
-------- switch to slave --------
967
SELECT MAX(f1) FROM t1;
971
-------- switch to master -------
972
DROP DATABASE mysqltest2;
973
SELECT MAX(f1) FROM t1;
977
-------- switch to slave --------
978
SELECT MAX(f1) FROM t1;
982
-------- switch to master -------
984
SELECT MAX(f1) FROM t1;
988
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
990
-------- switch to slave --------
991
SELECT MAX(f1) FROM t1;
995
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
997
-------- switch to master -------
1000
-------- switch to slave --------
1003
-------- switch to master -------
1004
SHOW DATABASES LIKE "mysqltest2";
1005
Database (mysqltest2)
1007
-------- switch to slave --------
1008
SHOW DATABASES LIKE "mysqltest2";
1009
Database (mysqltest2)
1011
-------- switch to master -------
1013
######## CREATE DATABASE mysqltest3 ########
1015
-------- switch to master -------
1016
INSERT INTO t1 SET f1= 14 + 1;
1017
SELECT MAX(f1) FROM t1;
1021
-------- switch to slave --------
1022
SELECT MAX(f1) FROM t1;
1026
-------- switch to master -------
1027
CREATE DATABASE mysqltest3;
1028
SELECT MAX(f1) FROM t1;
1032
-------- switch to slave --------
1033
SELECT MAX(f1) FROM t1;
1037
-------- switch to master -------
1039
SELECT MAX(f1) FROM t1;
1043
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1045
-------- switch to slave --------
1046
SELECT MAX(f1) FROM t1;
1050
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1052
-------- switch to master -------
1055
-------- switch to slave --------
1058
-------- switch to master -------
1059
SHOW DATABASES LIKE "mysqltest3";
1060
Database (mysqltest3)
1063
-------- switch to slave --------
1064
SHOW DATABASES LIKE "mysqltest3";
1065
Database (mysqltest3)
1068
-------- switch to master -------
1070
######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ########
1072
-------- switch to master -------
1073
INSERT INTO t1 SET f1= 15 + 1;
1074
SELECT MAX(f1) FROM t1;
1078
-------- switch to slave --------
1079
SELECT MAX(f1) FROM t1;
1083
-------- switch to master -------
1084
CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1";
1085
SELECT MAX(f1) FROM t1;
1089
-------- switch to slave --------
1090
SELECT MAX(f1) FROM t1;
1094
-------- switch to master -------
1096
SELECT MAX(f1) FROM t1;
1100
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1102
-------- switch to slave --------
1103
SELECT MAX(f1) FROM t1;
1107
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1109
-------- switch to master -------
1112
-------- switch to slave --------
1115
-------- switch to master -------
1116
SHOW PROCEDURE STATUS LIKE 'p1';
1120
Definer root@localhost
1123
Security_type DEFINER
1125
-------- switch to slave -------
1126
SHOW PROCEDURE STATUS LIKE 'p1';
1130
Definer root@localhost
1133
Security_type DEFINER
1136
######## ALTER PROCEDURE p1 COMMENT "I have been altered" ########
1138
-------- switch to master -------
1139
INSERT INTO t1 SET f1= 16 + 1;
1140
SELECT MAX(f1) FROM t1;
1144
-------- switch to slave --------
1145
SELECT MAX(f1) FROM t1;
1149
-------- switch to master -------
1150
ALTER PROCEDURE p1 COMMENT "I have been altered";
1151
SELECT MAX(f1) FROM t1;
1155
-------- switch to slave --------
1156
SELECT MAX(f1) FROM t1;
1160
-------- switch to master -------
1162
SELECT MAX(f1) FROM t1;
1166
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1168
-------- switch to slave --------
1169
SELECT MAX(f1) FROM t1;
1173
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1175
-------- switch to master -------
1178
-------- switch to slave --------
1181
-------- switch to master -------
1182
SHOW PROCEDURE STATUS LIKE 'p1';
1186
Definer root@localhost
1189
Security_type DEFINER
1190
Comment I have been altered
1191
-------- switch to slave -------
1192
SHOW PROCEDURE STATUS LIKE 'p1';
1196
Definer root@localhost
1199
Security_type DEFINER
1200
Comment I have been altered
1202
######## DROP PROCEDURE p1 ########
1204
-------- switch to master -------
1205
INSERT INTO t1 SET f1= 17 + 1;
1206
SELECT MAX(f1) FROM t1;
1210
-------- switch to slave --------
1211
SELECT MAX(f1) FROM t1;
1215
-------- switch to master -------
1217
SELECT MAX(f1) FROM t1;
1221
-------- switch to slave --------
1222
SELECT MAX(f1) FROM t1;
1226
-------- switch to master -------
1228
SELECT MAX(f1) FROM t1;
1232
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1234
-------- switch to slave --------
1235
SELECT MAX(f1) FROM t1;
1239
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1241
-------- switch to master -------
1244
-------- switch to slave --------
1247
-------- switch to master -------
1248
SHOW PROCEDURE STATUS LIKE 'p1';
1249
-------- switch to slave -------
1250
SHOW PROCEDURE STATUS LIKE 'p1';
1252
######## CREATE OR REPLACE VIEW v1 as select * from t1 ########
1254
-------- switch to master -------
1255
INSERT INTO t1 SET f1= 18 + 1;
1256
SELECT MAX(f1) FROM t1;
1260
-------- switch to slave --------
1261
SELECT MAX(f1) FROM t1;
1265
-------- switch to master -------
1266
CREATE OR REPLACE VIEW v1 as select * from t1;
1267
SELECT MAX(f1) FROM t1;
1271
-------- switch to slave --------
1272
SELECT MAX(f1) FROM t1;
1276
-------- switch to master -------
1278
SELECT MAX(f1) FROM t1;
1282
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1284
-------- switch to slave --------
1285
SELECT MAX(f1) FROM t1;
1289
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1291
-------- switch to master -------
1294
-------- switch to slave --------
1297
-------- switch to master -------
1298
SHOW CREATE VIEW v1;
1300
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
1302
-------- switch to slave -------
1303
SHOW CREATE VIEW v1;
1305
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
1307
######## ALTER VIEW v1 AS select f1 from t1 ########
1309
-------- switch to master -------
1310
INSERT INTO t1 SET f1= 19 + 1;
1311
SELECT MAX(f1) FROM t1;
1315
-------- switch to slave --------
1316
SELECT MAX(f1) FROM t1;
1320
-------- switch to master -------
1321
ALTER VIEW v1 AS select f1 from t1;
1322
SELECT MAX(f1) FROM t1;
1326
-------- switch to slave --------
1327
SELECT MAX(f1) FROM t1;
1331
-------- switch to master -------
1333
SELECT MAX(f1) FROM t1;
1337
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1339
-------- switch to slave --------
1340
SELECT MAX(f1) FROM t1;
1344
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1346
-------- switch to master -------
1349
-------- switch to slave --------
1352
-------- switch to master -------
1353
SHOW CREATE VIEW v1;
1355
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
1357
-------- switch to slave -------
1358
SHOW CREATE VIEW v1;
1360
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`
1362
######## DROP VIEW IF EXISTS v1 ########
1364
-------- switch to master -------
1365
INSERT INTO t1 SET f1= 20 + 1;
1366
SELECT MAX(f1) FROM t1;
1370
-------- switch to slave --------
1371
SELECT MAX(f1) FROM t1;
1375
-------- switch to master -------
1376
DROP VIEW IF EXISTS v1;
1377
SELECT MAX(f1) FROM t1;
1381
-------- switch to slave --------
1382
SELECT MAX(f1) FROM t1;
1386
-------- switch to master -------
1388
SELECT MAX(f1) FROM t1;
1392
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1394
-------- switch to slave --------
1395
SELECT MAX(f1) FROM t1;
1399
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1401
-------- switch to master -------
1404
-------- switch to slave --------
1407
-------- switch to master -------
1408
SHOW CREATE VIEW v1;
1409
ERROR 42S02: Table 'mysqltest1.v1' doesn't exist
1411
-------- switch to slave -------
1412
SHOW CREATE VIEW v1;
1413
ERROR 42S02: Table 'mysqltest1.v1' doesn't exist
1415
######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ########
1417
-------- switch to master -------
1418
INSERT INTO t1 SET f1= 21 + 1;
1419
SELECT MAX(f1) FROM t1;
1423
-------- switch to slave --------
1424
SELECT MAX(f1) FROM t1;
1428
-------- switch to master -------
1429
CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
1430
SELECT MAX(f1) FROM t1;
1434
-------- switch to slave --------
1435
SELECT MAX(f1) FROM t1;
1439
-------- switch to master -------
1441
SELECT MAX(f1) FROM t1;
1445
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1447
-------- switch to slave --------
1448
SELECT MAX(f1) FROM t1;
1452
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1454
-------- switch to master -------
1457
-------- switch to slave --------
1460
-------- switch to master -------
1462
Trigger Event Table Statement Timing Created sql_mode Definer
1463
trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost
1465
-------- switch to slave -------
1467
Trigger Event Table Statement Timing Created sql_mode Definer
1468
trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost
1470
######## DROP TRIGGER trg1 ########
1472
-------- switch to master -------
1473
INSERT INTO t1 SET f1= 22 + 1;
1474
SELECT MAX(f1) FROM t1;
1478
-------- switch to slave --------
1479
SELECT MAX(f1) FROM t1;
1483
-------- switch to master -------
1485
SELECT MAX(f1) FROM t1;
1489
-------- switch to slave --------
1490
SELECT MAX(f1) FROM t1;
1494
-------- switch to master -------
1496
SELECT MAX(f1) FROM t1;
1500
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1502
-------- switch to slave --------
1503
SELECT MAX(f1) FROM t1;
1507
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1509
-------- switch to master -------
1512
-------- switch to slave --------
1515
-------- switch to master -------
1517
Trigger Event Table Statement Timing Created sql_mode Definer
1519
-------- switch to slave -------
1521
Trigger Event Table Statement Timing Created sql_mode Definer
1523
######## CREATE USER user1@localhost ########
1525
-------- switch to master -------
1526
INSERT INTO t1 SET f1= 23 + 1;
1527
SELECT MAX(f1) FROM t1;
1531
-------- switch to slave --------
1532
SELECT MAX(f1) FROM t1;
1536
-------- switch to master -------
1537
CREATE USER user1@localhost;
1538
SELECT MAX(f1) FROM t1;
1542
-------- switch to slave --------
1543
SELECT MAX(f1) FROM t1;
1547
-------- switch to master -------
1549
SELECT MAX(f1) FROM t1;
1553
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1555
-------- switch to slave --------
1556
SELECT MAX(f1) FROM t1;
1560
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1562
-------- switch to master -------
1565
-------- switch to slave --------
1568
-------- switch to master -------
1569
SELECT user FROM mysql.user WHERE user = 'user1';
1573
-------- switch to slave -------
1574
SELECT user FROM mysql.user WHERE user = 'user1';
1578
######## RENAME USER user1@localhost TO rename1@localhost ########
1580
-------- switch to master -------
1581
INSERT INTO t1 SET f1= 24 + 1;
1582
SELECT MAX(f1) FROM t1;
1586
-------- switch to slave --------
1587
SELECT MAX(f1) FROM t1;
1591
-------- switch to master -------
1592
RENAME USER user1@localhost TO rename1@localhost;
1593
SELECT MAX(f1) FROM t1;
1597
-------- switch to slave --------
1598
SELECT MAX(f1) FROM t1;
1602
-------- switch to master -------
1604
SELECT MAX(f1) FROM t1;
1608
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1610
-------- switch to slave --------
1611
SELECT MAX(f1) FROM t1;
1615
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1617
-------- switch to master -------
1620
-------- switch to slave --------
1623
-------- switch to master -------
1624
SELECT user FROM mysql.user WHERE user = 'rename1';
1628
-------- switch to slave -------
1629
SELECT user FROM mysql.user WHERE user = 'rename1';
1633
######## DROP USER rename1@localhost ########
1635
-------- switch to master -------
1636
INSERT INTO t1 SET f1= 25 + 1;
1637
SELECT MAX(f1) FROM t1;
1641
-------- switch to slave --------
1642
SELECT MAX(f1) FROM t1;
1646
-------- switch to master -------
1647
DROP USER rename1@localhost;
1648
SELECT MAX(f1) FROM t1;
1652
-------- switch to slave --------
1653
SELECT MAX(f1) FROM t1;
1657
-------- switch to master -------
1659
SELECT MAX(f1) FROM t1;
1663
TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1665
-------- switch to slave --------
1666
SELECT MAX(f1) FROM t1;
1670
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1672
-------- switch to master -------
1675
-------- switch to slave --------
1678
-------- switch to master -------
1679
SELECT user FROM mysql.user WHERE user = 'rename1';
1682
-------- switch to slave -------
1683
SELECT user FROM mysql.user WHERE user = 'rename1';
1685
DROP DATABASE IF EXISTS mysqltest1;
1686
DROP DATABASE IF EXISTS mysqltest2;
1687
DROP DATABASE IF EXISTS mysqltest3;
1688
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction