Debian Codegraph @

mysql-test/suite/binlog/r/binlog_stm_blackhole.result

raw
1 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
2 drop table if exists t1,t2;
3 CREATE TABLE t1 (
4 Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
5 Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
6 ) ENGINE=blackhole;
7 INSERT INTO t1 VALUES (9410,9412);
8 select period from t1;
9 period
10 select * from t1;
11 Period Varor_period
12 select t1.* from t1;
13 Period Varor_period
14 CREATE TABLE t2 (
15 auto int NOT NULL auto_increment,
16 fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
17 companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
18 fld3 char(30) DEFAULT '' NOT NULL,
19 fld4 char(35) DEFAULT '' NOT NULL,
20 fld5 char(35) DEFAULT '' NOT NULL,
21 fld6 char(4) DEFAULT '' NOT NULL,
22 primary key (auto)
23 ) ENGINE=blackhole;
24 INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky','');
25 INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly','');
26 select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
27 fld3
28 select fld3 from t2 where fld3 like "%cultivation" ;
29 fld3
30 select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
31 fld3 companynr
32 select fld3,companynr from t2 where companynr = 58 order by fld3;
33 fld3 companynr
34 select fld3 from t2 order by fld3 desc limit 10;
35 fld3
36 select fld3 from t2 order by fld3 desc limit 5;
37 fld3
38 select fld3 from t2 order by fld3 desc limit 5,5;
39 fld3
40 select t2.fld3 from t2 where fld3 = 'honeysuckle';
41 fld3
42 select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
43 fld3
44 select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
45 fld3
46 select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
47 fld3
48 select t2.fld3 from t2 where fld3 LIKE 'h%le';
49 fld3
50 select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
51 fld3
52 select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
53 fld3
54 select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
55 fld3
56 select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
57 fld1 fld3
58 DROP TABLE t1;
59 CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b));
60 INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),
61 ('Full-text indexes', 'are called collections'),
62 ('Only MyISAM tables','support collections'),
63 ('Function MATCH ... AGAINST()','is used to do a search'),
64 ('Full-text search in MySQL', 'implements vector space model');
65 SHOW INDEX FROM t1;
66 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
67 t1 1 a 1 a NULL NULL NULL NULL YES FULLTEXT NO
68 t1 1 a 2 b NULL NULL NULL NULL YES FULLTEXT NO
69 select * from t1 where MATCH(a,b) AGAINST ("collections");
70 a b
71 Only MyISAM tables support collections
72 Full-text indexes are called collections
73 explain extended select * from t1 where MATCH(a,b) AGAINST ("collections");
74 id select_type table type possible_keys key key_len ref rows filtered Extra
75 1 SIMPLE t1 fulltext a a 0 1 100.00 Using where
76 Warnings:
77 Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against ('collections'))
78 select * from t1 where MATCH(a,b) AGAINST ("indexes");
79 a b
80 Full-text indexes are called collections
81 select * from t1 where MATCH(a,b) AGAINST ("indexes collections");
82 a b
83 Full-text indexes are called collections
84 Only MyISAM tables support collections
85 select * from t1 where MATCH(a,b) AGAINST ("only");
86 a b
87 reset master;
88 drop table t1,t2;
89 create table t1 (a int) engine=blackhole;
90 delete from t1 where a=10;
91 update t1 set a=11 where a=15;
92 insert into t1 values(1);
93 insert ignore into t1 values(1);
94 replace into t1 values(100);
95 create table t2 (a varchar(200)) engine=blackhole;
96 load data infile '../../std_data/words.dat' into table t2;
97 alter table t1 add b int;
98 alter table t1 drop b;
99 create table t3 like t1;
100 insert into t1 select * from t3;
101 replace into t1 select * from t3;
102 Warnings:
103 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave
104 select * from t1;
105 a
106 select * from t2;
107 a
108 select * from t3;
109 a
110 include/show_binlog_events.inc
111 Log_name Pos Event_type Server_id End_log_pos Info
112 master-bin.000001 # Gtid # # GTID #-#-#
113 master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2` /* generated by server */
114 master-bin.000001 # Gtid # # GTID #-#-#
115 master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
116 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
117 master-bin.000001 # Query # # use `test`; delete from t1 where a=10
118 master-bin.000001 # Query # # COMMIT
119 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
120 master-bin.000001 # Query # # use `test`; update t1 set a=11 where a=15
121 master-bin.000001 # Query # # COMMIT
122 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
123 master-bin.000001 # Query # # use `test`; insert into t1 values(1)
124 master-bin.000001 # Query # # COMMIT
125 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
126 master-bin.000001 # Query # # use `test`; insert ignore into t1 values(1)
127 master-bin.000001 # Query # # COMMIT
128 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
129 master-bin.000001 # Query # # use `test`; replace into t1 values(100)
130 master-bin.000001 # Query # # COMMIT
131 master-bin.000001 # Gtid # # GTID #-#-#
132 master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
133 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
134 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
135 master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=#
136 master-bin.000001 # Query # # COMMIT
137 master-bin.000001 # Gtid # # GTID #-#-#
138 master-bin.000001 # Query # # use `test`; alter table t1 add b int
139 master-bin.000001 # Gtid # # GTID #-#-#
140 master-bin.000001 # Query # # use `test`; alter table t1 drop b
141 master-bin.000001 # Gtid # # GTID #-#-#
142 master-bin.000001 # Query # # use `test`; create table t3 like t1
143 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
144 master-bin.000001 # Query # # use `test`; insert into t1 select * from t3
145 master-bin.000001 # Query # # COMMIT
146 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
147 master-bin.000001 # Query # # use `test`; replace into t1 select * from t3
148 master-bin.000001 # Query # # COMMIT
149 drop table t1,t2,t3;
150 CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
151 INSERT DELAYED INTO t1 VALUES(1);
152 DROP TABLE t1;
153 CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
154 DELETE FROM t1 WHERE a=10;
155 ALTER TABLE t1 ADD INDEX(a);
156 DELETE FROM t1 WHERE a=10;
157 ALTER TABLE t1 DROP INDEX a;
158 ALTER TABLE t1 ADD UNIQUE INDEX(a);
159 DELETE FROM t1 WHERE a=10;
160 ALTER TABLE t1 DROP INDEX a;
161 ALTER TABLE t1 ADD PRIMARY KEY(a);
162 DELETE FROM t1 WHERE a=10;
163 DROP TABLE t1;
164 reset master;
165 create table t1 (a int) engine=blackhole;
166 set autocommit=0;
167 start transaction;
168 insert into t1 values(1);
169 commit;
170 start transaction;
171 insert into t1 values(2);
172 rollback;
173 set autocommit=1;
174 drop table if exists t1;
175 reset master;
176 create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
177 insert into t1 values (11), (NULL), (NULL), (NULL);
178 set insert_id= 3;
179 insert into t1 values (NULL), (33), (NULL);
180 set insert_id= 5;
181 insert into t1 values (55), (NULL);
182 show binlog events from <binlog_start>;
183 Log_name Pos Event_type Server_id End_log_pos Info
184 master-bin.000001 # Gtid_list 1 # []
185 master-bin.000001 # Binlog_checkpoint 1 # master-bin.000001
186 master-bin.000001 # Gtid 1 # GTID #-#-#
187 master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole
188 master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
189 master-bin.000001 # Intvar 1 # INSERT_ID=1
190 master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL)
191 master-bin.000001 # Query 1 # COMMIT
192 master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
193 master-bin.000001 # Intvar 1 # INSERT_ID=3
194 master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL)
195 master-bin.000001 # Query 1 # COMMIT
196 master-bin.000001 # Gtid 1 # BEGIN GTID #-#-#
197 master-bin.000001 # Intvar 1 # INSERT_ID=5
198 master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL)
199 master-bin.000001 # Query 1 # COMMIT
200 drop table t1;