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 -------- switch to master -------
10 DROP DATABASE IF EXISTS mysqltest1;
11 DROP DATABASE IF EXISTS mysqltest2;
12 DROP DATABASE IF EXISTS mysqltest3;
13 CREATE DATABASE mysqltest1;
14 CREATE DATABASE mysqltest2;
15 CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=InnoDB;
16 INSERT INTO mysqltest1.t1 SET f1= 0;
17 CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=InnoDB;
18 CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=InnoDB;
19 CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=InnoDB;
20 CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=InnoDB;
21 CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=InnoDB;
22 CREATE INDEX my_idx6 ON mysqltest1.t6(f1);
23 CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=InnoDB;
24 INSERT INTO mysqltest1.t7 SET f1= 0;
25 CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=InnoDB;
26 CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=InnoDB;
27 CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=InnoDB;
28 CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=InnoDB;
29 CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=InnoDB;
30 CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=InnoDB;
31 CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=InnoDB;
32 CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=InnoDB;
33 CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=InnoDB;
34 CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=InnoDB;
35 CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=InnoDB;
36 CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=InnoDB;
37 CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY;
41 -------- switch to slave --------
45 -------- switch to master -------
47 ######## SELECT 1 ########
49 -------- switch to master -------
50 INSERT INTO t1 SET f1= 0 + 1;
51 SELECT MAX(f1) FROM t1;
55 -------- switch to slave --------
56 SELECT MAX(f1) FROM t1;
60 -------- switch to master -------
64 SELECT MAX(f1) FROM t1;
68 -------- switch to slave --------
69 SELECT MAX(f1) FROM t1;
73 -------- switch to master -------
75 SELECT MAX(f1) FROM t1;
79 TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
81 -------- switch to slave --------
82 SELECT MAX(f1) FROM t1;
86 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
88 -------- switch to master -------
90 ######## SELECT COUNT(*) FROM t1 ########
92 -------- switch to master -------
93 INSERT INTO t1 SET f1= 0 + 1;
94 SELECT MAX(f1) FROM t1;
98 -------- switch to slave --------
99 SELECT MAX(f1) FROM t1;
103 -------- switch to master -------
104 SELECT COUNT(*) FROM t1;
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 -------
133 ######## COMMIT ########
135 -------- switch to master -------
136 INSERT INTO t1 SET f1= 0 + 1;
137 SELECT MAX(f1) FROM t1;
141 -------- switch to slave --------
142 SELECT MAX(f1) FROM t1;
146 -------- switch to master -------
148 SELECT MAX(f1) FROM t1;
152 -------- switch to slave --------
153 SELECT MAX(f1) FROM t1;
157 -------- switch to master -------
159 SELECT MAX(f1) FROM t1;
163 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
165 -------- switch to slave --------
166 SELECT MAX(f1) FROM t1;
170 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
172 -------- switch to master -------
174 ######## ROLLBACK ########
176 -------- switch to master -------
177 INSERT INTO t1 SET f1= 1 + 1;
178 SELECT MAX(f1) FROM t1;
182 -------- switch to slave --------
183 SELECT MAX(f1) FROM t1;
187 -------- switch to master -------
189 SELECT MAX(f1) FROM t1;
193 -------- switch to slave --------
194 SELECT MAX(f1) FROM t1;
198 -------- switch to master -------
200 SELECT MAX(f1) FROM t1;
204 TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
206 -------- switch to slave --------
207 SELECT MAX(f1) FROM t1;
211 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
213 -------- switch to master -------
215 ######## SET AUTOCOMMIT=1 ########
217 -------- switch to master -------
218 INSERT INTO t1 SET f1= 1 + 1;
219 SELECT MAX(f1) FROM t1;
223 -------- switch to slave --------
224 SELECT MAX(f1) FROM t1;
228 -------- switch to master -------
230 SELECT MAX(f1) FROM t1;
234 -------- switch to slave --------
235 SELECT MAX(f1) FROM t1;
239 -------- switch to master -------
241 SELECT MAX(f1) FROM t1;
245 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
247 -------- switch to slave --------
248 SELECT MAX(f1) FROM t1;
252 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
254 -------- switch to master -------
257 ######## START TRANSACTION ########
259 -------- switch to master -------
260 INSERT INTO t1 SET f1= 2 + 1;
261 SELECT MAX(f1) FROM t1;
265 -------- switch to slave --------
266 SELECT MAX(f1) FROM t1;
270 -------- switch to master -------
272 SELECT MAX(f1) FROM t1;
276 -------- switch to slave --------
277 SELECT MAX(f1) FROM t1;
281 -------- switch to master -------
283 SELECT MAX(f1) FROM t1;
287 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
289 -------- switch to slave --------
290 SELECT MAX(f1) FROM t1;
294 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
296 -------- switch to master -------
298 ######## BEGIN ########
300 -------- switch to master -------
301 INSERT INTO t1 SET f1= 3 + 1;
302 SELECT MAX(f1) FROM t1;
306 -------- switch to slave --------
307 SELECT MAX(f1) FROM t1;
311 -------- switch to master -------
313 SELECT MAX(f1) FROM t1;
317 -------- switch to slave --------
318 SELECT MAX(f1) FROM t1;
322 -------- switch to master -------
324 SELECT MAX(f1) FROM t1;
328 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
330 -------- switch to slave --------
331 SELECT MAX(f1) FROM t1;
335 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
337 -------- switch to master -------
339 ######## DROP TABLE mysqltest1.t2 ########
341 -------- switch to master -------
342 INSERT INTO t1 SET f1= 4 + 1;
343 SELECT MAX(f1) FROM t1;
347 -------- switch to slave --------
348 SELECT MAX(f1) FROM t1;
352 -------- switch to master -------
353 DROP TABLE mysqltest1.t2;
354 SELECT MAX(f1) FROM t1;
358 -------- switch to slave --------
359 SELECT MAX(f1) FROM t1;
363 -------- switch to master -------
365 SELECT MAX(f1) FROM t1;
369 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
371 -------- switch to slave --------
372 SELECT MAX(f1) FROM t1;
376 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
378 -------- switch to master -------
379 SHOW TABLES LIKE 't2';
380 Tables_in_mysqltest1 (t2)
382 -------- switch to slave --------
383 SHOW TABLES LIKE 't2';
384 Tables_in_mysqltest1 (t2)
386 -------- switch to master -------
388 ######## DROP TEMPORARY TABLE mysqltest1.t23 ########
390 -------- switch to master -------
391 INSERT INTO t1 SET f1= 5 + 1;
392 SELECT MAX(f1) FROM t1;
396 -------- switch to slave --------
397 SELECT MAX(f1) FROM t1;
401 -------- switch to master -------
402 DROP TEMPORARY TABLE mysqltest1.t23;
403 SELECT MAX(f1) FROM t1;
407 -------- switch to slave --------
408 SELECT MAX(f1) FROM t1;
412 -------- switch to master -------
414 SELECT MAX(f1) FROM t1;
418 TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
420 -------- switch to slave --------
421 SELECT MAX(f1) FROM t1;
425 TEST-INFO: SLAVE: The INSERT is committed (Failed)
427 -------- switch to master -------
428 SHOW TABLES LIKE 't23';
429 Tables_in_mysqltest1 (t23)
431 -------- switch to slave --------
432 SHOW TABLES LIKE 't23';
433 Tables_in_mysqltest1 (t23)
435 -------- switch to master -------
437 ######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ########
439 -------- switch to master -------
440 INSERT INTO t1 SET f1= 5 + 1;
441 SELECT MAX(f1) FROM t1;
445 -------- switch to slave --------
446 SELECT MAX(f1) FROM t1;
450 -------- switch to master -------
451 RENAME TABLE mysqltest1.t3 to mysqltest1.t20;
452 SELECT MAX(f1) FROM t1;
456 -------- switch to slave --------
457 SELECT MAX(f1) FROM t1;
461 -------- switch to master -------
463 SELECT MAX(f1) FROM t1;
467 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
469 -------- switch to slave --------
470 SELECT MAX(f1) FROM t1;
474 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
476 -------- switch to master -------
477 SHOW TABLES LIKE 't20';
478 Tables_in_mysqltest1 (t20)
481 -------- switch to slave --------
482 SHOW TABLES LIKE 't20';
483 Tables_in_mysqltest1 (t20)
486 -------- switch to master -------
488 ######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ########
490 -------- switch to master -------
491 INSERT INTO t1 SET f1= 6 + 1;
492 SELECT MAX(f1) FROM t1;
496 -------- switch to slave --------
497 SELECT MAX(f1) FROM t1;
501 -------- switch to master -------
502 ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT;
503 SELECT MAX(f1) FROM t1;
507 -------- switch to slave --------
508 SELECT MAX(f1) FROM t1;
512 -------- switch to master -------
514 SELECT MAX(f1) FROM t1;
518 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
520 -------- switch to slave --------
521 SELECT MAX(f1) FROM t1;
525 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
527 -------- switch to master -------
528 describe mysqltest1.t4;
529 Field Type Null Key Default Extra
530 f1 bigint(20) YES NULL
531 f2 bigint(20) YES NULL
533 -------- switch to slave --------
534 describe mysqltest1.t4;
535 Field Type Null Key Default Extra
536 f1 bigint(20) YES NULL
537 f2 bigint(20) YES NULL
539 -------- switch to master -------
541 ######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB ########
543 -------- switch to master -------
544 INSERT INTO t1 SET f1= 7 + 1;
545 SELECT MAX(f1) FROM t1;
549 -------- switch to slave --------
550 SELECT MAX(f1) FROM t1;
554 -------- switch to master -------
555 CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB;
556 SELECT MAX(f1) FROM t1;
560 -------- switch to slave --------
561 SELECT MAX(f1) FROM t1;
565 -------- switch to master -------
567 SELECT MAX(f1) FROM t1;
571 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
573 -------- switch to slave --------
574 SELECT MAX(f1) FROM t1;
578 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
580 -------- switch to master -------
582 ######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ########
584 -------- switch to master -------
585 INSERT INTO t1 SET f1= 8 + 1;
586 SELECT MAX(f1) FROM t1;
590 -------- switch to slave --------
591 SELECT MAX(f1) FROM t1;
595 -------- switch to master -------
596 CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY;
597 SELECT MAX(f1) FROM t1;
601 -------- switch to slave --------
602 SELECT MAX(f1) FROM t1;
606 -------- switch to master -------
608 SELECT MAX(f1) FROM t1;
612 TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
614 -------- switch to slave --------
615 SELECT MAX(f1) FROM t1;
619 TEST-INFO: SLAVE: The INSERT is committed (Failed)
621 -------- switch to master -------
623 ######## TRUNCATE TABLE mysqltest1.t7 ########
625 -------- switch to master -------
626 INSERT INTO t1 SET f1= 8 + 1;
627 SELECT MAX(f1) FROM t1;
631 -------- switch to slave --------
632 SELECT MAX(f1) FROM t1;
636 -------- switch to master -------
637 TRUNCATE TABLE mysqltest1.t7;
638 SELECT MAX(f1) FROM t1;
642 -------- switch to slave --------
643 SELECT MAX(f1) FROM t1;
647 -------- switch to master -------
649 SELECT MAX(f1) FROM t1;
653 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
655 -------- switch to slave --------
656 SELECT MAX(f1) FROM t1;
660 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
662 -------- switch to master -------
663 SELECT * FROM mysqltest1.t7;
666 -------- switch to slave --------
667 SELECT * FROM mysqltest1.t7;
670 -------- switch to master -------
672 ######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ########
674 -------- switch to master -------
675 INSERT INTO t1 SET f1= 9 + 1;
676 SELECT MAX(f1) FROM t1;
680 -------- switch to slave --------
681 SELECT MAX(f1) FROM t1;
685 -------- switch to master -------
686 LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ;
687 SELECT MAX(f1) FROM t1;
691 -------- switch to slave --------
692 SELECT MAX(f1) FROM t1;
696 -------- switch to master -------
698 SELECT MAX(f1) FROM t1;
702 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
704 -------- switch to slave --------
705 SELECT MAX(f1) FROM t1;
709 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
711 -------- switch to master -------
714 ######## UNLOCK TABLES ########
716 -------- switch to master -------
717 INSERT INTO t1 SET f1= 10 + 1;
718 SELECT MAX(f1) FROM t1;
722 -------- switch to slave --------
723 SELECT MAX(f1) FROM t1;
727 -------- switch to master -------
729 SELECT MAX(f1) FROM t1;
733 -------- switch to slave --------
734 SELECT MAX(f1) FROM t1;
738 -------- switch to master -------
740 SELECT MAX(f1) FROM t1;
744 TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
746 -------- switch to slave --------
747 SELECT MAX(f1) FROM t1;
751 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
753 -------- switch to master -------
754 LOCK TABLES mysqltest1.t1 READ;
756 ######## UNLOCK TABLES ########
758 -------- switch to master -------
759 INSERT INTO t1 SET f1= 10 + 1;
760 ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
761 SELECT MAX(f1) FROM t1;
765 -------- switch to slave --------
766 SELECT MAX(f1) FROM t1;
770 -------- switch to master -------
772 SELECT MAX(f1) FROM t1;
776 -------- switch to slave --------
777 SELECT MAX(f1) FROM t1;
781 -------- switch to master -------
783 SELECT MAX(f1) FROM t1;
787 TEST-INFO: MASTER: The INSERT is not committed (Succeeded)
789 -------- switch to slave --------
790 SELECT MAX(f1) FROM t1;
794 TEST-INFO: SLAVE: The INSERT is not committed (Succeeded)
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 -------
840 ######## DROP INDEX my_idx6 ON mysqltest1.t6 ########
842 -------- switch to master -------
843 INSERT INTO t1 SET f1= 11 + 1;
844 SELECT MAX(f1) FROM t1;
848 -------- switch to slave --------
849 SELECT MAX(f1) FROM t1;
853 -------- switch to master -------
854 DROP INDEX my_idx6 ON mysqltest1.t6;
855 SELECT MAX(f1) FROM t1;
859 -------- switch to slave --------
860 SELECT MAX(f1) FROM t1;
864 -------- switch to master -------
866 SELECT MAX(f1) FROM t1;
870 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
872 -------- switch to slave --------
873 SELECT MAX(f1) FROM t1;
877 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
879 -------- switch to master -------
880 SHOW INDEX FROM mysqltest1.t6;
881 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
883 -------- switch to slave --------
884 SHOW INDEX FROM mysqltest1.t6;
885 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
887 -------- switch to master -------
889 ######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ########
891 -------- switch to master -------
892 INSERT INTO t1 SET f1= 12 + 1;
893 SELECT MAX(f1) FROM t1;
897 -------- switch to slave --------
898 SELECT MAX(f1) FROM t1;
902 -------- switch to master -------
903 CREATE INDEX my_idx5 ON mysqltest1.t5(f1);
904 SELECT MAX(f1) FROM t1;
908 -------- switch to slave --------
909 SELECT MAX(f1) FROM t1;
913 -------- switch to master -------
915 SELECT MAX(f1) FROM t1;
919 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
921 -------- switch to slave --------
922 SELECT MAX(f1) FROM t1;
926 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
928 -------- switch to master -------
929 SHOW INDEX FROM mysqltest1.t5;
930 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
931 t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE
933 -------- switch to slave --------
934 SHOW INDEX FROM mysqltest1.t5;
935 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
936 t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE
938 -------- switch to master -------
940 ######## DROP DATABASE mysqltest2 ########
942 -------- switch to master -------
943 INSERT INTO t1 SET f1= 13 + 1;
944 SELECT MAX(f1) FROM t1;
948 -------- switch to slave --------
949 SELECT MAX(f1) FROM t1;
953 -------- switch to master -------
954 DROP DATABASE mysqltest2;
955 SELECT MAX(f1) FROM t1;
959 -------- switch to slave --------
960 SELECT MAX(f1) FROM t1;
964 -------- switch to master -------
966 SELECT MAX(f1) FROM t1;
970 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
972 -------- switch to slave --------
973 SELECT MAX(f1) FROM t1;
977 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
979 -------- switch to master -------
980 SHOW DATABASES LIKE "mysqltest2";
981 Database (mysqltest2)
983 -------- switch to slave --------
984 SHOW DATABASES LIKE "mysqltest2";
985 Database (mysqltest2)
987 -------- switch to master -------
989 ######## CREATE DATABASE mysqltest3 ########
991 -------- switch to master -------
992 INSERT INTO t1 SET f1= 14 + 1;
993 SELECT MAX(f1) FROM t1;
997 -------- switch to slave --------
998 SELECT MAX(f1) FROM t1;
1002 -------- switch to master -------
1003 CREATE DATABASE mysqltest3;
1004 SELECT MAX(f1) FROM t1;
1008 -------- switch to slave --------
1009 SELECT MAX(f1) FROM t1;
1013 -------- switch to master -------
1015 SELECT MAX(f1) FROM t1;
1019 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1021 -------- switch to slave --------
1022 SELECT MAX(f1) FROM t1;
1026 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1028 -------- switch to master -------
1029 SHOW DATABASES LIKE "mysqltest3";
1030 Database (mysqltest3)
1033 -------- switch to slave --------
1034 SHOW DATABASES LIKE "mysqltest3";
1035 Database (mysqltest3)
1038 -------- switch to master -------
1040 ######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ########
1042 -------- switch to master -------
1043 INSERT INTO t1 SET f1= 15 + 1;
1044 SELECT MAX(f1) FROM t1;
1048 -------- switch to slave --------
1049 SELECT MAX(f1) FROM t1;
1053 -------- switch to master -------
1054 CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1";
1055 SELECT MAX(f1) FROM t1;
1059 -------- switch to slave --------
1060 SELECT MAX(f1) FROM t1;
1064 -------- switch to master -------
1066 SELECT MAX(f1) FROM t1;
1070 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1072 -------- switch to slave --------
1073 SELECT MAX(f1) FROM t1;
1077 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1079 -------- switch to master -------
1080 SHOW PROCEDURE STATUS LIKE 'p1';
1084 Definer root@localhost
1087 Security_type DEFINER
1089 character_set_client latin1
1090 collation_connection latin1_swedish_ci
1091 Database Collation latin1_swedish_ci
1093 -------- switch to slave --------
1094 SHOW PROCEDURE STATUS LIKE 'p1';
1098 Definer root@localhost
1101 Security_type DEFINER
1103 character_set_client latin1
1104 collation_connection latin1_swedish_ci
1105 Database Collation latin1_swedish_ci
1107 -------- switch to master -------
1109 ######## ALTER PROCEDURE p1 COMMENT "I have been altered" ########
1111 -------- switch to master -------
1112 INSERT INTO t1 SET f1= 16 + 1;
1113 SELECT MAX(f1) FROM t1;
1117 -------- switch to slave --------
1118 SELECT MAX(f1) FROM t1;
1122 -------- switch to master -------
1123 ALTER PROCEDURE p1 COMMENT "I have been altered";
1124 SELECT MAX(f1) FROM t1;
1128 -------- switch to slave --------
1129 SELECT MAX(f1) FROM t1;
1133 -------- switch to master -------
1135 SELECT MAX(f1) FROM t1;
1139 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1141 -------- switch to slave --------
1142 SELECT MAX(f1) FROM t1;
1146 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1148 -------- switch to master -------
1149 SHOW PROCEDURE STATUS LIKE 'p1';
1153 Definer root@localhost
1156 Security_type DEFINER
1157 Comment I have been altered
1158 character_set_client latin1
1159 collation_connection latin1_swedish_ci
1160 Database Collation latin1_swedish_ci
1162 -------- switch to slave --------
1163 SHOW PROCEDURE STATUS LIKE 'p1';
1167 Definer root@localhost
1170 Security_type DEFINER
1171 Comment I have been altered
1172 character_set_client latin1
1173 collation_connection latin1_swedish_ci
1174 Database Collation latin1_swedish_ci
1176 -------- switch to master -------
1178 ######## DROP PROCEDURE p1 ########
1180 -------- switch to master -------
1181 INSERT INTO t1 SET f1= 17 + 1;
1182 SELECT MAX(f1) FROM t1;
1186 -------- switch to slave --------
1187 SELECT MAX(f1) FROM t1;
1191 -------- switch to master -------
1193 SELECT MAX(f1) FROM t1;
1197 -------- switch to slave --------
1198 SELECT MAX(f1) FROM t1;
1202 -------- switch to master -------
1204 SELECT MAX(f1) FROM t1;
1208 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1210 -------- switch to slave --------
1211 SELECT MAX(f1) FROM t1;
1215 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1217 -------- switch to master -------
1218 SHOW PROCEDURE STATUS LIKE 'p1';
1220 -------- switch to slave --------
1221 SHOW PROCEDURE STATUS LIKE 'p1';
1223 -------- switch to master -------
1225 ######## CREATE OR REPLACE VIEW v1 as select * from t1 ########
1227 -------- switch to master -------
1228 INSERT INTO t1 SET f1= 18 + 1;
1229 SELECT MAX(f1) FROM t1;
1233 -------- switch to slave --------
1234 SELECT MAX(f1) FROM t1;
1238 -------- switch to master -------
1239 CREATE OR REPLACE VIEW v1 as select * from t1;
1240 SELECT MAX(f1) FROM t1;
1244 -------- switch to slave --------
1245 SELECT MAX(f1) FROM t1;
1249 -------- switch to master -------
1251 SELECT MAX(f1) FROM t1;
1255 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1257 -------- switch to slave --------
1258 SELECT MAX(f1) FROM t1;
1262 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1264 -------- switch to master -------
1265 SHOW CREATE VIEW v1;
1266 View Create View character_set_client collation_connection
1267 v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
1269 -------- switch to slave --------
1270 SHOW CREATE VIEW v1;
1271 View Create View character_set_client collation_connection
1272 v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
1274 -------- switch to master -------
1276 ######## ALTER VIEW v1 AS select f1 from t1 ########
1278 -------- switch to master -------
1279 INSERT INTO t1 SET f1= 19 + 1;
1280 SELECT MAX(f1) FROM t1;
1284 -------- switch to slave --------
1285 SELECT MAX(f1) FROM t1;
1289 -------- switch to master -------
1290 ALTER VIEW v1 AS select f1 from t1;
1291 SELECT MAX(f1) FROM t1;
1295 -------- switch to slave --------
1296 SELECT MAX(f1) FROM t1;
1300 -------- switch to master -------
1302 SELECT MAX(f1) FROM t1;
1306 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1308 -------- switch to slave --------
1309 SELECT MAX(f1) FROM t1;
1313 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1315 -------- switch to master -------
1316 SHOW CREATE VIEW v1;
1317 View Create View character_set_client collation_connection
1318 v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
1320 -------- switch to slave --------
1321 SHOW CREATE VIEW v1;
1322 View Create View character_set_client collation_connection
1323 v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci
1325 -------- switch to master -------
1327 ######## DROP VIEW IF EXISTS v1 ########
1329 -------- switch to master -------
1330 INSERT INTO t1 SET f1= 20 + 1;
1331 SELECT MAX(f1) FROM t1;
1335 -------- switch to slave --------
1336 SELECT MAX(f1) FROM t1;
1340 -------- switch to master -------
1341 DROP VIEW IF EXISTS v1;
1342 SELECT MAX(f1) FROM t1;
1346 -------- switch to slave --------
1347 SELECT MAX(f1) FROM t1;
1351 -------- switch to master -------
1353 SELECT MAX(f1) FROM t1;
1357 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1359 -------- switch to slave --------
1360 SELECT MAX(f1) FROM t1;
1364 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1366 -------- switch to master -------
1367 SHOW CREATE VIEW v1;
1368 ERROR 42S02: Table 'mysqltest1.v1' doesn't exist
1370 -------- switch to slave --------
1371 SHOW CREATE VIEW v1;
1372 ERROR 42S02: Table 'mysqltest1.v1' doesn't exist
1374 -------- switch to master -------
1376 ######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ########
1378 -------- switch to master -------
1379 INSERT INTO t1 SET f1= 21 + 1;
1380 SELECT MAX(f1) FROM t1;
1384 -------- switch to slave --------
1385 SELECT MAX(f1) FROM t1;
1389 -------- switch to master -------
1390 CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
1391 SELECT MAX(f1) FROM t1;
1395 -------- switch to slave --------
1396 SELECT MAX(f1) FROM t1;
1400 -------- switch to master -------
1402 SELECT MAX(f1) FROM t1;
1406 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1408 -------- switch to slave --------
1409 SELECT MAX(f1) FROM t1;
1413 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1415 -------- switch to master -------
1417 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
1418 trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
1420 -------- switch to slave --------
1422 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
1423 trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
1425 -------- switch to master -------
1427 ######## DROP TRIGGER trg1 ########
1429 -------- switch to master -------
1430 INSERT INTO t1 SET f1= 22 + 1;
1431 SELECT MAX(f1) FROM t1;
1435 -------- switch to slave --------
1436 SELECT MAX(f1) FROM t1;
1440 -------- switch to master -------
1442 SELECT MAX(f1) FROM t1;
1446 -------- switch to slave --------
1447 SELECT MAX(f1) FROM t1;
1451 -------- switch to master -------
1453 SELECT MAX(f1) FROM t1;
1457 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1459 -------- switch to slave --------
1460 SELECT MAX(f1) FROM t1;
1464 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1466 -------- switch to master -------
1468 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
1470 -------- switch to slave --------
1472 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
1474 -------- switch to master -------
1476 ######## CREATE USER user1@localhost ########
1478 -------- switch to master -------
1479 INSERT INTO t1 SET f1= 23 + 1;
1480 SELECT MAX(f1) FROM t1;
1484 -------- switch to slave --------
1485 SELECT MAX(f1) FROM t1;
1489 -------- switch to master -------
1490 CREATE USER user1@localhost;
1491 SELECT MAX(f1) FROM t1;
1495 -------- switch to slave --------
1496 SELECT MAX(f1) FROM t1;
1500 -------- switch to master -------
1502 SELECT MAX(f1) FROM t1;
1506 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1508 -------- switch to slave --------
1509 SELECT MAX(f1) FROM t1;
1513 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1515 -------- switch to master -------
1516 SELECT user FROM mysql.user WHERE user = 'user1';
1520 -------- switch to slave --------
1521 SELECT user FROM mysql.user WHERE user = 'user1';
1525 -------- switch to master -------
1527 ######## RENAME USER user1@localhost TO rename1@localhost ########
1529 -------- switch to master -------
1530 INSERT INTO t1 SET f1= 24 + 1;
1531 SELECT MAX(f1) FROM t1;
1535 -------- switch to slave --------
1536 SELECT MAX(f1) FROM t1;
1540 -------- switch to master -------
1541 RENAME USER user1@localhost TO rename1@localhost;
1542 SELECT MAX(f1) FROM t1;
1546 -------- switch to slave --------
1547 SELECT MAX(f1) FROM t1;
1551 -------- switch to master -------
1553 SELECT MAX(f1) FROM t1;
1557 TEST-INFO: MASTER: The INSERT is committed (Succeeded)
1559 -------- switch to slave --------
1560 SELECT MAX(f1) FROM t1;
1564 TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
1566 -------- switch to master -------
1567 SELECT user FROM mysql.user WHERE user = 'rename1';
1571 -------- switch to slave --------
1572 SELECT user FROM mysql.user WHERE user = 'rename1';
1576 -------- switch to master -------
1578 ######## DROP USER rename1@localhost ########
1580 -------- switch to master -------
1581 INSERT INTO t1 SET f1= 25 + 1;
1582 SELECT MAX(f1) FROM t1;
1586 -------- switch to slave --------
1587 SELECT MAX(f1) FROM t1;
1591 -------- switch to master -------
1592 DROP USER 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 -------
1618 SELECT user FROM mysql.user WHERE user = 'rename1';
1621 -------- switch to slave --------
1622 SELECT user FROM mysql.user WHERE user = 'rename1';
1626 -------- switch to master -------
1627 DROP DATABASE mysqltest1;
1628 DROP DATABASE mysqltest3;