Merge lp:~tsarev/percona-server/18205_03_wl47.patch into lp:percona-server/5.5
- 18205_03_wl47.patch
- Merge into 5.5
Status: | Superseded |
---|---|
Proposed branch: | lp:~tsarev/percona-server/18205_03_wl47.patch |
Merge into: | lp:percona-server/5.5 |
Prerequisite: | lp:~tsarev/percona-server/18205_02_wl36.patch |
Diff against target: |
5235 lines (+3129/-1489) (has conflicts) 5 files modified
patches/mysql-test-rnt.diff (+12/-1300) patches/mysqlbinlog_fix.patch (+62/-0) patches/series.OTHER (+1/-1) patches/wl36.patch (+170/-43) patches/wl47.patch (+2884/-145) Conflict adding file .bzrignore. Moved existing file to .bzrignore.moved. Path conflict: <deleted> / patches/COPYING.innodb-deadlock-count-patch Conflict adding file HandlerSocket-Plugin-for-MySQL. Moved existing file to HandlerSocket-Plugin-for-MySQL.moved. Contents conflict in Makefile Conflict adding file README.HandlerSocket. Moved existing file to README.HandlerSocket.moved. Conflict adding file UDF. Moved existing file to UDF.moved. Conflict adding file apply_patches. Moved existing file to apply_patches.moved. Conflict adding files to build. Created directory. Conflict because build is not versioned, but has versioned children. Versioned directory. Conflict adding file build. Moved existing file to build.moved. Conflict adding files to build/debian. Created directory. Conflict because build/debian is not versioned, but has versioned children. Versioned directory. Contents conflict in build/debian/changelog Contents conflict in build/debian/control Contents conflict in build/debian/libmysqlclient-dev.docs Contents conflict in build/debian/libmysqlclient-dev.files Contents conflict in build/debian/libmysqlclient16.docs Conflict adding files to build/debian/patches. Created directory. Conflict because build/debian/patches is not versioned, but has versioned children. Versioned directory. Contents conflict in build/debian/patches/00list Contents conflict in build/debian/percona-server-client-5.1.docs Contents conflict in build/debian/percona-server-client-5.1.files Contents conflict in build/debian/percona-server-server-5.1.docs Contents conflict in build/debian/percona-server-server-5.1.files Contents conflict in build/debian/percona-server-server-5.1.links Contents conflict in build/debian/percona-server-server-5.1.mysql.init Contents conflict in build/debian/percona-server-server-5.1.postinst Contents conflict in build/debian/percona-server-server-5.1.templates Contents conflict in build/debian/rules Contents conflict in build/percona-server.spec Conflict adding file doc. Moved existing file to doc.moved. Conflict adding file handlersocket.patch. Moved existing file to handlersocket.patch.moved. Contents conflict in normalize_patches Conflict adding file patches. Moved existing file to patches.moved. Contents conflict in patches/bug580324.patch Contents conflict in patches/bugfix48929.patch Contents conflict in patches/control_online_alter_index.patch Contents conflict in patches/error_pad.patch Contents conflict in patches/i_s_innodb_buffer_pool_pages.patch Contents conflict in patches/innodb_adjust_defaults.patch Contents conflict in patches/innodb_admin_command_base.patch Contents conflict in patches/innodb_buffer_pool_shm.patch Contents conflict in patches/innodb_deadlock_count.patch Contents conflict in patches/innodb_dict_size_limit.patch Contents conflict in patches/innodb_expand_import.patch Contents conflict in patches/innodb_expand_undo_slots.patch Contents conflict in patches/innodb_extend_slow.patch Contents conflict in patches/innodb_extra_rseg.patch Contents conflict in patches/innodb_fast_checksum.patch Contents conflict in patches/innodb_files_extend.patch Contents conflict in patches/innodb_fix_misc.patch Contents conflict in patches/innodb_io_patches.patch Contents conflict in patches/innodb_lru_dump_restore.patch Contents conflict in patches/innodb_opt_lru_count.patch Contents conflict in patches/innodb_overwrite_relay_log_info.patch Contents conflict in patches/innodb_pass_corrupt_table.patch Contents conflict in patches/innodb_purge_thread.patch Contents conflict in patches/innodb_recovery_patches.patch Contents conflict in patches/innodb_separate_doublewrite.patch Contents conflict in patches/innodb_show_enhancements.patch Contents conflict in patches/innodb_show_lock_name.patch Contents conflict in patches/innodb_show_status.patch Contents conflict in patches/innodb_show_sys_tables.patch Contents conflict in patches/innodb_split_buf_pool_mutex.patch Contents conflict in patches/innodb_stats.patch Contents conflict in patches/innodb_swap_builtin_plugin.patch Contents conflict in patches/innodb_thread_concurrency_timer_based.patch Contents conflict in patches/log_connection_error.patch Contents conflict in patches/microsec_process.patch Contents conflict in patches/mysql-syslog.patch Contents conflict in patches/mysql-test.diff Contents conflict in patches/mysql_dump_ignore_ct.patch Contents conflict in patches/optimizer_fix.patch Contents conflict in patches/percona-support.patch Contents conflict in patches/profiling_slow.patch Contents conflict in patches/query_cache_enhance.patch Contents conflict in patches/remove_fcntl_excessive_calls.patch Contents conflict in patches/response_time_distribution.patch Contents conflict in patches/series Contents conflict in patches/show_patches.patch Contents conflict in patches/show_slave_status_nolock.patch Contents conflict in patches/show_temp_51.patch Contents conflict in patches/slow_extended.patch Contents conflict in patches/sql_no_fcache.patch Contents conflict in patches/suppress_log_warning_1592.patch Contents conflict in patches/userstat.patch Conflict adding file python-for-subunit2junitxml. Moved existing file to python-for-subunit2junitxml.moved. Conflict adding file quiltrc. Moved existing file to quiltrc.moved. Conflict adding file subunit2junitxml. Moved existing file to subunit2junitxml.moved. |
To merge this branch: | bzr merge lp:~tsarev/percona-server/18205_03_wl47.patch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Needs Fixing | ||
Review via email: mp+90657@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-02-06.
Commit message
Description of the change
move tests related to wl47.patch from mysql-test-rnt.diff to wl47.patch
fixed code policy
(issue 18205 - prepare lp:percona-server/rnt-5.1 patches to merge to lp:percona-server/5.1)
after merge this fix to lp:percona-server/rnt-5.1 I will propose for merge it to lp:percona-server/5.1
Laurynas Biveinis (laurynas-biveinis) wrote : | # |
- 209. By Oleg Tsarev
-
merge lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch
- 210. By Oleg Tsarev
- 211. By Oleg Tsarev
-
merge lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch
- 212. By Oleg Tsarev
-
Fixed code policy in wl47.patch.
Moved related tests and tests fixes from mysql-test-run.diff to wl47.patch.
Added (missed before) results for tests rpl.rpl_row_annotate_ do, rpl.rpl_ row_annotate_ dont, binlog. binlog_ row_annotate.
Unmerged revisions
- 212. By Oleg Tsarev
-
Fixed code policy in wl47.patch.
Moved related tests and tests fixes from mysql-test-run.diff to wl47.patch.
Added (missed before) results for tests rpl.rpl_row_annotate_ do, rpl.rpl_ row_annotate_ dont, binlog. binlog_ row_annotate. - 211. By Oleg Tsarev
-
merge lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch
- 210. By Oleg Tsarev
- 209. By Oleg Tsarev
-
merge lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch
- 208. By Oleg Tsarev
-
Return back Percona's "innodb_
stats_method= nulls_ignored" algorithm. Related Launchpad bug #892405
Related MySQL bug http://bugs.mysql. com/bug. php?id= 63320 I added new value "nulls_
ignored_ exact" for variable innodb_ stats_method. Current upsteam "nulls_ignored" algorithm calculate not_null values on every estimated (random) page, and after that try to approximates total value count.
Unfortunately, this algorithm works incorrectly on mostly null indexes (see MySQL Bug #63320).Percona'a algorithm excludes from estimation pages with nulls, calculates the count of different values and approximates total value count.
This algorithm works correctly on mostly null indexes, but has limitation - it works correctly just on one-column-key indexes. On compound-keys algorithm can works incorrectly (I didn't test this).
Unfortunately, I can't imagine now how to discard this limitation. - 207. By Oleg Tsarev
-
Fix incorrect month output from Subunit.pm
Perl localtime return month in range 0..11, subunit2junitxml expect range 1..12 - 206. By Oleg Tsarev
-
merge porting to 5.1.59
- 205. By Oleg Tsarev
-
Merge Alexey's commit:
Bug #872754: Annotate rows events on slave doesnt' work without slave's binlogThe problem was that Read_Master_Log_Pos was not calculated correctly
when events were being skipped on the master (i.e. Annotate_Rows_Events
when either replicate-annotate- rows-events or log-slave-updates were OFF). Fixed by changing the calculation so that master_log_pos is read from
the event's header if it's available. Otherwise, proceed with the
default logic. - 204. By Oleg Tsarev
-
merge lp:percona-server/5.1
- 203. By Alexey Kopytov
-
Automerge from 5.1.
Preview Diff
1 | === modified file 'patches/mysql-test-rnt.diff' |
2 | --- patches/mysql-test-rnt.diff 2012-02-06 05:52:20 +0000 |
3 | +++ patches/mysql-test-rnt.diff 2012-02-06 05:52:21 +0000 |
4 | @@ -1,27 +1,3 @@ |
5 | ---- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test |
6 | -+++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test |
7 | -@@ -321,14 +321,19 @@ |
8 | - # we check that the error code of the "ROLLBACK" event is 0 and not |
9 | - # ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction |
10 | - # and does not make slave to stop) |
11 | -+ |
12 | -+-- source include/binlog_start_pos.inc |
13 | -+ |
14 | - if (`select @@binlog_format = 'ROW'`) |
15 | - { |
16 | -- --exec $MYSQL_BINLOG --start-position=524 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
17 | -+ let $start_pos= `select @binlog_start_pos + 418`; |
18 | -+ --exec $MYSQL_BINLOG --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
19 | - } |
20 | - |
21 | - if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) |
22 | - { |
23 | -- --exec $MYSQL_BINLOG --start-position=555 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
24 | -+ let $start_pos= `select @binlog_start_pos + 449`; |
25 | -+ --exec $MYSQL_BINLOG --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
26 | - } |
27 | - |
28 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
29 | --- /dev/null |
30 | +++ b/mysql-test/extra/rpl_tests/check_type.inc |
31 | @@ -0,0 +1,52 @@ |
32 | @@ -259,16 +235,6 @@ |
33 | --let $slave_skip_counter= 2 |
34 | --let $show_slave_sql_error= 1 |
35 | --source include/wait_for_slave_sql_error_and_skip.inc |
36 | ---- a/mysql-test/extra/rpl_tests/rpl_log.test |
37 | -+++ b/mysql-test/extra/rpl_tests/rpl_log.test |
38 | -@@ -14,6 +14,7 @@ |
39 | - reset master; |
40 | - reset slave; |
41 | - source include/start_slave.inc; |
42 | -+source include/binlog_start_pos.inc; |
43 | - |
44 | - let $VERSION=`select version()`; |
45 | - |
46 | --- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc |
47 | +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.inc |
48 | @@ -532,6 +532,16 @@ |
49 | @@ -288,165 +254,6 @@ |
50 | --disable_query_log |
51 | SET @commands= LTRIM(SUBSTRING(@commands, LENGTH(@command) + 1)); |
52 | inc $stmt_id; |
53 | ---- /dev/null |
54 | -+++ b/mysql-test/extra/rpl_tests/rpl_row_annotate.test |
55 | -@@ -0,0 +1,156 @@ |
56 | -+######################################################################## |
57 | -+# WL47: Store in binlog text of statements that caused RBR events |
58 | -+# new event : ANNOTATE_ROWS_EVENT |
59 | -+# new master option : --binlog-annotate-rows-events |
60 | -+# new slave option : --replicate-annotate-rows-events |
61 | -+######################################################################## |
62 | -+--source include/master-slave.inc |
63 | -+connect (master2,127.0.0.1,root,,test,$MASTER_MYPORT,); |
64 | -+ |
65 | -+connection master; |
66 | -+--disable_query_log |
67 | -+ |
68 | -+--disable_warnings |
69 | -+DROP DATABASE IF EXISTS test1; |
70 | -+--enable_warnings |
71 | -+ |
72 | -+CREATE DATABASE test1; |
73 | -+USE test1; |
74 | -+ |
75 | -+CREATE TABLE t1(a int primary key, b int); |
76 | -+CREATE TABLE t2(a int, b int); |
77 | -+CREATE TABLE t3(a int, b int); |
78 | -+CREATE TABLE t4(a int, b int); |
79 | -+CREATE TABLE xt1(a int, b int); |
80 | -+CREATE TABLE xt2(a int, b int); |
81 | -+ |
82 | -+CREATE TABLE t5 ( |
83 | -+ a INT PRIMARY KEY AUTO_INCREMENT, |
84 | -+ b VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin |
85 | -+); |
86 | -+ |
87 | -+SET SESSION binlog_annotate_rows_events = OFF; |
88 | -+ |
89 | -+INSERT INTO t1 VALUES (0,0), (1,1); |
90 | -+ |
91 | -+SET SESSION binlog_annotate_rows_events = ON; |
92 | -+ |
93 | -+UPDATE t1 SET b = b + 1; |
94 | -+REPLACE t1 VALUES (1,1), (2,2), (3,3); |
95 | -+ |
96 | -+INSERT INTO t2 VALUES (1,1), (2,2), (3,3); |
97 | -+INSERT INTO t3 VALUES (1,1), (2,2), (3,3); |
98 | -+DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.a=t2.a AND t2.a=t3.a; |
99 | -+ |
100 | -+INSERT INTO xt1 VALUES (1,1), (2,2), (3,3); |
101 | -+INSERT INTO t2 VALUES (1,1), (2,2), (3,3); |
102 | -+DELETE xt1, t2 FROM xt1 INNER JOIN t2 INNER JOIN t3 WHERE xt1.a=t2.a AND t2.a=t3.a; |
103 | -+ |
104 | -+INSERT INTO xt1 VALUES (1,1), (2,2), (3,3); |
105 | -+INSERT INTO xt2 VALUES (1,1), (2,2), (3,3); |
106 | -+DELETE xt1, xt2 FROM xt1 INNER JOIN xt2 INNER JOIN t3 WHERE xt1.a=xt2.a AND xt2.a=t3.a; |
107 | -+ |
108 | -+INSERT INTO t5(b) VALUES ('foo'), ('bar'), ('baz'); |
109 | -+SET NAMES latin1; |
110 | -+INSERT INTO t5(b) VALUES ('gås'); |
111 | -+SET NAMES utf8; |
112 | -+INSERT INTO t5(b) VALUES ('gås'); |
113 | -+SET NAMES latin1; |
114 | -+ |
115 | -+FLUSH LOGS; |
116 | -+ |
117 | -+--echo ######################################################################## |
118 | -+--echo # TABLES ON MASTER |
119 | -+--echo ######################################################################## |
120 | -+--enable_query_log |
121 | -+ |
122 | -+SELECT * FROM t1 ORDER BY a; |
123 | -+SELECT * FROM t2 ORDER BY a; |
124 | -+SELECT * FROM t3 ORDER BY a; |
125 | -+SELECT * FROM t5 ORDER BY a; |
126 | -+ |
127 | -+sync_slave_with_master; |
128 | -+--echo ######################################################################## |
129 | -+--echo # TABLES ON SLAVE: should be the same as on master |
130 | -+--echo ######################################################################## |
131 | -+--disable_query_log |
132 | -+USE test1; |
133 | -+--enable_query_log |
134 | -+ |
135 | -+SELECT * FROM t1 ORDER BY a; |
136 | -+SELECT * FROM t2 ORDER BY a; |
137 | -+SELECT * FROM t3 ORDER BY a; |
138 | -+SELECT * FROM t5 ORDER BY a; |
139 | -+ |
140 | -+--echo ######################################################################## |
141 | -+--echo # EVENTS ON SLAVE |
142 | -+let $annotate= `select @@global.replicate_annotate_rows_events`; |
143 | -+if ($annotate) |
144 | -+{ |
145 | -+ --echo # The following Annotate_rows events should appear below: |
146 | -+ --echo # - UPDATE t1 SET b = b + 1; |
147 | -+ --echo # - REPLACE t1 VALUES (1,1), (2,2), (3,3); |
148 | -+ --echo # - INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
149 | -+ --echo # - INSERT INTO t3 VALUES (1,1), (2,2), (3,3) |
150 | -+ --echo # - DELETE t1, t2 FROM <...> |
151 | -+ --echo # - INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
152 | -+ --echo # - DELETE xt1, t2 FROM <...> |
153 | -+ --echo # - INSERT INTO t5(b) VALUES <...> (3 instances) |
154 | -+} |
155 | -+if (!$annotate) |
156 | -+{ |
157 | -+ --echo # No Annotate_rows events should appear below |
158 | -+} |
159 | -+--echo ######################################################################## |
160 | -+FLUSH LOGS; |
161 | -+ |
162 | -+--source include/binlog_start_pos.inc |
163 | -+let $start_pos= `select @binlog_start_pos`; |
164 | -+--replace_column 2 # 5 # |
165 | -+--replace_result $start_pos <start_pos> |
166 | -+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// |
167 | -+--eval show binlog events in 'slave-bin.000001' from $start_pos |
168 | -+ |
169 | -+--echo # |
170 | -+--echo ######################################################################## |
171 | -+--echo # INSERTs DELAYED ON MASTERs |
172 | -+--echo ######################################################################## |
173 | -+connection master; |
174 | -+SET SESSION binlog_annotate_rows_events = ON; |
175 | -+INSERT DELAYED INTO test1.t4 VALUES (1,1); |
176 | -+FLUSH TABLES; |
177 | -+SELECT * FROM test1.t4 ORDER BY a; |
178 | -+ |
179 | -+sync_slave_with_master; |
180 | -+connection master; |
181 | -+sync_slave_with_master; |
182 | -+ |
183 | -+--echo ######################################################################## |
184 | -+--echo # ON SLAVE |
185 | -+--echo # No Annotate_rows events should appear below |
186 | -+--echo ######################################################################## |
187 | -+FLUSH LOGS; |
188 | -+ |
189 | -+--exec $MYSQL --host=127.0.0.1 --port=$SLAVE_MYPORT test -e "show binlog events in 'slave-bin.000002'" > $MYSQLTEST_VARDIR/tmp/annotated_events.txt |
190 | -+perl; |
191 | -+ open F, '<', "$ENV{MYSQLTEST_VARDIR}/tmp/annotated_events.txt" or die; |
192 | -+ binmode STDOUT; |
193 | -+ while (defined ($_ = <F>)) { |
194 | -+ if (/Annotate_rows/) { |
195 | -+ s/[0-9]+\sAnnotate_rows\s[0-9]+\s[0-9]+/# Annotate_rows # #/; |
196 | -+ print($_); |
197 | -+ $_ = <F>; |
198 | -+ s/[0-9]+\sTable_map\s[0-9]+\s[0-9]+\stable_id:\s[0-9]+/# Table_map # # table_id: #/; |
199 | -+ print($_); |
200 | -+ } |
201 | -+ } |
202 | -+EOF |
203 | -+ |
204 | -+# Clean-up |
205 | -+connection master; |
206 | -+--disable_query_log |
207 | -+DROP DATABASE test1; |
208 | -+sync_slave_with_master; |
209 | -+--enable_query_log |
210 | -+ |
211 | -+--source include/rpl_end.inc |
212 | --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test |
213 | +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test |
214 | @@ -6,6 +6,10 @@ |
215 | @@ -1490,54 +1297,6 @@ |
216 | +source include/rpl_reset.inc; |
217 | +enable_warnings; |
218 | +enable_query_log; |
219 | ---- /dev/null |
220 | -+++ b/mysql-test/include/binlog_start_pos.inc |
221 | -@@ -0,0 +1,26 @@ |
222 | -+############################################################################## |
223 | -+# |
224 | -+# binlog_start_pos is the postion of the the first event in the binary log |
225 | -+# which follows the Format description event. Intended to reduce test suite |
226 | -+# dependance on the Format description event length changes (e.g. in case |
227 | -+# of adding new events). Evaluated as: |
228 | -+# |
229 | -+# binlog_start_pos = 4 /* binlog header */ + |
230 | -+# (Format_description_log_event length) |
231 | -+# |
232 | -+# Format_description_log_event length = |
233 | -+# 19 /* event common header */ + |
234 | -+# 57 /* misc stuff in the Format description header */ + |
235 | -+# number of events. |
236 | -+# |
237 | -+# With current number of events = 160, |
238 | -+# |
239 | -+# binlog_start_pos = 4 + 19 + 57 + 160 = 240. |
240 | -+# |
241 | -+############################################################################## |
242 | -+ |
243 | -+let $binlog_start_pos=240; |
244 | -+--disable_query_log |
245 | -+SET @binlog_start_pos=240; |
246 | -+--enable_query_log |
247 | -+ |
248 | ---- a/mysql-test/include/show_binlog_events2.inc |
249 | -+++ b/mysql-test/include/show_binlog_events2.inc |
250 | -@@ -1,4 +1,4 @@ |
251 | ----let $binlog_start=106 |
252 | -+--let $binlog_start=240 |
253 | - --replace_result $binlog_start <binlog_start> |
254 | - --replace_column 2 # 5 # |
255 | - --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ |
256 | ---- a/mysql-test/include/show_binlog_events.inc |
257 | -+++ b/mysql-test/include/show_binlog_events.inc |
258 | -@@ -3,7 +3,7 @@ |
259 | - # |
260 | - # Useage: |
261 | - # let $binlog_file= master-bin.000002; |
262 | --# let $binlog_start= 106; |
263 | -+# let $binlog_start= 240; |
264 | - # let $binlog_limit= 1, 3; |
265 | - # source include/show_binlog_events.inc; |
266 | - # |
267 | --- a/mysql-test/include/test_fieldsize.inc |
268 | +++ b/mysql-test/include/test_fieldsize.inc |
269 | @@ -22,7 +22,7 @@ |
270 | @@ -1549,129 +1308,6 @@ |
271 | --let $show_slave_sql_error= 1 |
272 | --source include/wait_for_slave_sql_error.inc |
273 | |
274 | ---- a/mysql-test/r/ctype_cp932_binlog_stm.result |
275 | -+++ b/mysql-test/r/ctype_cp932_binlog_stm.result |
276 | -@@ -44,9 +44,6 @@ |
277 | - master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293 |
278 | - master-bin.000001 # Query # # use `test`; DROP TABLE t4 |
279 | - End of 5.0 tests |
280 | --call mtr.add_suppression("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"); |
281 | --SHOW BINLOG EVENTS FROM 365; |
282 | --ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error |
283 | - Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. |
284 | - CREATE TABLE t1 (a varchar(16)) character set cp932; |
285 | - INSERT INTO t1 VALUES (0x8372835E),(0x8352835E); |
286 | ---- a/mysql-test/r/mysqlbinlog.result |
287 | -+++ b/mysql-test/r/mysqlbinlog.result |
288 | -@@ -1,15 +1,17 @@ |
289 | - reset master; |
290 | -+SET @save_binlog_size= @@global.max_binlog_size; |
291 | -+SET @@global.max_binlog_size= 4096; |
292 | - set timestamp=1000000000; |
293 | - drop table if exists t1,t2,t3,t4,t5,t03,t04; |
294 | - create table t1 (word varchar(20)); |
295 | - create table t2 (id int auto_increment not null primary key); |
296 | - insert into t1 values ("abirvalg"); |
297 | - insert into t2 values (); |
298 | --load data infile '../../std_data/words.dat' into table t1; |
299 | --load data infile '../../std_data/words.dat' into table t1; |
300 | --load data infile '../../std_data/words.dat' into table t1; |
301 | --load data infile '../../std_data/words.dat' into table t1; |
302 | --load data infile '../../std_data/words.dat' into table t1; |
303 | -+load data infile '../../std_data/words3.dat' into table t1; |
304 | -+load data infile '../../std_data/words3.dat' into table t1; |
305 | -+load data infile '../../std_data/words3.dat' into table t1; |
306 | -+load data infile '../../std_data/words3.dat' into table t1; |
307 | -+load data infile '../../std_data/words3.dat' into table t1; |
308 | - insert into t1 values ("Alas"); |
309 | - flush logs; |
310 | - |
311 | -@@ -220,7 +222,6 @@ |
312 | - /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
313 | - DELIMITER /*!*/; |
314 | - ROLLBACK/*!*/; |
315 | --use test/*!*/; |
316 | - SET TIMESTAMP=1108844556/*!*/; |
317 | - SET @@session.pseudo_thread_id=999999999/*!*/; |
318 | - SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
319 | -@@ -228,6 +229,7 @@ |
320 | - SET @@session.collation_database=DEFAULT/*!*/; |
321 | - BEGIN |
322 | - /*!*/; |
323 | -+use test/*!*/; |
324 | - SET TIMESTAMP=1108844555/*!*/; |
325 | - insert t1 values (1) |
326 | - /*!*/; |
327 | -@@ -239,7 +241,6 @@ |
328 | - /*!40019 SET @@session.max_insert_delayed_threads=0*/; |
329 | - /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
330 | - DELIMITER /*!*/; |
331 | --use test/*!*/; |
332 | - SET TIMESTAMP=1108844556/*!*/; |
333 | - SET @@session.pseudo_thread_id=999999999/*!*/; |
334 | - SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
335 | -@@ -247,6 +248,7 @@ |
336 | - SET @@session.collation_database=DEFAULT/*!*/; |
337 | - BEGIN |
338 | - /*!*/; |
339 | -+use test/*!*/; |
340 | - SET TIMESTAMP=1108844555/*!*/; |
341 | - insert t1 values (1) |
342 | - /*!*/; |
343 | -@@ -255,6 +257,7 @@ |
344 | - ROLLBACK /* added by mysqlbinlog */; |
345 | - /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
346 | - drop table t1,t2; |
347 | -+SET @@global.max_binlog_size= @save_binlog_size; |
348 | - flush logs; |
349 | - flush logs; |
350 | - select * from t5 /* must be (1),(1) */; |
351 | -@@ -377,14 +380,14 @@ |
352 | - /*!*/; |
353 | - SET TIMESTAMP=1000000000/*!*/; |
354 | - SET @@session.collation_database=7/*!*/; |
355 | --LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
356 | -+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
357 | - /*!*/; |
358 | - SET TIMESTAMP=1000000000/*!*/; |
359 | - SET @@session.collation_database=DEFAULT/*!*/; |
360 | --LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
361 | -+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
362 | - /*!*/; |
363 | - SET TIMESTAMP=1000000000/*!*/; |
364 | --LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
365 | -+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
366 | - /*!*/; |
367 | - SET TIMESTAMP=1000000000/*!*/; |
368 | - drop table t1 |
369 | -@@ -581,7 +584,6 @@ |
370 | - SET @@session.collation_database=DEFAULT/*!*/; |
371 | - BEGIN |
372 | - /*!*/; |
373 | --use test/*!*/; |
374 | - SET TIMESTAMP=1266652094/*!*/; |
375 | - SavePoint mixed_cases |
376 | - /*!*/; |
377 | -@@ -592,11 +594,9 @@ |
378 | - SET TIMESTAMP=1266652094/*!*/; |
379 | - INSERT INTO db1.t1 VALUES(40) |
380 | - /*!*/; |
381 | --use test/*!*/; |
382 | - SET TIMESTAMP=1266652094/*!*/; |
383 | - ROLLBACK TO mixed_cases |
384 | - /*!*/; |
385 | --use db1/*!*/; |
386 | - SET TIMESTAMP=1266652094/*!*/; |
387 | - INSERT INTO db1.t2 VALUES("after rollback to") |
388 | - /*!*/; |
389 | -@@ -624,7 +624,6 @@ |
390 | - SET @@session.collation_database=DEFAULT/*!*/; |
391 | - BEGIN |
392 | - /*!*/; |
393 | --use test/*!*/; |
394 | - SET TIMESTAMP=1266652094/*!*/; |
395 | - SavePoint mixed_cases |
396 | - /*!*/; |
397 | --- /dev/null |
398 | +++ b/mysql-test/r/percona_fast_alter_column.result |
399 | @@ -0,0 +1,47 @@ |
400 | @@ -1838,75 +1474,6 @@ |
401 | +DEFAULT(t2) |
402 | +0000-00-00 00:00:00 |
403 | +DROP TABLE test; |
404 | ---- /dev/null |
405 | -+++ b/mysql-test/std_data/words3.dat |
406 | -@@ -0,0 +1,66 @@ |
407 | -+Aarhus |
408 | -+Aaron |
409 | -+Ababa |
410 | -+aback |
411 | -+abaft |
412 | -+abandon |
413 | -+abandoned |
414 | -+abandoning |
415 | -+abandonment |
416 | -+abandons |
417 | -+Aarhus |
418 | -+Aaron |
419 | -+Ababa |
420 | -+aback |
421 | -+abaft |
422 | -+abandon |
423 | -+abandoned |
424 | -+abandoning |
425 | -+abandonment |
426 | -+abandons |
427 | -+abase |
428 | -+abased |
429 | -+abasement |
430 | -+abasements |
431 | -+abases |
432 | -+abash |
433 | -+abashed |
434 | -+abashes |
435 | -+abashing |
436 | -+abasing |
437 | -+abate |
438 | -+abated |
439 | -+abatement |
440 | -+abatements |
441 | -+abater |
442 | -+abates |
443 | -+abating |
444 | -+Abba |
445 | -+abbe |
446 | -+abbey |
447 | -+abbeys |
448 | -+abbot |
449 | -+abbots |
450 | -+Abbott |
451 | -+abbreviate |
452 | -+abbreviated |
453 | -+abbreviates |
454 | -+abbreviating |
455 | -+abbreviation |
456 | -+abbreviations |
457 | -+Abby |
458 | -+abdomen |
459 | -+abdomens |
460 | -+abdominal |
461 | -+abduct |
462 | -+abducted |
463 | -+abduction |
464 | -+abductions |
465 | -+abductor |
466 | -+abductors |
467 | -+abducts |
468 | -+Abe |
469 | -+abed |
470 | -+Abel |
471 | -+Abelian |
472 | -+Abelson |
473 | --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result |
474 | +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result |
475 | @@ -93,6 +93,7 @@ |
476 | @@ -1917,26 +1484,6 @@ |
477 | # |
478 | # Bug #54393: crash and/or valgrind errors in |
479 | # mysql_client_binlog_statement |
480 | ---- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result |
481 | -+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result |
482 | -@@ -331,7 +331,7 @@ |
483 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 243 ) |
484 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 242 ) |
485 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 241 ) |
486 | --master-bin.000001 # Query # # use `test`; insert into t1 values( 240 ) |
487 | -+master-bin.000001 # Query # # use `test`; insert into t1 values( <binlog_start> ) |
488 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 239 ) |
489 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 238 ) |
490 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 237 ) |
491 | -@@ -465,7 +465,7 @@ |
492 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 109 ) |
493 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 108 ) |
494 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 107 ) |
495 | --master-bin.000001 # Query # # use `test`; insert into t1 values( <binlog_start> ) |
496 | -+master-bin.000001 # Query # # use `test`; insert into t1 values( 106 ) |
497 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 105 ) |
498 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 104 ) |
499 | - master-bin.000001 # Query # # use `test`; insert into t1 values( 103 ) |
500 | --- a/mysql-test/suite/binlog/t/binlog_base64_flag.test |
501 | +++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test |
502 | @@ -153,6 +153,7 @@ |
503 | @@ -1947,258 +1494,6 @@ |
504 | |
505 | --echo # |
506 | --echo # Bug #54393: crash and/or valgrind errors in |
507 | ---- a/mysql-test/suite/binlog/t/binlog_incident.test |
508 | -+++ b/mysql-test/suite/binlog/t/binlog_incident.test |
509 | -@@ -4,6 +4,7 @@ |
510 | - |
511 | - source include/have_log_bin.inc; |
512 | - source include/have_debug.inc; |
513 | -+source include/binlog_start_pos.inc; |
514 | - |
515 | - let $MYSQLD_DATADIR= `select @@datadir`; |
516 | - RESET MASTER; |
517 | -@@ -20,7 +21,7 @@ |
518 | - DROP TABLE t1; |
519 | - FLUSH LOGS; |
520 | - |
521 | --exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; |
522 | -+exec $MYSQL_BINLOG --start-position=$binlog_start_pos $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; |
523 | - --disable_query_log |
524 | - eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl; |
525 | - --enable_query_log |
526 | ---- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test |
527 | -+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test |
528 | -@@ -1,5 +1,6 @@ |
529 | - -- source include/have_debug.inc |
530 | - -- source include/have_binlog_format_statement.inc |
531 | -+-- source include/binlog_start_pos.inc |
532 | - # |
533 | - # bug#27571 asynchronous setting mysql_$query()'s local error and |
534 | - # Query_log_event::error_code |
535 | -@@ -24,7 +25,7 @@ |
536 | - # for some constants like the offset of the first real event |
537 | - # that is different between severs versions. |
538 | - let $MYSQLD_DATADIR= `select @@datadir`; |
539 | ----exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog |
540 | -+--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog |
541 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
542 | - eval select |
543 | - (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) |
544 | ---- a/mysql-test/suite/binlog/t/binlog_killed.test |
545 | -+++ b/mysql-test/suite/binlog/t/binlog_killed.test |
546 | -@@ -1,5 +1,6 @@ |
547 | - -- source include/have_innodb.inc |
548 | - -- source include/have_binlog_format_statement.inc |
549 | -+-- source include/binlog_start_pos.inc |
550 | - |
551 | - # You cannot use `KILL' with the Embedded MySQL Server library, |
552 | - # because the embedded server merely runs inside the threads of the host |
553 | -@@ -51,7 +52,8 @@ |
554 | - let $rows= `select count(*) from t2 /* must be 2 or 0 */`; |
555 | - |
556 | - let $MYSQLD_DATADIR= `select @@datadir`; |
557 | ----exec $MYSQL_BINLOG --force-if-open --start-position=134 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog |
558 | -+let $start_pos= `select @binlog_start_pos + 28`; |
559 | -+--exec $MYSQL_BINLOG --force-if-open --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog |
560 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
561 | - eval select |
562 | - (@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) |
563 | ---- /dev/null |
564 | -+++ b/mysql-test/suite/binlog/t/binlog_row_annotate-master.opt |
565 | -@@ -0,0 +1 @@ |
566 | -+--timezone=GMT-3 --binlog-do-db=test1 --binlog-do-db=test2 --binlog-do-db=test3 |
567 | ---- /dev/null |
568 | -+++ b/mysql-test/suite/binlog/t/binlog_row_annotate.test |
569 | -@@ -0,0 +1,189 @@ |
570 | -+############################################################################### |
571 | -+# WL47: Store in binlog text of statements that caused RBR events |
572 | -+# new event: ANNOTATE_ROWS_EVENT |
573 | -+# new master option: --binlog-annotate-rows-events |
574 | -+# new mysqlbinlog option: --skip-annotate-rows-events |
575 | -+# |
576 | -+# Intended to test that: |
577 | -+# *** If the --binlog-annotate-rows-events option is switched on on master |
578 | -+# then Annotate_rows events: |
579 | -+# - are generated; |
580 | -+# - are genrated only once for "multi-table-maps" rbr queries; |
581 | -+# - are not generated when the corresponding queries are filtered away; |
582 | -+# - are generated when the corresponding queries are filtered away partialy |
583 | -+# (e.g. in case of multi-delete). |
584 | -+# *** Annotate_rows events are printed by mysqlbinlog started without |
585 | -+# --skip-annotate-rows-events options both in remote and local cases. |
586 | -+# *** Annotate_rows events are not printed by mysqlbinlog started with |
587 | -+# --skip-annotate-rows-events options both in remote and local cases. |
588 | -+############################################################################### |
589 | -+ |
590 | -+--source include/have_log_bin.inc |
591 | -+--source include/have_binlog_format_row.inc |
592 | -+--source include/binlog_start_pos.inc |
593 | -+ |
594 | -+--disable_query_log |
595 | -+ |
596 | -+# Fix timestamp to avoid varying results |
597 | -+SET timestamp=1000000000; |
598 | -+ |
599 | -+# Delete all existing binary logs |
600 | -+RESET MASTER; |
601 | -+ |
602 | -+--disable_warnings |
603 | -+DROP DATABASE IF EXISTS test1; |
604 | -+DROP DATABASE IF EXISTS test2; |
605 | -+DROP DATABASE IF EXISTS test3; |
606 | -+DROP DATABASE IF EXISTS xtest1; |
607 | -+DROP DATABASE IF EXISTS xtest2; |
608 | -+--enable_warnings |
609 | -+ |
610 | -+CREATE DATABASE test1; |
611 | -+CREATE TABLE test1.t1(a int); |
612 | -+ |
613 | -+CREATE DATABASE test2; |
614 | -+CREATE TABLE test2.t2(a int); |
615 | -+CREATE VIEW test2.v2 AS SELECT * FROM test2.t2; |
616 | -+ |
617 | -+CREATE DATABASE test3; |
618 | -+CREATE TABLE test3.t3(a int); |
619 | -+ |
620 | -+CREATE DATABASE xtest1; |
621 | -+CREATE TABLE xtest1.xt1(a int); |
622 | -+ |
623 | -+CREATE DATABASE xtest2; |
624 | -+CREATE TABLE xtest2.xt2(a int); |
625 | -+ |
626 | -+# By default SESSION binlog_annotate_rows_events = OFF |
627 | -+ |
628 | -+INSERT INTO test1.t1 VALUES (1), (2), (3); |
629 | -+ |
630 | -+SET SESSION binlog_annotate_rows_events = ON; |
631 | -+ |
632 | -+INSERT INTO test2.t2 VALUES (1), (2), (3); |
633 | -+INSERT INTO test3.t3 VALUES (1), (2), (3); |
634 | -+ |
635 | -+# This query generates two Table maps but the Annotate |
636 | -+# event should appear only once before the first Table map |
637 | -+DELETE test1.t1, test2.t2 |
638 | -+ FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
639 | -+ WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a; |
640 | -+ |
641 | -+# This event should be filtered out together with Annotate event |
642 | -+INSERT INTO xtest1.xt1 VALUES (1), (2), (3); |
643 | -+ |
644 | -+# This event should pass the filter |
645 | -+INSERT INTO test2.v2 VALUES (1), (2), (3); |
646 | -+ |
647 | -+# This event should pass the filter only for test2.t2 part |
648 | -+DELETE xtest1.xt1, test2.t2 |
649 | -+ FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
650 | -+ WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3.a; |
651 | -+ |
652 | -+# These events should be filtered out together with Annotate events |
653 | -+INSERT INTO xtest1.xt1 VALUES (1), (2), (3); |
654 | -+INSERT INTO xtest2.xt2 VALUES (1), (2), (3); |
655 | -+DELETE xtest1.xt1, xtest2.xt2 |
656 | -+ FROM xtest1.xt1 INNER JOIN xtest2.xt2 INNER JOIN test3.t3 |
657 | -+ WHERE xtest1.xt1.a=xtest2.xt2.a AND xtest2.xt2.a=test3.t3.a; |
658 | -+ |
659 | -+FLUSH LOGS; |
660 | -+--enable_query_log |
661 | -+ |
662 | -+--echo ##################################################################################### |
663 | -+--echo # The following Annotate_rows events should appear below: |
664 | -+--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
665 | -+--echo # - INSERT INTO test3.t3 VALUES (1), (2), (3) |
666 | -+--echo # - DELETE test1.t1, test2.t2 FROM <...> |
667 | -+--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
668 | -+--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> |
669 | -+--echo ##################################################################################### |
670 | -+ |
671 | -+let $start_pos= `select @binlog_start_pos`; |
672 | -+--replace_column 2 # 5 # |
673 | -+--replace_result $start_pos <start_pos> |
674 | -+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// |
675 | -+--eval show binlog events in 'master-bin.000001' from $start_pos |
676 | -+ |
677 | -+--echo # |
678 | -+--echo ##################################################################################### |
679 | -+--echo # mysqlbinlog |
680 | -+--echo # The following Annotates should appear in this output: |
681 | -+--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
682 | -+--echo # - INSERT INTO test3.t3 VALUES (1), (2), (3) |
683 | -+--echo # - DELETE test1.t1, test2.t2 FROM <...> (with two subsequent Table maps) |
684 | -+--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
685 | -+--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map) |
686 | -+--echo ##################################################################################### |
687 | -+ |
688 | -+let $MYSQLD_DATADIR= `select @@datadir`; |
689 | -+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
690 | -+--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 |
691 | -+ |
692 | -+--echo # |
693 | -+--echo ##################################################################################### |
694 | -+--echo # mysqlbinlog --database=test1 |
695 | -+--echo # The following Annotate should appear in this output: |
696 | -+--echo # - DELETE test1.t1, test2.t2 FROM <...> |
697 | -+--echo ##################################################################################### |
698 | -+ |
699 | -+let $MYSQLD_DATADIR= `select @@datadir`; |
700 | -+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
701 | -+--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v $MYSQLD_DATADIR/master-bin.000001 |
702 | -+ |
703 | -+--echo # |
704 | -+--echo ##################################################################################### |
705 | -+--echo # mysqlbinlog --skip-annotate-rows-events |
706 | -+--echo # No Annotates should appear in this output |
707 | -+--echo ##################################################################################### |
708 | -+ |
709 | -+let $MYSQLD_DATADIR= `select @@datadir`; |
710 | -+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
711 | -+--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v $MYSQLD_DATADIR/master-bin.000001 |
712 | -+ |
713 | -+--echo # |
714 | -+--echo ##################################################################################### |
715 | -+--echo # mysqlbinlog --read-from-remote-server |
716 | -+--echo # The following Annotates should appear in this output: |
717 | -+--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
718 | -+--echo # - INSERT INTO test3.t3 VALUES (1), (2), (3) |
719 | -+--echo # - DELETE test1.t1, test2.t2 FROM <...> (with two subsequent Table maps) |
720 | -+--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
721 | -+--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map) |
722 | -+--echo ##################################################################################### |
723 | -+ |
724 | -+let $MYSQLD_DATADIR= `select @@datadir`; |
725 | -+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
726 | -+--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 |
727 | -+ |
728 | -+--echo # |
729 | -+--echo ##################################################################################### |
730 | -+--echo # mysqlbinlog --read-from-remote-server --database=test1 |
731 | -+--echo # The following Annotate should appear in this output: |
732 | -+--echo # - DELETE test1.t1, test2.t2 FROM <...> |
733 | -+--echo ##################################################################################### |
734 | -+ |
735 | -+let $MYSQLD_DATADIR= `select @@datadir`; |
736 | -+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
737 | -+--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 |
738 | -+ |
739 | -+--echo # |
740 | -+--echo ##################################################################################### |
741 | -+--echo # mysqlbinlog --read-from-remote-server --skip-annotate-rows-events |
742 | -+--echo # No Annotates should appear in this output |
743 | -+--echo ##################################################################################### |
744 | -+ |
745 | -+let $MYSQLD_DATADIR= `select @@datadir`; |
746 | -+--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
747 | -+--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 |
748 | -+ |
749 | -+# Clean-up |
750 | -+ |
751 | -+--disable_query_log |
752 | -+DROP DATABASE test1; |
753 | -+DROP DATABASE test2; |
754 | -+DROP DATABASE test3; |
755 | -+DROP DATABASE xtest1; |
756 | -+DROP DATABASE xtest2; |
757 | -+--enable_query_log |
758 | -+ |
759 | --- /dev/null |
760 | +++ b/mysql-test/suite/rpl/r/percona_mixed_binlog_direct.result |
761 | @@ -0,0 +1,1462 @@ |
762 | @@ -6345,17 +5640,6 @@ |
763 | SELECT COUNT(*) FROM t1; |
764 | COUNT(*) |
765 | 0 |
766 | ---- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result |
767 | -+++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result |
768 | -@@ -21,7 +21,7 @@ |
769 | - [on slave] |
770 | - ---- Wait until slave stops with an error ---- |
771 | - include/wait_for_slave_sql_error.inc [errno=1062] |
772 | --Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error) |
773 | -+Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 480 (expected "duplicate key" error) |
774 | - call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); |
775 | - SELECT * FROM t1; |
776 | - a |
777 | --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result |
778 | +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result |
779 | @@ -117,17 +117,17 @@ |
780 | @@ -7486,47 +6770,6 @@ |
781 | + |
782 | # END 5.1 Test Case |
783 | --source include/rpl_end.inc |
784 | ---- /dev/null |
785 | -+++ b/mysql-test/suite/rpl/t/rpl_row_annotate_dont-slave.opt |
786 | -@@ -0,0 +1 @@ |
787 | -+--log-slave-updates --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2 |
788 | -\ No newline at end of file |
789 | ---- /dev/null |
790 | -+++ b/mysql-test/suite/rpl/t/rpl_row_annotate_dont.test |
791 | -@@ -0,0 +1,9 @@ |
792 | -+############################################################################### |
793 | -+# WL47: Store in binlog text of statements that caused RBR events |
794 | -+# Wrapper for extra/rpl/rpl_row_annotate.test. |
795 | -+# Intended to test that if the --replicate-annotate-rows-events option |
796 | -+# is switched off on slave then Annotate_events are not reproduced. |
797 | -+############################################################################### |
798 | -+ |
799 | -+--source include/have_binlog_format_row.inc |
800 | -+--source extra/rpl_tests/rpl_row_annotate.test |
801 | ---- /dev/null |
802 | -+++ b/mysql-test/suite/rpl/t/rpl_row_annotate_do-slave.opt |
803 | -@@ -0,0 +1 @@ |
804 | -+--log-slave-updates --replicate-annotate-rows-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2 |
805 | -\ No newline at end of file |
806 | ---- /dev/null |
807 | -+++ b/mysql-test/suite/rpl/t/rpl_row_annotate_do.test |
808 | -@@ -0,0 +1,16 @@ |
809 | -+############################################################################### |
810 | -+# WL47: Store in binlog text of statements that caused RBR events |
811 | -+# Wrapper for extra/rpl/rpl_row_annotate.test. |
812 | -+# Intended to test that if the --replicate-annotate-rows-events option |
813 | -+# is switched on on slave then Annotate_events: |
814 | -+# - are reproduced on slave |
815 | -+# - are reproduced only once for "multi-table-maps" rbr queries |
816 | -+# - are not reproduced when the corresponding queries are filtered away |
817 | -+# on replication |
818 | -+# - are reproduced when the corresponding queries are filtered away partialy |
819 | -+# (e.g. in case of multi-delete) |
820 | -+# - are not generated on slave for queries that are not annotated on master. |
821 | -+############################################################################### |
822 | -+ |
823 | -+--source include/have_binlog_format_row.inc |
824 | -+--source extra/rpl_tests/rpl_row_annotate.test |
825 | --- a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test |
826 | +++ b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test |
827 | @@ -2,6 +2,8 @@ |
828 | @@ -7551,89 +6794,6 @@ |
829 | --disable_warnings |
830 | DROP TABLE IF EXISTS t1; |
831 | --enable_warnings |
832 | ---- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test |
833 | -+++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test |
834 | -@@ -1,7 +1,8 @@ |
835 | - # depends on the binlog output |
836 | - -- source include/have_binlog_format_row.inc |
837 | -+--source include/binlog_start_pos.inc |
838 | - |
839 | --let $rename_event_pos= 897; |
840 | -+let $rename_event_pos= `select @binlog_start_pos + 791`; |
841 | - |
842 | - # Bug#18326: Do not lock table for writing during prepare of statement |
843 | - # The use of the ps protocol causes extra table maps in the binlog, so |
844 | ---- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test |
845 | -+++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test |
846 | -@@ -162,15 +162,18 @@ |
847 | - |
848 | - remove_file $MYSQLTEST_VARDIR/tmp/master.sql; |
849 | - |
850 | -+--source include/binlog_start_pos.inc |
851 | - |
852 | - # this test for position option |
853 | --# By setting this position to 416, we should only get the create of t3 |
854 | -+# By setting this position to start_binlog_pos + 310, we should only get the create of t3 |
855 | -+let $start_pos= `select @binlog_start_pos + 310`; |
856 | -+let $stop_pos= `select @binlog_start_pos + 463`; |
857 | - --disable_query_log |
858 | - select "--- Test 2 position test --" as ""; |
859 | - --enable_query_log |
860 | - let $MYSQLD_DATADIR= `select @@datadir;`; |
861 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
862 | ----exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 --stop-position=569 $MYSQLD_DATADIR/master-bin.000001 |
863 | -+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=$start_pos --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 |
864 | - |
865 | - # These are tests for remote binlog. |
866 | - # They should return the same as previous test. |
867 | -@@ -181,7 +184,7 @@ |
868 | - |
869 | - # This is broken now |
870 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
871 | ----exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=569 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
872 | -+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
873 | - |
874 | - # This part is disabled due to bug #17654 |
875 | - |
876 | -@@ -257,7 +260,7 @@ |
877 | - select "--- Test 5 LOAD DATA --" as ""; |
878 | - --enable_query_log |
879 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
880 | ----exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=106 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
881 | -+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$binlog_start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
882 | - |
883 | - # Bug#7853 (mysqlbinlog does not accept input from stdin) |
884 | - |
885 | -@@ -265,14 +268,17 @@ |
886 | - select "--- Test 6 reading stdin --" as ""; |
887 | - --enable_query_log |
888 | - let $MYSQLD_DATADIR= `select @@datadir;`; |
889 | -+let $stop_pos= `select @binlog_start_pos + 463`; |
890 | - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
891 | ----exec $MYSQL_BINLOG --short-form --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001 |
892 | -+--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos - < $MYSQLD_DATADIR/master-bin.000001 |
893 | - |
894 | - --disable_query_log |
895 | - select "--- Test 7 reading stdin w/position --" as ""; |
896 | - --enable_query_log |
897 | -+let $start_pos= `select @binlog_start_pos + 310`; |
898 | -+let $stop_pos= `select @binlog_start_pos + 463`; |
899 | - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
900 | ----exec $MYSQL_BINLOG --short-form --position=416 --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001 |
901 | -+--exec $MYSQL_BINLOG --short-form --position=$start_pos --stop-position=$stop_pos - < $MYSQLD_DATADIR/master-bin.000001 |
902 | - |
903 | - # Bug#16217 (mysql client did not know how not switch its internal charset) |
904 | - --disable_query_log |
905 | ---- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test |
906 | -+++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test |
907 | -@@ -1,5 +1,6 @@ |
908 | - # depends on the binlog output |
909 | - --source include/have_binlog_format_mixed_or_statement.inc |
910 | -+--source include/binlog_start_pos.inc |
911 | - |
912 | --let $rename_event_pos= 656; |
913 | -+let $rename_event_pos= `select @binlog_start_pos + 550`; |
914 | - -- source extra/rpl_tests/rpl_flsh_tbls.test |
915 | --- /dev/null |
916 | +++ b/mysql-test/suite/rpl/t/rpl_typeconv.test |
917 | @@ -0,0 +1,75 @@ |
918 | @@ -7712,436 +6872,6 @@ |
919 | +set global slave_type_conversions = @saved_slave_type_conversions; |
920 | + |
921 | +source include/rpl_end.inc; |
922 | ---- a/mysql-test/t/ctype_cp932_binlog_stm.test |
923 | -+++ b/mysql-test/t/ctype_cp932_binlog_stm.test |
924 | -@@ -28,16 +28,6 @@ |
925 | - |
926 | - --echo End of 5.0 tests |
927 | - |
928 | --# |
929 | --# #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump |
930 | --# Note: 364 is a magic position (found experimentally, depends on |
931 | --# the log's contents) that caused the server crash. |
932 | -- |
933 | --call mtr.add_suppression("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"); |
934 | -- |
935 | ----error 1220 |
936 | --SHOW BINLOG EVENTS FROM 365; |
937 | -- |
938 | - --echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. |
939 | - CREATE TABLE t1 (a varchar(16)) character set cp932; |
940 | - INSERT INTO t1 VALUES (0x8372835E),(0x8352835E); |
941 | ---- a/mysql-test/t/mysqlbinlog2.test |
942 | -+++ b/mysql-test/t/mysqlbinlog2.test |
943 | -@@ -3,7 +3,7 @@ |
944 | - |
945 | - # TODO: Need to look at making row based version once new binlog client is complete. |
946 | - -- source include/have_binlog_format_mixed_or_statement.inc |
947 | -- |
948 | -+-- source include/binlog_start_pos.inc |
949 | - |
950 | - --disable_warnings |
951 | - drop table if exists t1; |
952 | -@@ -50,15 +50,19 @@ |
953 | - --disable_query_log |
954 | - select "--- start-position --" as ""; |
955 | - --enable_query_log |
956 | ----exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 |
957 | -+let $start_pos= `select @binlog_start_pos + 502`; |
958 | -+--exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 |
959 | - --disable_query_log |
960 | - select "--- stop-position --" as ""; |
961 | - --enable_query_log |
962 | ----exec $MYSQL_BINLOG --short-form --stop-position=608 $MYSQLD_DATADIR/master-bin.000001 |
963 | -+let $stop_pos= `select @binlog_start_pos + 502`; |
964 | -+--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 |
965 | - --disable_query_log |
966 | - select "--- start and stop positions ---" as ""; |
967 | - --enable_query_log |
968 | ----exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 $MYSQLD_DATADIR/master-bin.000001 |
969 | -+let $start_pos= `select @binlog_start_pos + 502`; |
970 | -+let $stop_pos= `select @binlog_start_pos + 619`; |
971 | -+--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position $stop_pos $MYSQLD_DATADIR/master-bin.000001 |
972 | - --disable_query_log |
973 | - select "--- start-datetime --" as ""; |
974 | - --enable_query_log |
975 | -@@ -84,11 +88,13 @@ |
976 | - --disable_query_log |
977 | - select "--- start-position --" as ""; |
978 | - --enable_query_log |
979 | ----exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
980 | -+let $start_pos= `select @binlog_start_pos + 502`; |
981 | -+--exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
982 | - --disable_query_log |
983 | - select "--- stop-position --" as ""; |
984 | - --enable_query_log |
985 | ----exec $MYSQL_BINLOG --short-form --stop-position=134 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
986 | -+let $stop_pos= `select @binlog_start_pos + 28`; |
987 | -+--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
988 | - --disable_query_log |
989 | - select "--- start-datetime --" as ""; |
990 | - --enable_query_log |
991 | -@@ -111,15 +117,19 @@ |
992 | - --disable_query_log |
993 | - select "--- start-position --" as ""; |
994 | - --enable_query_log |
995 | ----exec $MYSQL_BINLOG --short-form --start-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
996 | -+let $start_pos= `select @binlog_start_pos + 502`; |
997 | -+--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
998 | - --disable_query_log |
999 | - select "--- stop-position --" as ""; |
1000 | - --enable_query_log |
1001 | ----exec $MYSQL_BINLOG --short-form --stop-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
1002 | -+let $stop_pos= `select @binlog_start_pos + 502`; |
1003 | -+--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
1004 | - --disable_query_log |
1005 | - select "--- start and stop positions ---" as ""; |
1006 | - --enable_query_log |
1007 | ----exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
1008 | -+let $start_pos= `select @binlog_start_pos + 502`; |
1009 | -+let $stop_pos= `select @binlog_start_pos + 619`; |
1010 | -+--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position $stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
1011 | - --disable_query_log |
1012 | - select "--- start-datetime --" as ""; |
1013 | - --enable_query_log |
1014 | -@@ -142,11 +152,13 @@ |
1015 | - --disable_query_log |
1016 | - select "--- start-position --" as ""; |
1017 | - --enable_query_log |
1018 | ----exec $MYSQL_BINLOG --short-form --start-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
1019 | -+let $start_pos= `select @binlog_start_pos + 502`; |
1020 | -+--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
1021 | - --disable_query_log |
1022 | - select "--- stop-position --" as ""; |
1023 | - --enable_query_log |
1024 | ----exec $MYSQL_BINLOG --short-form --stop-position=134 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
1025 | -+let $stop_pos= `select @binlog_start_pos + 28`; |
1026 | -+--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
1027 | - --disable_query_log |
1028 | - select "--- start-datetime --" as ""; |
1029 | - --enable_query_log |
1030 | ---- a/mysql-test/t/mysqlbinlog-master.opt |
1031 | -+++ b/mysql-test/t/mysqlbinlog-master.opt |
1032 | -@@ -1,2 +1 @@ |
1033 | ----max-binlog-size=4096 |
1034 | - --force-restart |
1035 | ---- a/mysql-test/t/mysqlbinlog.test |
1036 | -+++ b/mysql-test/t/mysqlbinlog.test |
1037 | -@@ -3,10 +3,18 @@ |
1038 | - -- source include/have_binlog_format_statement.inc |
1039 | - |
1040 | - -- source include/have_log_bin.inc |
1041 | -+-- source include/binlog_start_pos.inc |
1042 | - |
1043 | - # Deletes all the binary logs |
1044 | - reset master; |
1045 | - |
1046 | -+# We need small binlog size to break the last LOAD DATA INFILE below so that |
1047 | -+# the corresponding Begin_load_query will be written to master-bin.000001 |
1048 | -+# while the Execute_load_query will be written to master-bin.000002. |
1049 | -+ |
1050 | -+SET @save_binlog_size= @@global.max_binlog_size; |
1051 | -+SET @@global.max_binlog_size= 4096; |
1052 | -+ |
1053 | - # we need this for getting fixed timestamps inside of this test |
1054 | - set timestamp=1000000000; |
1055 | - |
1056 | -@@ -26,13 +34,15 @@ |
1057 | - |
1058 | - # test for load data and load data distributed among the several |
1059 | - # files (we need to fill up first binlog) |
1060 | --load data infile '../../std_data/words.dat' into table t1; |
1061 | --load data infile '../../std_data/words.dat' into table t1; |
1062 | --load data infile '../../std_data/words.dat' into table t1; |
1063 | --load data infile '../../std_data/words.dat' into table t1; |
1064 | --load data infile '../../std_data/words.dat' into table t1; |
1065 | -+load data infile '../../std_data/words3.dat' into table t1; |
1066 | -+load data infile '../../std_data/words3.dat' into table t1; |
1067 | -+load data infile '../../std_data/words3.dat' into table t1; |
1068 | -+load data infile '../../std_data/words3.dat' into table t1; |
1069 | -+load data infile '../../std_data/words3.dat' into table t1; |
1070 | - # simple query to show more in second binlog |
1071 | - insert into t1 values ("Alas"); |
1072 | -+ |
1073 | -+### Starting master-bin.000003 |
1074 | - flush logs; |
1075 | - |
1076 | - # delimiters are for easier debugging in future |
1077 | -@@ -46,7 +56,7 @@ |
1078 | - # |
1079 | - let $MYSQLD_DATADIR= `select @@datadir`; |
1080 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1081 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1082 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1083 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000001 |
1084 | - |
1085 | - # this should not fail but shouldn't produce any working statements |
1086 | -@@ -54,7 +64,7 @@ |
1087 | - select "--- Broken LOAD DATA --" as ""; |
1088 | - --enable_query_log |
1089 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1090 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1091 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1092 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000002 2> /dev/null |
1093 | - |
1094 | - # this should show almost nothing |
1095 | -@@ -62,17 +72,17 @@ |
1096 | - select "--- --database --" as ""; |
1097 | - --enable_query_log |
1098 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1099 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1100 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1101 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLD_DATADIR/master-bin.000001 2> /dev/null |
1102 | - |
1103 | - # this test for position option |
1104 | - --disable_query_log |
1105 | - select "--- --position --" as ""; |
1106 | - --enable_query_log |
1107 | -+let $start_pos= `select @binlog_start_pos + 227`; |
1108 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1109 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1110 | ----exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=332 $MYSQLD_DATADIR/master-bin.000002 |
1111 | -- |
1112 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1113 | -+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=$start_pos $MYSQLD_DATADIR/master-bin.000002 |
1114 | - |
1115 | - # These are tests for remote binlog. |
1116 | - # They should return the same as previous test. |
1117 | -@@ -83,7 +93,7 @@ |
1118 | - |
1119 | - # This is broken now |
1120 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1121 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1122 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1123 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
1124 | - |
1125 | - # This is broken too |
1126 | -@@ -91,7 +101,7 @@ |
1127 | - select "--- Broken LOAD DATA --" as ""; |
1128 | - --enable_query_log |
1129 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1130 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1131 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1132 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 2> /dev/null |
1133 | - |
1134 | - # And this too ! (altough it is documented) |
1135 | -@@ -99,34 +109,39 @@ |
1136 | - select "--- --database --" as ""; |
1137 | - --enable_query_log |
1138 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1139 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1140 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1141 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.000001 2> /dev/null |
1142 | - |
1143 | - # Strangely but this works |
1144 | - --disable_query_log |
1145 | - select "--- --position --" as ""; |
1146 | - --enable_query_log |
1147 | -+let $start_pos= `select @binlog_start_pos + 227`; |
1148 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1149 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1150 | ----exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=332 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
1151 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1152 | -+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=$start_pos --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
1153 | - |
1154 | - # Bug#7853 mysqlbinlog does not accept input from stdin |
1155 | - --disable_query_log |
1156 | - select "--- reading stdin --" as ""; |
1157 | - --enable_query_log |
1158 | - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
1159 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1160 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1161 | - --exec $MYSQL_BINLOG --short-form - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 |
1162 | - |
1163 | - --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
1164 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1165 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1166 | - --exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 |
1167 | - drop table t1,t2; |
1168 | - |
1169 | -+SET @@global.max_binlog_size= @save_binlog_size; |
1170 | -+ |
1171 | - # |
1172 | - # Bug#14157 utf8 encoding in binlog without set character_set_client |
1173 | - # |
1174 | -+### Starting master-bin.000004 |
1175 | - flush logs; |
1176 | -+ |
1177 | - --write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql |
1178 | - create table if not exists t5 (a int); |
1179 | - set names latin1; |
1180 | -@@ -140,6 +155,8 @@ |
1181 | - # resulted binlog, parly consisting of multi-byte utf8 chars, |
1182 | - # must be digestable for both client and server. In 4.1 the client |
1183 | - # should use default-character-set same as the server. |
1184 | -+ |
1185 | -+### Starting master-bin.000005 |
1186 | - flush logs; |
1187 | - --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000004 | $MYSQL |
1188 | - select * from t5 /* must be (1),(1) */; |
1189 | -@@ -150,6 +167,8 @@ |
1190 | - # Check that a dump created by mysqlbinlog reproduces |
1191 | - # lc_time_names dependent values correctly |
1192 | - # |
1193 | -+ |
1194 | -+### Starting master-bin.000006 |
1195 | - flush logs; |
1196 | - create table t5 (c1 int, c2 varchar(128) character set latin1 not null); |
1197 | - insert into t5 values (1, date_format('2001-01-01','%W')); |
1198 | -@@ -158,7 +177,10 @@ |
1199 | - set lc_time_names=en_US; |
1200 | - insert into t5 values (3, date_format('2001-01-01','%W')); |
1201 | - select * from t5 order by c1; |
1202 | -+ |
1203 | -+### Starting master-bin.000007 |
1204 | - flush logs; |
1205 | -+ |
1206 | - drop table t5; |
1207 | - --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000006 | $MYSQL |
1208 | - select * from t5 order by c1; |
1209 | -@@ -170,7 +192,10 @@ |
1210 | - --disable_warnings |
1211 | - drop procedure if exists p1; |
1212 | - --enable_warnings |
1213 | -+ |
1214 | -+### Starting master-bin.000008 |
1215 | - flush logs; |
1216 | -+ |
1217 | - delimiter //; |
1218 | - create procedure p1() |
1219 | - begin |
1220 | -@@ -178,12 +203,15 @@ |
1221 | - end; |
1222 | - // |
1223 | - delimiter ;// |
1224 | -+ |
1225 | -+### Starting master-bin.000009 |
1226 | - flush logs; |
1227 | -+ |
1228 | - call p1(); |
1229 | - drop procedure p1; |
1230 | - --error ER_SP_DOES_NOT_EXIST |
1231 | - call p1(); |
1232 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1233 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1234 | - --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 |
1235 | - --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 | $MYSQL |
1236 | - call p1(); |
1237 | -@@ -202,7 +230,9 @@ |
1238 | - # (LOAD DATA INFILE need it) |
1239 | - # |
1240 | - |
1241 | -+### Starting master-bin.000010 |
1242 | - flush logs; |
1243 | -+ |
1244 | - create table t1 (a varchar(64) character set utf8); |
1245 | - load data infile '../../std_data/loaddata6.dat' into table t1; |
1246 | - set character_set_database=koi8r; |
1247 | -@@ -217,9 +247,12 @@ |
1248 | - load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r; |
1249 | - select hex(a) from t1; |
1250 | - drop table t1; |
1251 | -+ |
1252 | -+### Starting master-bin.000011 |
1253 | - flush logs; |
1254 | -+ |
1255 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1256 | ----replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
1257 | -+--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
1258 | - --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000010 |
1259 | - |
1260 | - # |
1261 | -@@ -229,9 +262,14 @@ |
1262 | - |
1263 | - CREATE TABLE t1 (c1 CHAR(10)); |
1264 | - # we need this for getting fixed timestamps inside of this test |
1265 | -+### Starting master-bin.000012 |
1266 | - FLUSH LOGS; |
1267 | -+ |
1268 | - INSERT INTO t1 VALUES ('0123456789'); |
1269 | -+ |
1270 | -+### Starting master-bin.000013 |
1271 | - FLUSH LOGS; |
1272 | -+ |
1273 | - DROP TABLE t1; |
1274 | - |
1275 | - # We create a table, patch, and load the output into it |
1276 | -@@ -257,11 +295,16 @@ |
1277 | - # |
1278 | - # Bug#29928 incorrect connection_id() restoring from mysqlbinlog out |
1279 | - # |
1280 | -+### Starting master-bin.000014 |
1281 | - FLUSH LOGS; |
1282 | -+ |
1283 | - CREATE TABLE t1(a INT); |
1284 | - INSERT INTO t1 VALUES(connection_id()); |
1285 | - let $a= `SELECT a FROM t1`; |
1286 | -+ |
1287 | -+### Starting master-bin.000015 |
1288 | - FLUSH LOGS; |
1289 | -+ |
1290 | - let $outfile= $MYSQLTEST_VARDIR/tmp/bug29928.sql; |
1291 | - --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000014 > $outfile |
1292 | - DROP TABLE t1; |
1293 | -@@ -281,11 +324,12 @@ |
1294 | - exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTEST_VARDIR/tmp/bug31793.sql; |
1295 | - --remove_file $MYSQLTEST_VARDIR/tmp/bug31793.sql |
1296 | - |
1297 | -- |
1298 | - # |
1299 | - # Test --disable-force-if-open and --force-if-open |
1300 | - # |
1301 | -+### Starting master-bin.000016 |
1302 | - FLUSH LOGS; |
1303 | -+ |
1304 | - --error 1 |
1305 | - --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null |
1306 | - --exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null |
1307 | -@@ -300,9 +344,15 @@ |
1308 | - SHOW GRANTS FOR untrusted@localhost; |
1309 | - USE mysqltest1; |
1310 | - CREATE TABLE t1 (a INT, b CHAR(64)); |
1311 | -+ |
1312 | -+### Starting master-bin.000017 |
1313 | - flush logs; |
1314 | -+ |
1315 | - INSERT INTO t1 VALUES (1,USER()); |
1316 | -+ |
1317 | -+### Starting master-bin.000018 |
1318 | - flush logs; |
1319 | -+ |
1320 | - echo mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql; |
1321 | - exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000017 > $MYSQLTEST_VARDIR/tmp/bug31611.sql; |
1322 | - connect (unsecure,localhost,untrusted,,mysqltest1); |
1323 | -@@ -326,14 +376,20 @@ |
1324 | - connection default; |
1325 | - USE test; |
1326 | - SET BINLOG_FORMAT = STATEMENT; |
1327 | -+ |
1328 | -+### Starting master-bin.000019 |
1329 | - FLUSH LOGS; |
1330 | -+ |
1331 | - CREATE TABLE t1 (a_real FLOAT, an_int INT, a_decimal DECIMAL(5,2), a_string CHAR(32)); |
1332 | - SET @a_real = rand(20) * 1000; |
1333 | - SET @an_int = 1000; |
1334 | - SET @a_decimal = CAST(rand(19) * 999 AS DECIMAL(5,2)); |
1335 | - SET @a_string = 'Just a test'; |
1336 | - INSERT INTO t1 VALUES (@a_real, @an_int, @a_decimal, @a_string); |
1337 | -+ |
1338 | -+### Starting master-bin.000020 |
1339 | - FLUSH LOGS; |
1340 | -+ |
1341 | - query_vertical SELECT * FROM t1; |
1342 | - DROP TABLE t1; |
1343 | - |
1344 | -@@ -357,6 +413,7 @@ |
1345 | - |
1346 | - RESET MASTER; |
1347 | - FLUSH LOGS; |
1348 | -+ |
1349 | - --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $binlog_file |
1350 | - --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
1351 | - eval SELECT |
1352 | --- /dev/null |
1353 | +++ b/mysql-test/t/percona_fast_alter_column.test |
1354 | @@ -0,0 +1,65 @@ |
1355 | @@ -8308,15 +7038,7 @@ |
1356 | +DROP TABLE test; |
1357 | --- a/mysql-test/r/percona_server_variables_debug.result |
1358 | +++ b/mysql-test/r/percona_server_variables_debug.result |
1359 | -@@ -7,6 +7,7 @@ |
1360 | - BACK_LOG |
1361 | - BASEDIR |
1362 | - BIG_TABLES |
1363 | -+BINLOG_ANNOTATE_ROWS_EVENTS |
1364 | - BINLOG_CACHE_SIZE |
1365 | - BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES |
1366 | - BINLOG_FORMAT |
1367 | -@@ -101,6 +102,7 @@ |
1368 | +@@ -102,6 +102,7 @@ |
1369 | INNODB_EXTRA_RSEGMENTS |
1370 | INNODB_EXTRA_UNDOSLOTS |
1371 | INNODB_FAKE_CHANGES |
1372 | @@ -8324,7 +7046,7 @@ |
1373 | INNODB_FAST_CHECKSUM |
1374 | INNODB_FAST_RECOVERY |
1375 | INNODB_FAST_SHUTDOWN |
1376 | -@@ -201,6 +203,7 @@ |
1377 | +@@ -202,6 +203,7 @@ |
1378 | LOW_PRIORITY_UPDATES |
1379 | MAX_ALLOWED_PACKET |
1380 | MAX_BINLOG_CACHE_SIZE |
1381 | @@ -8332,16 +7054,15 @@ |
1382 | MAX_BINLOG_SIZE |
1383 | MAX_CONNECTIONS |
1384 | MAX_CONNECT_ERRORS |
1385 | -@@ -273,6 +276,8 @@ |
1386 | - RELAY_LOG_INFO_FILE |
1387 | +@@ -275,6 +277,7 @@ |
1388 | RELAY_LOG_PURGE |
1389 | RELAY_LOG_SPACE_LIMIT |
1390 | -+REPLICATE_ANNOTATE_ROWS_EVENTS |
1391 | + REPLICATE_ANNOTATE_ROWS_EVENTS |
1392 | +REPLICATION_SLAVE_SKIP_COLUMNS |
1393 | REPORT_HOST |
1394 | REPORT_PASSWORD |
1395 | REPORT_PORT |
1396 | -@@ -291,6 +296,8 @@ |
1397 | +@@ -293,6 +296,8 @@ |
1398 | SLAVE_NET_TIMEOUT |
1399 | SLAVE_SKIP_ERRORS |
1400 | SLAVE_TRANSACTION_RETRIES |
1401 | @@ -8350,7 +7071,7 @@ |
1402 | SLOW_LAUNCH_TIME |
1403 | SLOW_QUERY_LOG |
1404 | SLOW_QUERY_LOG_FILE |
1405 | -@@ -312,6 +319,7 @@ |
1406 | +@@ -314,6 +319,7 @@ |
1407 | SQL_SAFE_UPDATES |
1408 | SQL_SELECT_LIMIT |
1409 | SQL_SLAVE_SKIP_COUNTER |
1410 | @@ -8360,15 +7081,7 @@ |
1411 | SSL_CAPATH |
1412 | --- a/mysql-test/r/percona_server_variables_release.result |
1413 | +++ b/mysql-test/r/percona_server_variables_release.result |
1414 | -@@ -7,6 +7,7 @@ |
1415 | - BACK_LOG |
1416 | - BASEDIR |
1417 | - BIG_TABLES |
1418 | -+BINLOG_ANNOTATE_ROWS_EVENTS |
1419 | - BINLOG_CACHE_SIZE |
1420 | - BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES |
1421 | - BINLOG_FORMAT |
1422 | -@@ -99,6 +100,7 @@ |
1423 | +@@ -100,6 +100,7 @@ |
1424 | INNODB_EXTRA_RSEGMENTS |
1425 | INNODB_EXTRA_UNDOSLOTS |
1426 | INNODB_FAKE_CHANGES |
1427 | @@ -8376,7 +7089,7 @@ |
1428 | INNODB_FAST_CHECKSUM |
1429 | INNODB_FAST_RECOVERY |
1430 | INNODB_FAST_SHUTDOWN |
1431 | -@@ -199,6 +201,7 @@ |
1432 | +@@ -200,6 +201,7 @@ |
1433 | LOW_PRIORITY_UPDATES |
1434 | MAX_ALLOWED_PACKET |
1435 | MAX_BINLOG_CACHE_SIZE |
1436 | @@ -8384,16 +7097,15 @@ |
1437 | MAX_BINLOG_SIZE |
1438 | MAX_CONNECTIONS |
1439 | MAX_CONNECT_ERRORS |
1440 | -@@ -270,6 +273,8 @@ |
1441 | - RELAY_LOG_INFO_FILE |
1442 | +@@ -272,6 +274,7 @@ |
1443 | RELAY_LOG_PURGE |
1444 | RELAY_LOG_SPACE_LIMIT |
1445 | -+REPLICATE_ANNOTATE_ROWS_EVENTS |
1446 | + REPLICATE_ANNOTATE_ROWS_EVENTS |
1447 | +REPLICATION_SLAVE_SKIP_COLUMNS |
1448 | REPORT_HOST |
1449 | REPORT_PASSWORD |
1450 | REPORT_PORT |
1451 | -@@ -288,6 +293,8 @@ |
1452 | +@@ -290,6 +293,8 @@ |
1453 | SLAVE_NET_TIMEOUT |
1454 | SLAVE_SKIP_ERRORS |
1455 | SLAVE_TRANSACTION_RETRIES |
1456 | @@ -8402,7 +7114,7 @@ |
1457 | SLOW_LAUNCH_TIME |
1458 | SLOW_QUERY_LOG |
1459 | SLOW_QUERY_LOG_FILE |
1460 | -@@ -309,6 +316,7 @@ |
1461 | +@@ -311,6 +316,7 @@ |
1462 | SQL_SAFE_UPDATES |
1463 | SQL_SELECT_LIMIT |
1464 | SQL_SLAVE_SKIP_COUNTER |
1465 | |
1466 | === modified file 'patches/mysqlbinlog_fix.patch' |
1467 | --- patches/mysqlbinlog_fix.patch 2012-02-06 05:52:20 +0000 |
1468 | +++ patches/mysqlbinlog_fix.patch 2012-02-06 05:52:21 +0000 |
1469 | @@ -41,3 +41,65 @@ |
1470 | mysql= mysql_init(NULL); |
1471 | |
1472 | if (!mysql) |
1473 | +--- a/mysql-test/r/mysqlbinlog.result |
1474 | ++++ b/mysql-test/r/mysqlbinlog.result |
1475 | +@@ -222,7 +222,6 @@ ROLLBACK /* added by mysqlbinlog */; |
1476 | + /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
1477 | + DELIMITER /*!*/; |
1478 | + ROLLBACK/*!*/; |
1479 | +-use test/*!*/; |
1480 | + SET TIMESTAMP=1108844556/*!*/; |
1481 | + SET @@session.pseudo_thread_id=999999999/*!*/; |
1482 | + SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
1483 | +@@ -230,6 +229,7 @@ SET @@session.lc_time_names=0/*!*/; |
1484 | + SET @@session.collation_database=DEFAULT/*!*/; |
1485 | + BEGIN |
1486 | + /*!*/; |
1487 | ++use test/*!*/; |
1488 | + SET TIMESTAMP=1108844555/*!*/; |
1489 | + insert t1 values (1) |
1490 | + /*!*/; |
1491 | +@@ -241,7 +241,6 @@ Warning: The option '--position' is depr |
1492 | + /*!40019 SET @@session.max_insert_delayed_threads=0*/; |
1493 | + /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
1494 | + DELIMITER /*!*/; |
1495 | +-use test/*!*/; |
1496 | + SET TIMESTAMP=1108844556/*!*/; |
1497 | + SET @@session.pseudo_thread_id=999999999/*!*/; |
1498 | + SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
1499 | +@@ -249,6 +248,7 @@ SET @@session.lc_time_names=0/*!*/; |
1500 | + SET @@session.collation_database=DEFAULT/*!*/; |
1501 | + BEGIN |
1502 | + /*!*/; |
1503 | ++use test/*!*/; |
1504 | + SET TIMESTAMP=1108844555/*!*/; |
1505 | + insert t1 values (1) |
1506 | + /*!*/; |
1507 | +@@ -584,7 +584,6 @@ SET @@session.lc_time_names=0/*!*/; |
1508 | + SET @@session.collation_database=DEFAULT/*!*/; |
1509 | + BEGIN |
1510 | + /*!*/; |
1511 | +-use test/*!*/; |
1512 | + SET TIMESTAMP=1266652094/*!*/; |
1513 | + SavePoint mixed_cases |
1514 | + /*!*/; |
1515 | +@@ -595,11 +594,9 @@ INSERT INTO db1.t2 VALUES("in savepoint |
1516 | + SET TIMESTAMP=1266652094/*!*/; |
1517 | + INSERT INTO db1.t1 VALUES(40) |
1518 | + /*!*/; |
1519 | +-use test/*!*/; |
1520 | + SET TIMESTAMP=1266652094/*!*/; |
1521 | + ROLLBACK TO mixed_cases |
1522 | + /*!*/; |
1523 | +-use db1/*!*/; |
1524 | + SET TIMESTAMP=1266652094/*!*/; |
1525 | + INSERT INTO db1.t2 VALUES("after rollback to") |
1526 | + /*!*/; |
1527 | +@@ -627,7 +624,6 @@ SET @@session.lc_time_names=0/*!*/; |
1528 | + SET @@session.collation_database=DEFAULT/*!*/; |
1529 | + BEGIN |
1530 | + /*!*/; |
1531 | +-use test/*!*/; |
1532 | + SET TIMESTAMP=1266652094/*!*/; |
1533 | + SavePoint mixed_cases |
1534 | + /*!*/; |
1535 | |
1536 | === modified file 'patches/series.OTHER' |
1537 | --- patches/series.OTHER 2012-02-06 05:52:20 +0000 |
1538 | +++ patches/series.OTHER 2012-02-06 05:52:21 +0000 |
1539 | @@ -69,7 +69,7 @@ |
1540 | bug860910.patch |
1541 | bug45702.patch |
1542 | mysqlbinlog_fix.patch |
1543 | -mwl36.patch |
1544 | +wl36.patch |
1545 | wl47.patch |
1546 | wl5151.patch |
1547 | slave_type_conversions_error_on_truncate.patch |
1548 | |
1549 | === renamed file 'patches/mwl36.patch' => 'patches/wl36.patch' |
1550 | --- patches/mwl36.patch 2012-02-06 05:52:20 +0000 |
1551 | +++ patches/wl36.patch 2012-02-06 05:52:21 +0000 |
1552 | @@ -44,8 +44,8 @@ |
1553 | +/* Needed for Rpl_filter */ |
1554 | +CHARSET_INFO* system_charset_info= &my_charset_utf8_general_ci; |
1555 | + |
1556 | -+#include "sql_string.h" // needed for Rpl_filter |
1557 | -+#include "sql_list.h" // needed for Rpl_filter |
1558 | ++#include "sql_string.h" // needed for Rpl_filter |
1559 | ++#include "sql_list.h" // needed for Rpl_filter |
1560 | +#include "rpl_filter.h" |
1561 | + |
1562 | +Rpl_filter *binlog_filter; |
1563 | @@ -53,7 +53,7 @@ |
1564 | #define BIN_LOG_HEADER_SIZE 4 |
1565 | #define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4) |
1566 | |
1567 | -@@ -623,6 +632,42 @@ |
1568 | +@@ -623,6 +633,49 @@ |
1569 | |
1570 | |
1571 | /** |
1572 | @@ -63,31 +63,38 @@ |
1573 | + We have to do it here (see process_event() below) and to suppress |
1574 | + producing USE statements by corresponding log event print-functions. |
1575 | +*/ |
1576 | -+ |
1577 | +void print_use_stmt(PRINT_EVENT_INFO* pinfo, const char* db, size_t db_len) |
1578 | +{ |
1579 | -+ // pinfo->db is the current db. |
1580 | -+ // If current db is the same as required db, do nothing. |
1581 | ++ /* |
1582 | ++ pinfo->db is the current db. |
1583 | ++ If current db is the same as required db, do nothing. |
1584 | ++ */ |
1585 | + if (!db || !memcmp(pinfo->db, db, db_len + 1)) |
1586 | + return; |
1587 | + |
1588 | -+ // Current db and required db are different. |
1589 | -+ // Check for rewrite rule for required db. (Note that in a rewrite rule |
1590 | -+ // neither db_from nor db_to part can be empty). |
1591 | -+ size_t len_to= 0; |
1592 | -+ const char *db_to= binlog_filter->get_rewrite_db(db, &len_to); |
1593 | ++ /* |
1594 | ++ Current db and required db are different. |
1595 | ++ Check for rewrite rule for required db. (Note that in a rewrite rule |
1596 | ++ neither db_from nor db_to part can be empty) |
1597 | ++ */ |
1598 | ++ size_t len_to= 0; |
1599 | ++ const char* db_to= binlog_filter->get_rewrite_db(db, &len_to); |
1600 | + |
1601 | -+ // If there is no rewrite rule for db (in this case len_to is left = 0), |
1602 | -+ // printing of the corresponding USE statement is left for log event |
1603 | -+ // print-function. |
1604 | ++ /* |
1605 | ++ If there is no rewrite rule for db (in this case len_to is left = 0), |
1606 | ++ printing of the corresponding USE statement is left for log event |
1607 | ++ print-function. |
1608 | ++ */ |
1609 | + if (!len_to) |
1610 | + return; |
1611 | + |
1612 | + // In case of rewrite rule print USE statement for db_to |
1613 | + fprintf(result_file, "use %s%s\n", db_to, pinfo->delimiter); |
1614 | + |
1615 | -+ // Copy the *original* db to pinfo to suppress emiting |
1616 | -+ // of USE stmts by log_event print-functions. |
1617 | ++ /* |
1618 | ++ Copy the *original* db to pinfo to suppress emiting |
1619 | ++ of USE stmts by log_event print-functions. |
1620 | ++ */ |
1621 | + memcpy(pinfo->db, db, db_len + 1); |
1622 | +} |
1623 | + |
1624 | @@ -96,28 +103,33 @@ |
1625 | Prints the given event in base64 format. |
1626 | |
1627 | The header is printed to the head cache and the body is printed to |
1628 | -@@ -741,9 +786,11 @@ |
1629 | +@@ -741,10 +798,12 @@ |
1630 | |
1631 | switch (ev_type) { |
1632 | case QUERY_EVENT: |
1633 | +- if (!((Query_log_event*)ev)->is_trans_keyword()) |
1634 | + { |
1635 | + Query_log_event *qe= (Query_log_event*)ev; |
1636 | - if (!((Query_log_event*)ev)->is_trans_keyword()) |
1637 | ++ if (!qe->is_trans_keyword()) |
1638 | { |
1639 | - if (shall_skip_database(((Query_log_event*)ev)->db)) |
1640 | + if (shall_skip_database(qe->db)) |
1641 | goto end; |
1642 | } |
1643 | else |
1644 | -@@ -752,6 +799,7 @@ |
1645 | - // from binary log 5.0, make it compatible with 5.1 |
1646 | + { |
1647 | +@@ -754,16 +815,18 @@ |
1648 | + */ |
1649 | ev->flags|= LOG_EVENT_SUPPRESS_USE_F; |
1650 | } |
1651 | + print_use_stmt(print_event_info, qe->db, qe->db_len); |
1652 | if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS) |
1653 | { |
1654 | if ((retval= write_event_header_and_base64(ev, result_file, |
1655 | -@@ -762,6 +810,7 @@ |
1656 | + print_event_info)) != |
1657 | + OK_CONTINUE) |
1658 | + goto end; |
1659 | + } |
1660 | else |
1661 | ev->print(result_file, print_event_info); |
1662 | break; |
1663 | @@ -125,7 +137,7 @@ |
1664 | |
1665 | case CREATE_FILE_EVENT: |
1666 | { |
1667 | -@@ -883,6 +932,7 @@ |
1668 | +@@ -885,6 +952,7 @@ |
1669 | |
1670 | if (!shall_skip_database(exlq->db)) |
1671 | { |
1672 | @@ -133,12 +145,13 @@ |
1673 | if (fname) |
1674 | { |
1675 | convert_path_to_forward_slashes(fname); |
1676 | -@@ -906,6 +956,13 @@ |
1677 | +@@ -908,6 +976,14 @@ |
1678 | destroy_evt= FALSE; |
1679 | goto end; |
1680 | } |
1681 | -+ size_t len_to= 0; |
1682 | -+ const char* db_to= binlog_filter->get_rewrite_db(map->get_db_name(), &len_to); |
1683 | ++ size_t len_to= 0; |
1684 | ++ const char* db_to= binlog_filter->get_rewrite_db(map->get_db_name(), |
1685 | ++ &len_to); |
1686 | + if (len_to && map->rewrite_db(db_to, len_to, glob_description_event)) |
1687 | + { |
1688 | + error("Could not rewrite database name"); |
1689 | @@ -147,15 +160,16 @@ |
1690 | } |
1691 | case WRITE_ROWS_EVENT: |
1692 | case DELETE_ROWS_EVENT: |
1693 | -@@ -991,14 +1048,16 @@ |
1694 | +@@ -993,16 +1069,20 @@ |
1695 | retval= ERROR_STOP; |
1696 | end: |
1697 | rec_count++; |
1698 | -+ |
1699 | ++ |
1700 | ++ |
1701 | /* |
1702 | - Destroy the log_event object. If reading from a remote host, |
1703 | - set the temp_buf to NULL so that memory isn't freed twice. |
1704 | -+ Destroy the log_event object. |
1705 | ++ Destroy the log_event object. |
1706 | + MariaDB MWL#36: mainline does this: |
1707 | + If reading from a remote host, |
1708 | + set the temp_buf to NULL so that memory isn't freed twice. |
1709 | @@ -165,10 +179,14 @@ |
1710 | { |
1711 | - if (remote_opt) |
1712 | - ev->temp_buf= 0; |
1713 | - if (destroy_evt) /* destroy it later if not set (ignored table map) */ |
1714 | +- if (destroy_evt) /* destroy it later if not set (ignored table map) */ |
1715 | ++ /* destroy it later if not set (ignored table map) */ |
1716 | ++ if (destroy_evt) |
1717 | delete ev; |
1718 | } |
1719 | -@@ -1164,6 +1223,10 @@ |
1720 | + DBUG_RETURN(retval); |
1721 | + } |
1722 | +@@ -1166,6 +1248,10 @@ |
1723 | "Used to reserve file descriptors for use by this program.", |
1724 | &open_files_limit, &open_files_limit, 0, GET_ULONG, |
1725 | REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0}, |
1726 | @@ -179,7 +197,7 @@ |
1727 | {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} |
1728 | }; |
1729 | |
1730 | -@@ -1355,6 +1418,53 @@ |
1731 | +@@ -1359,6 +1445,53 @@ |
1732 | (find_type_or_exit(argument, &base64_output_mode_typelib, opt->name)-1); |
1733 | } |
1734 | break; |
1735 | @@ -187,8 +205,8 @@ |
1736 | + { |
1737 | + /* See also handling of OPT_REPLICATE_REWRITE_DB in sql/mysqld.cc */ |
1738 | + char* ptr; |
1739 | -+ char* key= argument; // db-from |
1740 | -+ char* val; // db-to |
1741 | ++ char* key= argument; // db-from |
1742 | ++ char* val; // db-to |
1743 | + |
1744 | + // Where key begins |
1745 | + while (*key && my_isspace(&my_charset_latin1, *key)) |
1746 | @@ -233,7 +251,7 @@ |
1747 | case 'v': |
1748 | if (argument == disabled_my_option) |
1749 | verbose= 0; |
1750 | -@@ -1628,7 +1738,7 @@ |
1751 | +@@ -1632,7 +1775,7 @@ |
1752 | If reading from a remote host, ensure the temp_buf for the |
1753 | Log_event class is pointing to the incoming stream. |
1754 | */ |
1755 | @@ -242,7 +260,7 @@ |
1756 | |
1757 | Log_event_type type= ev->get_type_code(); |
1758 | if (glob_description_event->binlog_version >= 3 || |
1759 | -@@ -2028,6 +2138,8 @@ |
1760 | +@@ -2032,6 +2175,8 @@ |
1761 | return retval; |
1762 | } |
1763 | |
1764 | @@ -251,7 +269,7 @@ |
1765 | |
1766 | int main(int argc, char** argv) |
1767 | { |
1768 | -@@ -2040,6 +2152,13 @@ |
1769 | +@@ -2044,6 +2189,13 @@ |
1770 | |
1771 | my_init_time(); // for time functions |
1772 | |
1773 | @@ -265,7 +283,7 @@ |
1774 | if (load_defaults("my", load_default_groups, &argc, &argv)) |
1775 | exit(1); |
1776 | defaults_argv= argv; |
1777 | -@@ -2128,6 +2247,8 @@ |
1778 | +@@ -2132,6 +2284,8 @@ |
1779 | if (result_file != stdout) |
1780 | my_fclose(result_file, MYF(0)); |
1781 | cleanup(); |
1782 | @@ -274,7 +292,7 @@ |
1783 | free_defaults(defaults_argv); |
1784 | my_free_open_file_info(); |
1785 | load_processor.destroy(); |
1786 | -@@ -2139,6 +2260,12 @@ |
1787 | +@@ -2143,6 +2297,12 @@ |
1788 | DBUG_RETURN(retval == ERROR_STOP ? 1 : 0); |
1789 | } |
1790 | |
1791 | @@ -287,7 +305,7 @@ |
1792 | /* |
1793 | We must include this here as it's compiled with different options for |
1794 | the server |
1795 | -@@ -2149,4 +2276,7 @@ |
1796 | +@@ -2153,4 +2313,7 @@ |
1797 | #include "my_decimal.cc" |
1798 | #include "log_event.cc" |
1799 | #include "log_event_old.cc" |
1800 | @@ -475,9 +493,9 @@ |
1801 | *description_event); |
1802 | virtual ~Log_event() { free_temp_buf();} |
1803 | - void register_temp_buf(char* buf) { temp_buf = buf; } |
1804 | -+ void register_temp_buf(char* buf, bool must_free) |
1805 | -+ { |
1806 | -+ temp_buf= buf; |
1807 | ++ void register_temp_buf(char* buf, bool must_free) |
1808 | ++ { |
1809 | ++ temp_buf= buf; |
1810 | + event_owns_temp_buf= must_free; |
1811 | + } |
1812 | void free_temp_buf() |
1813 | @@ -490,7 +508,7 @@ |
1814 | temp_buf = 0; |
1815 | } |
1816 | } |
1817 | -@@ -3358,6 +3370,8 @@ |
1818 | +@@ -3358,6 +3372,8 @@ |
1819 | ulong get_table_id() const { return m_table_id; } |
1820 | const char *get_table_name() const { return m_tblnam; } |
1821 | const char *get_db_name() const { return m_dbnam; } |
1822 | @@ -635,3 +653,112 @@ |
1823 | |
1824 | |
1825 | void *sql_calloc(size_t size) |
1826 | +--- /dev/null |
1827 | ++++ b/mysql-test/r/wl36.result |
1828 | +@@ -0,0 +1,48 @@ |
1829 | ++CREATE DATABASE a; |
1830 | ++USE a; |
1831 | ++CREATE TABLE t1(a INT); |
1832 | ++CREATE DATABASE b; |
1833 | ++USE b; |
1834 | ++CREATE TABLE t1(b INT); |
1835 | ++CREATE DATABASE c; |
1836 | ++USE c; |
1837 | ++CREATE TABLE t1(c INT); |
1838 | ++RESET MASTER; |
1839 | ++USE a; |
1840 | ++INSERT INTO t1 VALUES(0); |
1841 | ++USE b; |
1842 | ++INSERT INTO t1 VALUES(1); |
1843 | ++FLUSH LOGS; |
1844 | ++# |
1845 | ++# Apply log with '' |
1846 | ++# |
1847 | ++a |
1848 | ++0 |
1849 | ++b |
1850 | ++1 |
1851 | ++c |
1852 | ++# |
1853 | ++# Apply log with '--rewrite-db="a->c"' |
1854 | ++# |
1855 | ++a |
1856 | ++b |
1857 | ++1 |
1858 | ++c |
1859 | ++0 |
1860 | ++# |
1861 | ++# Apply log with '--rewrite-db="a->b"' |
1862 | ++# |
1863 | ++a |
1864 | ++b |
1865 | ++0 |
1866 | ++1 |
1867 | ++c |
1868 | ++USE a; |
1869 | ++DROP TABLE t1; |
1870 | ++DROP DATABASE a; |
1871 | ++USE b; |
1872 | ++DROP TABLE t1; |
1873 | ++DROP DATABASE b; |
1874 | ++USE c; |
1875 | ++DROP TABLE t1; |
1876 | ++DROP DATABASE c; |
1877 | +--- /dev/null |
1878 | ++++ b/mysql-test/t/wl36.test |
1879 | +@@ -0,0 +1,55 @@ |
1880 | ++# |
1881 | ++# WL #36: http://askmonty.org/worklog/Server-Sprint/?tid=36 |
1882 | ++# This is basic test for --rewrite-db option. |
1883 | ++# mysqlbinlog --rewrite-db="from->to" should rewrite database |
1884 | ++# |
1885 | ++ |
1886 | ++--source include/have_log_bin.inc |
1887 | ++ |
1888 | ++CREATE DATABASE a; USE a; CREATE TABLE t1(a INT); |
1889 | ++ |
1890 | ++CREATE DATABASE b; USE b; CREATE TABLE t1(b INT); |
1891 | ++ |
1892 | ++CREATE DATABASE c; USE c; CREATE TABLE t1(c INT); |
1893 | ++ |
1894 | ++RESET MASTER; |
1895 | ++--let MYSQLD_DATA_DIR=`select @@datadir` |
1896 | ++--let BIN_LOG_FILE_NAME=query_get_value(show master status, File, 1) |
1897 | ++--let BIN_LOG_START_POSITION=query_get_value(show master status, Position, 1) |
1898 | ++USE a; INSERT INTO t1 VALUES(0); |
1899 | ++USE b; INSERT INTO t1 VALUES(1); |
1900 | ++--let BIN_LOG_STOP_POSITION=query_get_value(show master status, Position, 1) |
1901 | ++FLUSH LOGS; |
1902 | ++ |
1903 | ++--let BIN_LOG_FULL_PATH=`SELECT CONCAT("$MYSQLD_DATA_DIR", "$BIN_LOG_FILE_NAME")` |
1904 | ++ |
1905 | ++--let i=3 |
1906 | ++# i=3: rewrite nothing |
1907 | ++# i=2: rewrite a->c |
1908 | ++# i=0: rewrite a->b |
1909 | ++--disable_query_log |
1910 | ++while ($i) |
1911 | ++{ |
1912 | ++--let REWRITE=`SELECT CASE $i WHEN 3 THEN '' WHEN 2 THEN '--rewrite-db="a->c"' WHEN 1 THEN '--rewrite-db="a->b"' END` |
1913 | ++ |
1914 | ++USE a; DELETE FROM t1; |
1915 | ++USE b; DELETE FROM t1; |
1916 | ++USE c; DELETE FROM t1; |
1917 | ++ |
1918 | ++--echo # |
1919 | ++--echo # Apply log with '$REWRITE' |
1920 | ++--echo # |
1921 | ++ |
1922 | ++--exec $MYSQL_BINLOG $REWRITE --start-position=$BIN_LOG_START_POSITION --stop-position=$BIN_LOG_STOP_POSITION $BIN_LOG_FULL_PATH | $MYSQL |
1923 | ++ |
1924 | ++USE a; SELECT * FROM t1; |
1925 | ++USE b; SELECT * FROM t1; |
1926 | ++USE c; SELECT * FROM t1; |
1927 | ++ |
1928 | ++dec $i; |
1929 | ++} |
1930 | ++--enable_query_log |
1931 | ++ |
1932 | ++USE a; DROP TABLE t1; DROP DATABASE a; |
1933 | ++USE b; DROP TABLE t1; DROP DATABASE b; |
1934 | ++USE c; DROP TABLE t1; DROP DATABASE c; |
1935 | |
1936 | === modified file 'patches/wl47.patch' |
1937 | --- patches/wl47.patch 2012-02-06 05:52:20 +0000 |
1938 | +++ patches/wl47.patch 2012-02-06 05:52:21 +0000 |
1939 | @@ -96,7 +96,7 @@ |
1940 | static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info, |
1941 | const char* logname); |
1942 | static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info, |
1943 | -@@ -947,6 +1012,19 @@ |
1944 | +@@ -956,6 +1021,19 @@ |
1945 | my_free(fname, MYF(MY_WME)); |
1946 | break; |
1947 | } |
1948 | @@ -116,7 +116,7 @@ |
1949 | case TABLE_MAP_EVENT: |
1950 | { |
1951 | Table_map_log_event *map= ((Table_map_log_event *)ev); |
1952 | -@@ -956,6 +1034,13 @@ |
1953 | +@@ -965,6 +1043,13 @@ |
1954 | destroy_evt= FALSE; |
1955 | goto end; |
1956 | } |
1957 | @@ -127,10 +127,10 @@ |
1958 | + */ |
1959 | + print_annotate_event(print_event_info); |
1960 | + |
1961 | - size_t len_to= 0; |
1962 | - const char* db_to= binlog_filter->get_rewrite_db(map->get_db_name(), &len_to); |
1963 | - if (len_to && map->rewrite_db(db_to, len_to, glob_description_event)) |
1964 | -@@ -992,6 +1077,13 @@ |
1965 | + size_t len_to= 0; |
1966 | + const char* db_to= binlog_filter->get_rewrite_db(map->get_db_name(), |
1967 | + &len_to); |
1968 | +@@ -1002,6 +1087,13 @@ |
1969 | if (print_event_info->m_table_map_ignored.count() > 0) |
1970 | print_event_info->m_table_map_ignored.clear_tables(); |
1971 | |
1972 | @@ -144,7 +144,7 @@ |
1973 | /* |
1974 | One needs to take into account an event that gets |
1975 | filtered but was last event in the statement. If this is |
1976 | -@@ -1227,6 +1319,11 @@ |
1977 | +@@ -1239,6 +1331,11 @@ |
1978 | "Updates to a database with a different name than the original. \ |
1979 | Example: rewrite-db='from->to'.", |
1980 | 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
1981 | @@ -156,7 +156,7 @@ |
1982 | {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} |
1983 | }; |
1984 | |
1985 | -@@ -1695,6 +1792,8 @@ |
1986 | +@@ -1707,6 +1804,8 @@ |
1987 | cast to uint32. |
1988 | */ |
1989 | int4store(buf, (uint32)start_position); |
1990 | @@ -165,7 +165,7 @@ |
1991 | int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags); |
1992 | |
1993 | size_t tlen = strlen(logname); |
1994 | -@@ -1727,18 +1826,30 @@ |
1995 | +@@ -1739,18 +1838,30 @@ |
1996 | break; // end of data |
1997 | DBUG_PRINT("info",( "len: %lu net->read_pos[5]: %d\n", |
1998 | len, net->read_pos[5])); |
1999 | @@ -207,7 +207,7 @@ |
2000 | |
2001 | Log_event_type type= ev->get_type_code(); |
2002 | if (glob_description_event->binlog_version >= 3 || |
2003 | -@@ -2247,6 +2358,7 @@ |
2004 | +@@ -2259,6 +2370,7 @@ |
2005 | if (result_file != stdout) |
2006 | my_fclose(result_file, MYF(0)); |
2007 | cleanup(); |
2008 | @@ -215,6 +215,2809 @@ |
2009 | delete binlog_filter; |
2010 | free_root(&s_mem_root, MYF(0)); |
2011 | free_defaults(defaults_argv); |
2012 | +--- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test |
2013 | ++++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test |
2014 | +@@ -321,14 +321,19 @@ |
2015 | + # we check that the error code of the "ROLLBACK" event is 0 and not |
2016 | + # ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction |
2017 | + # and does not make slave to stop) |
2018 | ++ |
2019 | ++-- source include/binlog_start_pos.inc |
2020 | ++ |
2021 | + if (`select @@binlog_format = 'ROW'`) |
2022 | + { |
2023 | +- --exec $MYSQL_BINLOG --start-position=524 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
2024 | ++ let $start_pos= `select @binlog_start_pos + 418`; |
2025 | ++ --exec $MYSQL_BINLOG --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
2026 | + } |
2027 | + |
2028 | + if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) |
2029 | + { |
2030 | +- --exec $MYSQL_BINLOG --start-position=555 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
2031 | ++ let $start_pos= `select @binlog_start_pos + 449`; |
2032 | ++ --exec $MYSQL_BINLOG --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output |
2033 | + } |
2034 | + |
2035 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
2036 | +--- a/mysql-test/extra/rpl_tests/rpl_log.test |
2037 | ++++ b/mysql-test/extra/rpl_tests/rpl_log.test |
2038 | +@@ -14,6 +14,7 @@ |
2039 | + reset master; |
2040 | + reset slave; |
2041 | + source include/start_slave.inc; |
2042 | ++source include/binlog_start_pos.inc; |
2043 | + |
2044 | + let $VERSION=`select version()`; |
2045 | + |
2046 | +--- /dev/null |
2047 | ++++ b/mysql-test/extra/rpl_tests/rpl_row_annotate.test |
2048 | +@@ -0,0 +1,156 @@ |
2049 | ++######################################################################## |
2050 | ++# WL47: Store in binlog text of statements that caused RBR events |
2051 | ++# new event : ANNOTATE_ROWS_EVENT |
2052 | ++# new master option : --binlog-annotate-rows-events |
2053 | ++# new slave option : --replicate-annotate-rows-events |
2054 | ++######################################################################## |
2055 | ++--source include/master-slave.inc |
2056 | ++connect (master2,127.0.0.1,root,,test,$MASTER_MYPORT,); |
2057 | ++ |
2058 | ++connection master; |
2059 | ++--disable_query_log |
2060 | ++ |
2061 | ++--disable_warnings |
2062 | ++DROP DATABASE IF EXISTS test1; |
2063 | ++--enable_warnings |
2064 | ++ |
2065 | ++CREATE DATABASE test1; |
2066 | ++USE test1; |
2067 | ++ |
2068 | ++CREATE TABLE t1(a int primary key, b int); |
2069 | ++CREATE TABLE t2(a int, b int); |
2070 | ++CREATE TABLE t3(a int, b int); |
2071 | ++CREATE TABLE t4(a int, b int); |
2072 | ++CREATE TABLE xt1(a int, b int); |
2073 | ++CREATE TABLE xt2(a int, b int); |
2074 | ++ |
2075 | ++CREATE TABLE t5 ( |
2076 | ++ a INT PRIMARY KEY AUTO_INCREMENT, |
2077 | ++ b VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin |
2078 | ++); |
2079 | ++ |
2080 | ++SET SESSION binlog_annotate_rows_events = OFF; |
2081 | ++ |
2082 | ++INSERT INTO t1 VALUES (0,0), (1,1); |
2083 | ++ |
2084 | ++SET SESSION binlog_annotate_rows_events = ON; |
2085 | ++ |
2086 | ++UPDATE t1 SET b = b + 1; |
2087 | ++REPLACE t1 VALUES (1,1), (2,2), (3,3); |
2088 | ++ |
2089 | ++INSERT INTO t2 VALUES (1,1), (2,2), (3,3); |
2090 | ++INSERT INTO t3 VALUES (1,1), (2,2), (3,3); |
2091 | ++DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.a=t2.a AND t2.a=t3.a; |
2092 | ++ |
2093 | ++INSERT INTO xt1 VALUES (1,1), (2,2), (3,3); |
2094 | ++INSERT INTO t2 VALUES (1,1), (2,2), (3,3); |
2095 | ++DELETE xt1, t2 FROM xt1 INNER JOIN t2 INNER JOIN t3 WHERE xt1.a=t2.a AND t2.a=t3.a; |
2096 | ++ |
2097 | ++INSERT INTO xt1 VALUES (1,1), (2,2), (3,3); |
2098 | ++INSERT INTO xt2 VALUES (1,1), (2,2), (3,3); |
2099 | ++DELETE xt1, xt2 FROM xt1 INNER JOIN xt2 INNER JOIN t3 WHERE xt1.a=xt2.a AND xt2.a=t3.a; |
2100 | ++ |
2101 | ++INSERT INTO t5(b) VALUES ('foo'), ('bar'), ('baz'); |
2102 | ++SET NAMES latin1; |
2103 | ++INSERT INTO t5(b) VALUES ('gås'); |
2104 | ++SET NAMES utf8; |
2105 | ++INSERT INTO t5(b) VALUES ('gås'); |
2106 | ++SET NAMES latin1; |
2107 | ++ |
2108 | ++FLUSH LOGS; |
2109 | ++ |
2110 | ++--echo ######################################################################## |
2111 | ++--echo # TABLES ON MASTER |
2112 | ++--echo ######################################################################## |
2113 | ++--enable_query_log |
2114 | ++ |
2115 | ++SELECT * FROM t1 ORDER BY a; |
2116 | ++SELECT * FROM t2 ORDER BY a; |
2117 | ++SELECT * FROM t3 ORDER BY a; |
2118 | ++SELECT * FROM t5 ORDER BY a; |
2119 | ++ |
2120 | ++sync_slave_with_master; |
2121 | ++--echo ######################################################################## |
2122 | ++--echo # TABLES ON SLAVE: should be the same as on master |
2123 | ++--echo ######################################################################## |
2124 | ++--disable_query_log |
2125 | ++USE test1; |
2126 | ++--enable_query_log |
2127 | ++ |
2128 | ++SELECT * FROM t1 ORDER BY a; |
2129 | ++SELECT * FROM t2 ORDER BY a; |
2130 | ++SELECT * FROM t3 ORDER BY a; |
2131 | ++SELECT * FROM t5 ORDER BY a; |
2132 | ++ |
2133 | ++--echo ######################################################################## |
2134 | ++--echo # EVENTS ON SLAVE |
2135 | ++let $annotate= `select @@global.replicate_annotate_rows_events`; |
2136 | ++if ($annotate) |
2137 | ++{ |
2138 | ++ --echo # The following Annotate_rows events should appear below: |
2139 | ++ --echo # - UPDATE t1 SET b = b + 1; |
2140 | ++ --echo # - REPLACE t1 VALUES (1,1), (2,2), (3,3); |
2141 | ++ --echo # - INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
2142 | ++ --echo # - INSERT INTO t3 VALUES (1,1), (2,2), (3,3) |
2143 | ++ --echo # - DELETE t1, t2 FROM <...> |
2144 | ++ --echo # - INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
2145 | ++ --echo # - DELETE xt1, t2 FROM <...> |
2146 | ++ --echo # - INSERT INTO t5(b) VALUES <...> (3 instances) |
2147 | ++} |
2148 | ++if (!$annotate) |
2149 | ++{ |
2150 | ++ --echo # No Annotate_rows events should appear below |
2151 | ++} |
2152 | ++--echo ######################################################################## |
2153 | ++FLUSH LOGS; |
2154 | ++ |
2155 | ++--source include/binlog_start_pos.inc |
2156 | ++let $start_pos= `select @binlog_start_pos`; |
2157 | ++--replace_column 2 # 5 # |
2158 | ++--replace_result $start_pos <start_pos> |
2159 | ++--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// |
2160 | ++--eval show binlog events in 'slave-bin.000001' from $start_pos |
2161 | ++ |
2162 | ++--echo # |
2163 | ++--echo ######################################################################## |
2164 | ++--echo # INSERTs DELAYED ON MASTERs |
2165 | ++--echo ######################################################################## |
2166 | ++connection master; |
2167 | ++SET SESSION binlog_annotate_rows_events = ON; |
2168 | ++INSERT DELAYED INTO test1.t4 VALUES (1,1); |
2169 | ++FLUSH TABLES; |
2170 | ++SELECT * FROM test1.t4 ORDER BY a; |
2171 | ++ |
2172 | ++sync_slave_with_master; |
2173 | ++connection master; |
2174 | ++sync_slave_with_master; |
2175 | ++ |
2176 | ++--echo ######################################################################## |
2177 | ++--echo # ON SLAVE |
2178 | ++--echo # No Annotate_rows events should appear below |
2179 | ++--echo ######################################################################## |
2180 | ++FLUSH LOGS; |
2181 | ++ |
2182 | ++--exec $MYSQL --host=127.0.0.1 --port=$SLAVE_MYPORT test -e "show binlog events in 'slave-bin.000002'" > $MYSQLTEST_VARDIR/tmp/annotated_events.txt |
2183 | ++perl; |
2184 | ++ open F, '<', "$ENV{MYSQLTEST_VARDIR}/tmp/annotated_events.txt" or die; |
2185 | ++ binmode STDOUT; |
2186 | ++ while (defined ($_ = <F>)) { |
2187 | ++ if (/Annotate_rows/) { |
2188 | ++ s/[0-9]+\sAnnotate_rows\s[0-9]+\s[0-9]+/# Annotate_rows # #/; |
2189 | ++ print($_); |
2190 | ++ $_ = <F>; |
2191 | ++ s/[0-9]+\sTable_map\s[0-9]+\s[0-9]+\stable_id:\s[0-9]+/# Table_map # # table_id: #/; |
2192 | ++ print($_); |
2193 | ++ } |
2194 | ++ } |
2195 | ++EOF |
2196 | ++ |
2197 | ++# Clean-up |
2198 | ++connection master; |
2199 | ++--disable_query_log |
2200 | ++DROP DATABASE test1; |
2201 | ++sync_slave_with_master; |
2202 | ++--enable_query_log |
2203 | ++ |
2204 | ++--source include/rpl_end.inc |
2205 | +--- /dev/null |
2206 | ++++ b/mysql-test/include/binlog_start_pos.inc |
2207 | +@@ -0,0 +1,26 @@ |
2208 | ++############################################################################## |
2209 | ++# |
2210 | ++# binlog_start_pos is the postion of the the first event in the binary log |
2211 | ++# which follows the Format description event. Intended to reduce test suite |
2212 | ++# dependance on the Format description event length changes (e.g. in case |
2213 | ++# of adding new events). Evaluated as: |
2214 | ++# |
2215 | ++# binlog_start_pos = 4 /* binlog header */ + |
2216 | ++# (Format_description_log_event length) |
2217 | ++# |
2218 | ++# Format_description_log_event length = |
2219 | ++# 19 /* event common header */ + |
2220 | ++# 57 /* misc stuff in the Format description header */ + |
2221 | ++# number of events. |
2222 | ++# |
2223 | ++# With current number of events = 160, |
2224 | ++# |
2225 | ++# binlog_start_pos = 4 + 19 + 57 + 160 = 240. |
2226 | ++# |
2227 | ++############################################################################## |
2228 | ++ |
2229 | ++let $binlog_start_pos=240; |
2230 | ++--disable_query_log |
2231 | ++SET @binlog_start_pos=240; |
2232 | ++--enable_query_log |
2233 | ++ |
2234 | +--- a/mysql-test/include/show_binlog_events.inc |
2235 | ++++ b/mysql-test/include/show_binlog_events.inc |
2236 | +@@ -3,7 +3,7 @@ |
2237 | + # |
2238 | + # Useage: |
2239 | + # let $binlog_file= master-bin.000002; |
2240 | +-# let $binlog_start= 106; |
2241 | ++# let $binlog_start= 240; |
2242 | + # let $binlog_limit= 1, 3; |
2243 | + # source include/show_binlog_events.inc; |
2244 | + # |
2245 | +--- a/mysql-test/include/show_binlog_events2.inc |
2246 | ++++ b/mysql-test/include/show_binlog_events2.inc |
2247 | +@@ -1,4 +1,4 @@ |
2248 | +---let $binlog_start=106 |
2249 | ++--let $binlog_start=240 |
2250 | + --replace_result $binlog_start <binlog_start> |
2251 | + --replace_column 2 # 5 # |
2252 | + --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ |
2253 | +--- a/mysql-test/r/ctype_cp932_binlog_stm.result |
2254 | ++++ b/mysql-test/r/ctype_cp932_binlog_stm.result |
2255 | +@@ -44,9 +44,6 @@ |
2256 | + master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293 |
2257 | + master-bin.000001 # Query # # use `test`; DROP TABLE t4 |
2258 | + End of 5.0 tests |
2259 | +-call mtr.add_suppression("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"); |
2260 | +-SHOW BINLOG EVENTS FROM 365; |
2261 | +-ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error |
2262 | + Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. |
2263 | + CREATE TABLE t1 (a varchar(16)) character set cp932; |
2264 | + INSERT INTO t1 VALUES (0x8372835E),(0x8352835E); |
2265 | +--- a/mysql-test/r/mysqlbinlog.result |
2266 | ++++ b/mysql-test/r/mysqlbinlog.result |
2267 | +@@ -1,15 +1,17 @@ |
2268 | + reset master; |
2269 | ++SET @save_binlog_size= @@global.max_binlog_size; |
2270 | ++SET @@global.max_binlog_size= 4096; |
2271 | + set timestamp=1000000000; |
2272 | + drop table if exists t1,t2,t3,t4,t5,t03,t04; |
2273 | + create table t1 (word varchar(20)); |
2274 | + create table t2 (id int auto_increment not null primary key); |
2275 | + insert into t1 values ("abirvalg"); |
2276 | + insert into t2 values (); |
2277 | +-load data infile '../../std_data/words.dat' into table t1; |
2278 | +-load data infile '../../std_data/words.dat' into table t1; |
2279 | +-load data infile '../../std_data/words.dat' into table t1; |
2280 | +-load data infile '../../std_data/words.dat' into table t1; |
2281 | +-load data infile '../../std_data/words.dat' into table t1; |
2282 | ++load data infile '../../std_data/words3.dat' into table t1; |
2283 | ++load data infile '../../std_data/words3.dat' into table t1; |
2284 | ++load data infile '../../std_data/words3.dat' into table t1; |
2285 | ++load data infile '../../std_data/words3.dat' into table t1; |
2286 | ++load data infile '../../std_data/words3.dat' into table t1; |
2287 | + insert into t1 values ("Alas"); |
2288 | + flush logs; |
2289 | + |
2290 | +@@ -255,6 +257,7 @@ |
2291 | + ROLLBACK /* added by mysqlbinlog */; |
2292 | + /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
2293 | + drop table t1,t2; |
2294 | ++SET @@global.max_binlog_size= @save_binlog_size; |
2295 | + flush logs; |
2296 | + flush logs; |
2297 | + select * from t5 /* must be (1),(1) */; |
2298 | +@@ -377,14 +380,14 @@ |
2299 | + /*!*/; |
2300 | + SET TIMESTAMP=1000000000/*!*/; |
2301 | + SET @@session.collation_database=7/*!*/; |
2302 | +-LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
2303 | ++LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
2304 | + /*!*/; |
2305 | + SET TIMESTAMP=1000000000/*!*/; |
2306 | + SET @@session.collation_database=DEFAULT/*!*/; |
2307 | +-LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
2308 | ++LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
2309 | + /*!*/; |
2310 | + SET TIMESTAMP=1000000000/*!*/; |
2311 | +-LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
2312 | ++LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) |
2313 | + /*!*/; |
2314 | + SET TIMESTAMP=1000000000/*!*/; |
2315 | + drop table t1 |
2316 | +--- a/mysql-test/r/percona_server_variables_debug.result |
2317 | ++++ b/mysql-test/r/percona_server_variables_debug.result |
2318 | +@@ -7,6 +7,7 @@ |
2319 | + BACK_LOG |
2320 | + BASEDIR |
2321 | + BIG_TABLES |
2322 | ++BINLOG_ANNOTATE_ROWS_EVENTS |
2323 | + BINLOG_CACHE_SIZE |
2324 | + BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES |
2325 | + BINLOG_FORMAT |
2326 | +@@ -273,6 +274,7 @@ |
2327 | + RELAY_LOG_INFO_FILE |
2328 | + RELAY_LOG_PURGE |
2329 | + RELAY_LOG_SPACE_LIMIT |
2330 | ++REPLICATE_ANNOTATE_ROWS_EVENTS |
2331 | + REPORT_HOST |
2332 | + REPORT_PASSWORD |
2333 | + REPORT_PORT |
2334 | +--- a/mysql-test/r/percona_server_variables_release.result |
2335 | ++++ b/mysql-test/r/percona_server_variables_release.result |
2336 | +@@ -7,6 +7,7 @@ |
2337 | + BACK_LOG |
2338 | + BASEDIR |
2339 | + BIG_TABLES |
2340 | ++BINLOG_ANNOTATE_ROWS_EVENTS |
2341 | + BINLOG_CACHE_SIZE |
2342 | + BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES |
2343 | + BINLOG_FORMAT |
2344 | +@@ -270,6 +271,7 @@ |
2345 | + RELAY_LOG_INFO_FILE |
2346 | + RELAY_LOG_PURGE |
2347 | + RELAY_LOG_SPACE_LIMIT |
2348 | ++REPLICATE_ANNOTATE_ROWS_EVENTS |
2349 | + REPORT_HOST |
2350 | + REPORT_PASSWORD |
2351 | + REPORT_PORT |
2352 | +--- /dev/null |
2353 | ++++ b/mysql-test/std_data/words3.dat |
2354 | +@@ -0,0 +1,66 @@ |
2355 | ++Aarhus |
2356 | ++Aaron |
2357 | ++Ababa |
2358 | ++aback |
2359 | ++abaft |
2360 | ++abandon |
2361 | ++abandoned |
2362 | ++abandoning |
2363 | ++abandonment |
2364 | ++abandons |
2365 | ++Aarhus |
2366 | ++Aaron |
2367 | ++Ababa |
2368 | ++aback |
2369 | ++abaft |
2370 | ++abandon |
2371 | ++abandoned |
2372 | ++abandoning |
2373 | ++abandonment |
2374 | ++abandons |
2375 | ++abase |
2376 | ++abased |
2377 | ++abasement |
2378 | ++abasements |
2379 | ++abases |
2380 | ++abash |
2381 | ++abashed |
2382 | ++abashes |
2383 | ++abashing |
2384 | ++abasing |
2385 | ++abate |
2386 | ++abated |
2387 | ++abatement |
2388 | ++abatements |
2389 | ++abater |
2390 | ++abates |
2391 | ++abating |
2392 | ++Abba |
2393 | ++abbe |
2394 | ++abbey |
2395 | ++abbeys |
2396 | ++abbot |
2397 | ++abbots |
2398 | ++Abbott |
2399 | ++abbreviate |
2400 | ++abbreviated |
2401 | ++abbreviates |
2402 | ++abbreviating |
2403 | ++abbreviation |
2404 | ++abbreviations |
2405 | ++Abby |
2406 | ++abdomen |
2407 | ++abdomens |
2408 | ++abdominal |
2409 | ++abduct |
2410 | ++abducted |
2411 | ++abduction |
2412 | ++abductions |
2413 | ++abductor |
2414 | ++abductors |
2415 | ++abducts |
2416 | ++Abe |
2417 | ++abed |
2418 | ++Abel |
2419 | ++Abelian |
2420 | ++Abelson |
2421 | +--- /dev/null |
2422 | ++++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result |
2423 | +@@ -0,0 +1,1219 @@ |
2424 | ++##################################################################################### |
2425 | ++# The following Annotate_rows events should appear below: |
2426 | ++# - INSERT INTO test2.t2 VALUES (1), (2), (3) |
2427 | ++# - INSERT INTO test3.t3 VALUES (1), (2), (3) |
2428 | ++# - DELETE test1.t1, test2.t2 FROM <...> |
2429 | ++# - INSERT INTO test2.t2 VALUES (1), (2), (3) |
2430 | ++# - DELETE xtest1.xt1, test2.t2 FROM <...> |
2431 | ++##################################################################################### |
2432 | ++show binlog events in 'master-bin.000001' from <start_pos>; |
2433 | ++Log_name Pos Event_type Server_id End_log_pos Info |
2434 | ++master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test1 |
2435 | ++master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test2 |
2436 | ++master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test3 |
2437 | ++master-bin.000001 # Query 1 # CREATE DATABASE test1 |
2438 | ++master-bin.000001 # Query 1 # CREATE DATABASE test2 |
2439 | ++master-bin.000001 # Query 1 # CREATE DATABASE test3 |
2440 | ++master-bin.000001 # Query 1 # BEGIN |
2441 | ++master-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
2442 | ++master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
2443 | ++master-bin.000001 # Query 1 # COMMIT |
2444 | ++master-bin.000001 # Query 1 # BEGIN |
2445 | ++master-bin.000001 # Annotate_rows 1 # INSERT INTO test2.t2 VALUES (1), (2), (3) |
2446 | ++master-bin.000001 # Table_map 1 # table_id: # (test2.t2) |
2447 | ++master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
2448 | ++master-bin.000001 # Query 1 # COMMIT |
2449 | ++master-bin.000001 # Query 1 # BEGIN |
2450 | ++master-bin.000001 # Annotate_rows 1 # INSERT INTO test3.t3 VALUES (1), (2), (3) |
2451 | ++master-bin.000001 # Table_map 1 # table_id: # (test3.t3) |
2452 | ++master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
2453 | ++master-bin.000001 # Query 1 # COMMIT |
2454 | ++master-bin.000001 # Query 1 # BEGIN |
2455 | ++master-bin.000001 # Annotate_rows 1 # DELETE test1.t1, test2.t2 |
2456 | ++FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
2457 | ++WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a |
2458 | ++master-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
2459 | ++master-bin.000001 # Table_map 1 # table_id: # (test2.t2) |
2460 | ++master-bin.000001 # Delete_rows 1 # table_id: # |
2461 | ++master-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F |
2462 | ++master-bin.000001 # Query 1 # COMMIT |
2463 | ++master-bin.000001 # Query 1 # BEGIN |
2464 | ++master-bin.000001 # Annotate_rows 1 # INSERT INTO test2.v2 VALUES (1), (2), (3) |
2465 | ++master-bin.000001 # Table_map 1 # table_id: # (test2.t2) |
2466 | ++master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
2467 | ++master-bin.000001 # Query 1 # COMMIT |
2468 | ++master-bin.000001 # Query 1 # BEGIN |
2469 | ++master-bin.000001 # Annotate_rows 1 # DELETE xtest1.xt1, test2.t2 |
2470 | ++FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
2471 | ++WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3.a |
2472 | ++master-bin.000001 # Table_map 1 # table_id: # (test2.t2) |
2473 | ++master-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F |
2474 | ++master-bin.000001 # Query 1 # COMMIT |
2475 | ++master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 |
2476 | ++# |
2477 | ++##################################################################################### |
2478 | ++# mysqlbinlog |
2479 | ++# The following Annotates should appear in this output: |
2480 | ++# - INSERT INTO test2.t2 VALUES (1), (2), (3) |
2481 | ++# - INSERT INTO test3.t3 VALUES (1), (2), (3) |
2482 | ++# - DELETE test1.t1, test2.t2 FROM <...> (with two subsequent Table maps) |
2483 | ++# - INSERT INTO test2.t2 VALUES (1), (2), (3) |
2484 | ++# - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map) |
2485 | ++##################################################################################### |
2486 | ++/*!40019 SET @@session.max_insert_delayed_threads=0*/; |
2487 | ++/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
2488 | ++DELIMITER /*!*/; |
2489 | ++# at # |
2490 | ++#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup |
2491 | ++ROLLBACK/*!*/; |
2492 | ++# at # |
2493 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2494 | ++SET TIMESTAMP=1000000000/*!*/; |
2495 | ++SET @@session.pseudo_thread_id=#/*!*/; |
2496 | ++SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; |
2497 | ++SET @@session.sql_mode=0/*!*/; |
2498 | ++SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
2499 | ++/*!\C latin1 *//*!*/; |
2500 | ++SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; |
2501 | ++SET @@session.lc_time_names=0/*!*/; |
2502 | ++SET @@session.collation_database=DEFAULT/*!*/; |
2503 | ++DROP DATABASE IF EXISTS test1 |
2504 | ++/*!*/; |
2505 | ++# at # |
2506 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2507 | ++SET TIMESTAMP=1000000000/*!*/; |
2508 | ++DROP DATABASE IF EXISTS test2 |
2509 | ++/*!*/; |
2510 | ++# at # |
2511 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2512 | ++SET TIMESTAMP=1000000000/*!*/; |
2513 | ++DROP DATABASE IF EXISTS test3 |
2514 | ++/*!*/; |
2515 | ++# at # |
2516 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2517 | ++SET TIMESTAMP=1000000000/*!*/; |
2518 | ++CREATE DATABASE test1 |
2519 | ++/*!*/; |
2520 | ++# at # |
2521 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2522 | ++SET TIMESTAMP=1000000000/*!*/; |
2523 | ++CREATE DATABASE test2 |
2524 | ++/*!*/; |
2525 | ++# at # |
2526 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2527 | ++SET TIMESTAMP=1000000000/*!*/; |
2528 | ++CREATE DATABASE test3 |
2529 | ++/*!*/; |
2530 | ++# at # |
2531 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2532 | ++SET TIMESTAMP=1000000000/*!*/; |
2533 | ++BEGIN |
2534 | ++/*!*/; |
2535 | ++# at # |
2536 | ++# at # |
2537 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
2538 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2539 | ++### INSERT INTO test1.t1 |
2540 | ++### SET |
2541 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2542 | ++### INSERT INTO test1.t1 |
2543 | ++### SET |
2544 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2545 | ++### INSERT INTO test1.t1 |
2546 | ++### SET |
2547 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2548 | ++# at # |
2549 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2550 | ++SET TIMESTAMP=1000000000/*!*/; |
2551 | ++COMMIT |
2552 | ++/*!*/; |
2553 | ++# at # |
2554 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2555 | ++SET TIMESTAMP=1000000000/*!*/; |
2556 | ++BEGIN |
2557 | ++/*!*/; |
2558 | ++# at # |
2559 | ++# at # |
2560 | ++# at # |
2561 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
2562 | ++#Q> INSERT INTO test2.t2 VALUES (1), (2), (3) |
2563 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
2564 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2565 | ++### INSERT INTO test2.t2 |
2566 | ++### SET |
2567 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2568 | ++### INSERT INTO test2.t2 |
2569 | ++### SET |
2570 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2571 | ++### INSERT INTO test2.t2 |
2572 | ++### SET |
2573 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2574 | ++# at # |
2575 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2576 | ++SET TIMESTAMP=1000000000/*!*/; |
2577 | ++COMMIT |
2578 | ++/*!*/; |
2579 | ++# at # |
2580 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2581 | ++SET TIMESTAMP=1000000000/*!*/; |
2582 | ++BEGIN |
2583 | ++/*!*/; |
2584 | ++# at # |
2585 | ++# at # |
2586 | ++# at # |
2587 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
2588 | ++#Q> INSERT INTO test3.t3 VALUES (1), (2), (3) |
2589 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test3`.`t3` mapped to number # |
2590 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2591 | ++### INSERT INTO test3.t3 |
2592 | ++### SET |
2593 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2594 | ++### INSERT INTO test3.t3 |
2595 | ++### SET |
2596 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2597 | ++### INSERT INTO test3.t3 |
2598 | ++### SET |
2599 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2600 | ++# at # |
2601 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2602 | ++SET TIMESTAMP=1000000000/*!*/; |
2603 | ++COMMIT |
2604 | ++/*!*/; |
2605 | ++# at # |
2606 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2607 | ++SET TIMESTAMP=1000000000/*!*/; |
2608 | ++BEGIN |
2609 | ++/*!*/; |
2610 | ++# at # |
2611 | ++# at # |
2612 | ++# at # |
2613 | ++# at # |
2614 | ++# at # |
2615 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
2616 | ++#Q> DELETE test1.t1, test2.t2 |
2617 | ++#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
2618 | ++#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3 |
2619 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
2620 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
2621 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # |
2622 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
2623 | ++### DELETE FROM test1.t1 |
2624 | ++### WHERE |
2625 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2626 | ++### DELETE FROM test1.t1 |
2627 | ++### WHERE |
2628 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2629 | ++### DELETE FROM test1.t1 |
2630 | ++### WHERE |
2631 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2632 | ++### DELETE FROM test2.t2 |
2633 | ++### WHERE |
2634 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2635 | ++### DELETE FROM test2.t2 |
2636 | ++### WHERE |
2637 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2638 | ++### DELETE FROM test2.t2 |
2639 | ++### WHERE |
2640 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2641 | ++# at # |
2642 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2643 | ++SET TIMESTAMP=1000000000/*!*/; |
2644 | ++COMMIT |
2645 | ++/*!*/; |
2646 | ++# at # |
2647 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2648 | ++SET TIMESTAMP=1000000000/*!*/; |
2649 | ++BEGIN |
2650 | ++/*!*/; |
2651 | ++# at # |
2652 | ++# at # |
2653 | ++# at # |
2654 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
2655 | ++#Q> INSERT INTO test2.v2 VALUES (1), (2), (3) |
2656 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
2657 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2658 | ++### INSERT INTO test2.t2 |
2659 | ++### SET |
2660 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2661 | ++### INSERT INTO test2.t2 |
2662 | ++### SET |
2663 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2664 | ++### INSERT INTO test2.t2 |
2665 | ++### SET |
2666 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2667 | ++# at # |
2668 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2669 | ++SET TIMESTAMP=1000000000/*!*/; |
2670 | ++COMMIT |
2671 | ++/*!*/; |
2672 | ++# at # |
2673 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2674 | ++SET TIMESTAMP=1000000000/*!*/; |
2675 | ++BEGIN |
2676 | ++/*!*/; |
2677 | ++# at # |
2678 | ++# at # |
2679 | ++# at # |
2680 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
2681 | ++#Q> DELETE xtest1.xt1, test2.t2 |
2682 | ++#Q> FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
2683 | ++#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3 |
2684 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
2685 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
2686 | ++### DELETE FROM test2.t2 |
2687 | ++### WHERE |
2688 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2689 | ++### DELETE FROM test2.t2 |
2690 | ++### WHERE |
2691 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2692 | ++### DELETE FROM test2.t2 |
2693 | ++### WHERE |
2694 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2695 | ++# at # |
2696 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2697 | ++SET TIMESTAMP=1000000000/*!*/; |
2698 | ++COMMIT |
2699 | ++/*!*/; |
2700 | ++# at # |
2701 | ++#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4 |
2702 | ++DELIMITER ; |
2703 | ++# End of log file |
2704 | ++ROLLBACK /* added by mysqlbinlog */; |
2705 | ++/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
2706 | ++# |
2707 | ++##################################################################################### |
2708 | ++# mysqlbinlog --database=test1 |
2709 | ++# The following Annotate should appear in this output: |
2710 | ++# - DELETE test1.t1, test2.t2 FROM <...> |
2711 | ++##################################################################################### |
2712 | ++/*!40019 SET @@session.max_insert_delayed_threads=0*/; |
2713 | ++/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
2714 | ++DELIMITER /*!*/; |
2715 | ++# at # |
2716 | ++#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup |
2717 | ++ROLLBACK/*!*/; |
2718 | ++# at # |
2719 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2720 | ++SET TIMESTAMP=1000000000/*!*/; |
2721 | ++SET @@session.pseudo_thread_id=#/*!*/; |
2722 | ++SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; |
2723 | ++SET @@session.sql_mode=0/*!*/; |
2724 | ++SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
2725 | ++/*!\C latin1 *//*!*/; |
2726 | ++SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; |
2727 | ++SET @@session.lc_time_names=0/*!*/; |
2728 | ++SET @@session.collation_database=DEFAULT/*!*/; |
2729 | ++DROP DATABASE IF EXISTS test1 |
2730 | ++/*!*/; |
2731 | ++# at # |
2732 | ++# at # |
2733 | ++# at # |
2734 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2735 | ++SET TIMESTAMP=1000000000/*!*/; |
2736 | ++CREATE DATABASE test1 |
2737 | ++/*!*/; |
2738 | ++# at # |
2739 | ++# at # |
2740 | ++# at # |
2741 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2742 | ++SET TIMESTAMP=1000000000/*!*/; |
2743 | ++BEGIN |
2744 | ++/*!*/; |
2745 | ++# at # |
2746 | ++# at # |
2747 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
2748 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2749 | ++### INSERT INTO test1.t1 |
2750 | ++### SET |
2751 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2752 | ++### INSERT INTO test1.t1 |
2753 | ++### SET |
2754 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2755 | ++### INSERT INTO test1.t1 |
2756 | ++### SET |
2757 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2758 | ++# at # |
2759 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2760 | ++SET TIMESTAMP=1000000000/*!*/; |
2761 | ++COMMIT |
2762 | ++/*!*/; |
2763 | ++# at # |
2764 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2765 | ++SET TIMESTAMP=1000000000/*!*/; |
2766 | ++BEGIN |
2767 | ++/*!*/; |
2768 | ++# at # |
2769 | ++# at # |
2770 | ++# at # |
2771 | ++# at # |
2772 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2773 | ++SET TIMESTAMP=1000000000/*!*/; |
2774 | ++COMMIT |
2775 | ++/*!*/; |
2776 | ++# at # |
2777 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2778 | ++SET TIMESTAMP=1000000000/*!*/; |
2779 | ++BEGIN |
2780 | ++/*!*/; |
2781 | ++# at # |
2782 | ++# at # |
2783 | ++# at # |
2784 | ++# at # |
2785 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2786 | ++SET TIMESTAMP=1000000000/*!*/; |
2787 | ++COMMIT |
2788 | ++/*!*/; |
2789 | ++# at # |
2790 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2791 | ++SET TIMESTAMP=1000000000/*!*/; |
2792 | ++BEGIN |
2793 | ++/*!*/; |
2794 | ++# at # |
2795 | ++# at # |
2796 | ++# at # |
2797 | ++# at # |
2798 | ++# at # |
2799 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
2800 | ++#Q> DELETE test1.t1, test2.t2 |
2801 | ++#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
2802 | ++#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3 |
2803 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
2804 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # |
2805 | ++### DELETE FROM test1.t1 |
2806 | ++### WHERE |
2807 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2808 | ++### DELETE FROM test1.t1 |
2809 | ++### WHERE |
2810 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2811 | ++### DELETE FROM test1.t1 |
2812 | ++### WHERE |
2813 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2814 | ++# at # |
2815 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2816 | ++SET TIMESTAMP=1000000000/*!*/; |
2817 | ++COMMIT |
2818 | ++/*!*/; |
2819 | ++# at # |
2820 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2821 | ++SET TIMESTAMP=1000000000/*!*/; |
2822 | ++BEGIN |
2823 | ++/*!*/; |
2824 | ++# at # |
2825 | ++# at # |
2826 | ++# at # |
2827 | ++# at # |
2828 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2829 | ++SET TIMESTAMP=1000000000/*!*/; |
2830 | ++COMMIT |
2831 | ++/*!*/; |
2832 | ++# at # |
2833 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2834 | ++SET TIMESTAMP=1000000000/*!*/; |
2835 | ++BEGIN |
2836 | ++/*!*/; |
2837 | ++# at # |
2838 | ++# at # |
2839 | ++# at # |
2840 | ++# at # |
2841 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2842 | ++SET TIMESTAMP=1000000000/*!*/; |
2843 | ++COMMIT |
2844 | ++/*!*/; |
2845 | ++# at # |
2846 | ++#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4 |
2847 | ++DELIMITER ; |
2848 | ++# End of log file |
2849 | ++ROLLBACK /* added by mysqlbinlog */; |
2850 | ++/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
2851 | ++# |
2852 | ++##################################################################################### |
2853 | ++# mysqlbinlog --skip-annotate-rows-events |
2854 | ++# No Annotates should appear in this output |
2855 | ++##################################################################################### |
2856 | ++/*!40019 SET @@session.max_insert_delayed_threads=0*/; |
2857 | ++/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
2858 | ++DELIMITER /*!*/; |
2859 | ++# at # |
2860 | ++#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup |
2861 | ++ROLLBACK/*!*/; |
2862 | ++# at # |
2863 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2864 | ++SET TIMESTAMP=1000000000/*!*/; |
2865 | ++SET @@session.pseudo_thread_id=#/*!*/; |
2866 | ++SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; |
2867 | ++SET @@session.sql_mode=0/*!*/; |
2868 | ++SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
2869 | ++/*!\C latin1 *//*!*/; |
2870 | ++SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; |
2871 | ++SET @@session.lc_time_names=0/*!*/; |
2872 | ++SET @@session.collation_database=DEFAULT/*!*/; |
2873 | ++DROP DATABASE IF EXISTS test1 |
2874 | ++/*!*/; |
2875 | ++# at # |
2876 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2877 | ++SET TIMESTAMP=1000000000/*!*/; |
2878 | ++DROP DATABASE IF EXISTS test2 |
2879 | ++/*!*/; |
2880 | ++# at # |
2881 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2882 | ++SET TIMESTAMP=1000000000/*!*/; |
2883 | ++DROP DATABASE IF EXISTS test3 |
2884 | ++/*!*/; |
2885 | ++# at # |
2886 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2887 | ++SET TIMESTAMP=1000000000/*!*/; |
2888 | ++CREATE DATABASE test1 |
2889 | ++/*!*/; |
2890 | ++# at # |
2891 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2892 | ++SET TIMESTAMP=1000000000/*!*/; |
2893 | ++CREATE DATABASE test2 |
2894 | ++/*!*/; |
2895 | ++# at # |
2896 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2897 | ++SET TIMESTAMP=1000000000/*!*/; |
2898 | ++CREATE DATABASE test3 |
2899 | ++/*!*/; |
2900 | ++# at # |
2901 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2902 | ++SET TIMESTAMP=1000000000/*!*/; |
2903 | ++BEGIN |
2904 | ++/*!*/; |
2905 | ++# at # |
2906 | ++# at # |
2907 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
2908 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2909 | ++### INSERT INTO test1.t1 |
2910 | ++### SET |
2911 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2912 | ++### INSERT INTO test1.t1 |
2913 | ++### SET |
2914 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2915 | ++### INSERT INTO test1.t1 |
2916 | ++### SET |
2917 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2918 | ++# at # |
2919 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2920 | ++SET TIMESTAMP=1000000000/*!*/; |
2921 | ++COMMIT |
2922 | ++/*!*/; |
2923 | ++# at # |
2924 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2925 | ++SET TIMESTAMP=1000000000/*!*/; |
2926 | ++BEGIN |
2927 | ++/*!*/; |
2928 | ++# at # |
2929 | ++# at # |
2930 | ++# at # |
2931 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
2932 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2933 | ++### INSERT INTO test2.t2 |
2934 | ++### SET |
2935 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2936 | ++### INSERT INTO test2.t2 |
2937 | ++### SET |
2938 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2939 | ++### INSERT INTO test2.t2 |
2940 | ++### SET |
2941 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2942 | ++# at # |
2943 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2944 | ++SET TIMESTAMP=1000000000/*!*/; |
2945 | ++COMMIT |
2946 | ++/*!*/; |
2947 | ++# at # |
2948 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2949 | ++SET TIMESTAMP=1000000000/*!*/; |
2950 | ++BEGIN |
2951 | ++/*!*/; |
2952 | ++# at # |
2953 | ++# at # |
2954 | ++# at # |
2955 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test3`.`t3` mapped to number # |
2956 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
2957 | ++### INSERT INTO test3.t3 |
2958 | ++### SET |
2959 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2960 | ++### INSERT INTO test3.t3 |
2961 | ++### SET |
2962 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2963 | ++### INSERT INTO test3.t3 |
2964 | ++### SET |
2965 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2966 | ++# at # |
2967 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2968 | ++SET TIMESTAMP=1000000000/*!*/; |
2969 | ++COMMIT |
2970 | ++/*!*/; |
2971 | ++# at # |
2972 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
2973 | ++SET TIMESTAMP=1000000000/*!*/; |
2974 | ++BEGIN |
2975 | ++/*!*/; |
2976 | ++# at # |
2977 | ++# at # |
2978 | ++# at # |
2979 | ++# at # |
2980 | ++# at # |
2981 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
2982 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
2983 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # |
2984 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
2985 | ++### DELETE FROM test1.t1 |
2986 | ++### WHERE |
2987 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2988 | ++### DELETE FROM test1.t1 |
2989 | ++### WHERE |
2990 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
2991 | ++### DELETE FROM test1.t1 |
2992 | ++### WHERE |
2993 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
2994 | ++### DELETE FROM test2.t2 |
2995 | ++### WHERE |
2996 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
2997 | ++### DELETE FROM test2.t2 |
2998 | ++### WHERE |
2999 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3000 | ++### DELETE FROM test2.t2 |
3001 | ++### WHERE |
3002 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3003 | ++# at # |
3004 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3005 | ++SET TIMESTAMP=1000000000/*!*/; |
3006 | ++COMMIT |
3007 | ++/*!*/; |
3008 | ++# at # |
3009 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3010 | ++SET TIMESTAMP=1000000000/*!*/; |
3011 | ++BEGIN |
3012 | ++/*!*/; |
3013 | ++# at # |
3014 | ++# at # |
3015 | ++# at # |
3016 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3017 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3018 | ++### INSERT INTO test2.t2 |
3019 | ++### SET |
3020 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3021 | ++### INSERT INTO test2.t2 |
3022 | ++### SET |
3023 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3024 | ++### INSERT INTO test2.t2 |
3025 | ++### SET |
3026 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3027 | ++# at # |
3028 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3029 | ++SET TIMESTAMP=1000000000/*!*/; |
3030 | ++COMMIT |
3031 | ++/*!*/; |
3032 | ++# at # |
3033 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3034 | ++SET TIMESTAMP=1000000000/*!*/; |
3035 | ++BEGIN |
3036 | ++/*!*/; |
3037 | ++# at # |
3038 | ++# at # |
3039 | ++# at # |
3040 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3041 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
3042 | ++### DELETE FROM test2.t2 |
3043 | ++### WHERE |
3044 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3045 | ++### DELETE FROM test2.t2 |
3046 | ++### WHERE |
3047 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3048 | ++### DELETE FROM test2.t2 |
3049 | ++### WHERE |
3050 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3051 | ++# at # |
3052 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3053 | ++SET TIMESTAMP=1000000000/*!*/; |
3054 | ++COMMIT |
3055 | ++/*!*/; |
3056 | ++# at # |
3057 | ++#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4 |
3058 | ++DELIMITER ; |
3059 | ++# End of log file |
3060 | ++ROLLBACK /* added by mysqlbinlog */; |
3061 | ++/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
3062 | ++# |
3063 | ++##################################################################################### |
3064 | ++# mysqlbinlog --read-from-remote-server |
3065 | ++# The following Annotates should appear in this output: |
3066 | ++# - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3067 | ++# - INSERT INTO test3.t3 VALUES (1), (2), (3) |
3068 | ++# - DELETE test1.t1, test2.t2 FROM <...> (with two subsequent Table maps) |
3069 | ++# - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3070 | ++# - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map) |
3071 | ++##################################################################################### |
3072 | ++/*!40019 SET @@session.max_insert_delayed_threads=0*/; |
3073 | ++/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
3074 | ++DELIMITER /*!*/; |
3075 | ++# at # |
3076 | ++#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup |
3077 | ++ROLLBACK/*!*/; |
3078 | ++# at # |
3079 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3080 | ++SET TIMESTAMP=1000000000/*!*/; |
3081 | ++SET @@session.pseudo_thread_id=#/*!*/; |
3082 | ++SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; |
3083 | ++SET @@session.sql_mode=0/*!*/; |
3084 | ++SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
3085 | ++/*!\C latin1 *//*!*/; |
3086 | ++SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; |
3087 | ++SET @@session.lc_time_names=0/*!*/; |
3088 | ++SET @@session.collation_database=DEFAULT/*!*/; |
3089 | ++DROP DATABASE IF EXISTS test1 |
3090 | ++/*!*/; |
3091 | ++# at # |
3092 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3093 | ++SET TIMESTAMP=1000000000/*!*/; |
3094 | ++DROP DATABASE IF EXISTS test2 |
3095 | ++/*!*/; |
3096 | ++# at # |
3097 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3098 | ++SET TIMESTAMP=1000000000/*!*/; |
3099 | ++DROP DATABASE IF EXISTS test3 |
3100 | ++/*!*/; |
3101 | ++# at # |
3102 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3103 | ++SET TIMESTAMP=1000000000/*!*/; |
3104 | ++CREATE DATABASE test1 |
3105 | ++/*!*/; |
3106 | ++# at # |
3107 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3108 | ++SET TIMESTAMP=1000000000/*!*/; |
3109 | ++CREATE DATABASE test2 |
3110 | ++/*!*/; |
3111 | ++# at # |
3112 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3113 | ++SET TIMESTAMP=1000000000/*!*/; |
3114 | ++CREATE DATABASE test3 |
3115 | ++/*!*/; |
3116 | ++# at # |
3117 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3118 | ++SET TIMESTAMP=1000000000/*!*/; |
3119 | ++BEGIN |
3120 | ++/*!*/; |
3121 | ++# at # |
3122 | ++# at # |
3123 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
3124 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3125 | ++### INSERT INTO test1.t1 |
3126 | ++### SET |
3127 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3128 | ++### INSERT INTO test1.t1 |
3129 | ++### SET |
3130 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3131 | ++### INSERT INTO test1.t1 |
3132 | ++### SET |
3133 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3134 | ++# at # |
3135 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3136 | ++SET TIMESTAMP=1000000000/*!*/; |
3137 | ++COMMIT |
3138 | ++/*!*/; |
3139 | ++# at # |
3140 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3141 | ++SET TIMESTAMP=1000000000/*!*/; |
3142 | ++BEGIN |
3143 | ++/*!*/; |
3144 | ++# at # |
3145 | ++# at # |
3146 | ++# at # |
3147 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
3148 | ++#Q> INSERT INTO test2.t2 VALUES (1), (2), (3) |
3149 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3150 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3151 | ++### INSERT INTO test2.t2 |
3152 | ++### SET |
3153 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3154 | ++### INSERT INTO test2.t2 |
3155 | ++### SET |
3156 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3157 | ++### INSERT INTO test2.t2 |
3158 | ++### SET |
3159 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3160 | ++# at # |
3161 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3162 | ++SET TIMESTAMP=1000000000/*!*/; |
3163 | ++COMMIT |
3164 | ++/*!*/; |
3165 | ++# at # |
3166 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3167 | ++SET TIMESTAMP=1000000000/*!*/; |
3168 | ++BEGIN |
3169 | ++/*!*/; |
3170 | ++# at # |
3171 | ++# at # |
3172 | ++# at # |
3173 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
3174 | ++#Q> INSERT INTO test3.t3 VALUES (1), (2), (3) |
3175 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test3`.`t3` mapped to number # |
3176 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3177 | ++### INSERT INTO test3.t3 |
3178 | ++### SET |
3179 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3180 | ++### INSERT INTO test3.t3 |
3181 | ++### SET |
3182 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3183 | ++### INSERT INTO test3.t3 |
3184 | ++### SET |
3185 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3186 | ++# at # |
3187 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3188 | ++SET TIMESTAMP=1000000000/*!*/; |
3189 | ++COMMIT |
3190 | ++/*!*/; |
3191 | ++# at # |
3192 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3193 | ++SET TIMESTAMP=1000000000/*!*/; |
3194 | ++BEGIN |
3195 | ++/*!*/; |
3196 | ++# at # |
3197 | ++# at # |
3198 | ++# at # |
3199 | ++# at # |
3200 | ++# at # |
3201 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
3202 | ++#Q> DELETE test1.t1, test2.t2 |
3203 | ++#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
3204 | ++#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3 |
3205 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
3206 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3207 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # |
3208 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
3209 | ++### DELETE FROM test1.t1 |
3210 | ++### WHERE |
3211 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3212 | ++### DELETE FROM test1.t1 |
3213 | ++### WHERE |
3214 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3215 | ++### DELETE FROM test1.t1 |
3216 | ++### WHERE |
3217 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3218 | ++### DELETE FROM test2.t2 |
3219 | ++### WHERE |
3220 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3221 | ++### DELETE FROM test2.t2 |
3222 | ++### WHERE |
3223 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3224 | ++### DELETE FROM test2.t2 |
3225 | ++### WHERE |
3226 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3227 | ++# at # |
3228 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3229 | ++SET TIMESTAMP=1000000000/*!*/; |
3230 | ++COMMIT |
3231 | ++/*!*/; |
3232 | ++# at # |
3233 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3234 | ++SET TIMESTAMP=1000000000/*!*/; |
3235 | ++BEGIN |
3236 | ++/*!*/; |
3237 | ++# at # |
3238 | ++# at # |
3239 | ++# at # |
3240 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
3241 | ++#Q> INSERT INTO test2.v2 VALUES (1), (2), (3) |
3242 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3243 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3244 | ++### INSERT INTO test2.t2 |
3245 | ++### SET |
3246 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3247 | ++### INSERT INTO test2.t2 |
3248 | ++### SET |
3249 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3250 | ++### INSERT INTO test2.t2 |
3251 | ++### SET |
3252 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3253 | ++# at # |
3254 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3255 | ++SET TIMESTAMP=1000000000/*!*/; |
3256 | ++COMMIT |
3257 | ++/*!*/; |
3258 | ++# at # |
3259 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3260 | ++SET TIMESTAMP=1000000000/*!*/; |
3261 | ++BEGIN |
3262 | ++/*!*/; |
3263 | ++# at # |
3264 | ++# at # |
3265 | ++# at # |
3266 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
3267 | ++#Q> DELETE xtest1.xt1, test2.t2 |
3268 | ++#Q> FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
3269 | ++#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3 |
3270 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3271 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
3272 | ++### DELETE FROM test2.t2 |
3273 | ++### WHERE |
3274 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3275 | ++### DELETE FROM test2.t2 |
3276 | ++### WHERE |
3277 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3278 | ++### DELETE FROM test2.t2 |
3279 | ++### WHERE |
3280 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3281 | ++# at # |
3282 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3283 | ++SET TIMESTAMP=1000000000/*!*/; |
3284 | ++COMMIT |
3285 | ++/*!*/; |
3286 | ++# at # |
3287 | ++#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4 |
3288 | ++DELIMITER ; |
3289 | ++# End of log file |
3290 | ++ROLLBACK /* added by mysqlbinlog */; |
3291 | ++/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
3292 | ++# |
3293 | ++##################################################################################### |
3294 | ++# mysqlbinlog --read-from-remote-server --database=test1 |
3295 | ++# The following Annotate should appear in this output: |
3296 | ++# - DELETE test1.t1, test2.t2 FROM <...> |
3297 | ++##################################################################################### |
3298 | ++/*!40019 SET @@session.max_insert_delayed_threads=0*/; |
3299 | ++/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
3300 | ++DELIMITER /*!*/; |
3301 | ++# at # |
3302 | ++#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup |
3303 | ++ROLLBACK/*!*/; |
3304 | ++# at # |
3305 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3306 | ++SET TIMESTAMP=1000000000/*!*/; |
3307 | ++SET @@session.pseudo_thread_id=#/*!*/; |
3308 | ++SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; |
3309 | ++SET @@session.sql_mode=0/*!*/; |
3310 | ++SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
3311 | ++/*!\C latin1 *//*!*/; |
3312 | ++SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; |
3313 | ++SET @@session.lc_time_names=0/*!*/; |
3314 | ++SET @@session.collation_database=DEFAULT/*!*/; |
3315 | ++DROP DATABASE IF EXISTS test1 |
3316 | ++/*!*/; |
3317 | ++# at # |
3318 | ++# at # |
3319 | ++# at # |
3320 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3321 | ++SET TIMESTAMP=1000000000/*!*/; |
3322 | ++CREATE DATABASE test1 |
3323 | ++/*!*/; |
3324 | ++# at # |
3325 | ++# at # |
3326 | ++# at # |
3327 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3328 | ++SET TIMESTAMP=1000000000/*!*/; |
3329 | ++BEGIN |
3330 | ++/*!*/; |
3331 | ++# at # |
3332 | ++# at # |
3333 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
3334 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3335 | ++### INSERT INTO test1.t1 |
3336 | ++### SET |
3337 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3338 | ++### INSERT INTO test1.t1 |
3339 | ++### SET |
3340 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3341 | ++### INSERT INTO test1.t1 |
3342 | ++### SET |
3343 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3344 | ++# at # |
3345 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3346 | ++SET TIMESTAMP=1000000000/*!*/; |
3347 | ++COMMIT |
3348 | ++/*!*/; |
3349 | ++# at # |
3350 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3351 | ++SET TIMESTAMP=1000000000/*!*/; |
3352 | ++BEGIN |
3353 | ++/*!*/; |
3354 | ++# at # |
3355 | ++# at # |
3356 | ++# at # |
3357 | ++# at # |
3358 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3359 | ++SET TIMESTAMP=1000000000/*!*/; |
3360 | ++COMMIT |
3361 | ++/*!*/; |
3362 | ++# at # |
3363 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3364 | ++SET TIMESTAMP=1000000000/*!*/; |
3365 | ++BEGIN |
3366 | ++/*!*/; |
3367 | ++# at # |
3368 | ++# at # |
3369 | ++# at # |
3370 | ++# at # |
3371 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3372 | ++SET TIMESTAMP=1000000000/*!*/; |
3373 | ++COMMIT |
3374 | ++/*!*/; |
3375 | ++# at # |
3376 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3377 | ++SET TIMESTAMP=1000000000/*!*/; |
3378 | ++BEGIN |
3379 | ++/*!*/; |
3380 | ++# at # |
3381 | ++# at # |
3382 | ++# at # |
3383 | ++# at # |
3384 | ++# at # |
3385 | ++#010909 4:46:40 server id # end_log_pos # Annotate_rows: |
3386 | ++#Q> DELETE test1.t1, test2.t2 |
3387 | ++#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
3388 | ++#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3 |
3389 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
3390 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # |
3391 | ++### DELETE FROM test1.t1 |
3392 | ++### WHERE |
3393 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3394 | ++### DELETE FROM test1.t1 |
3395 | ++### WHERE |
3396 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3397 | ++### DELETE FROM test1.t1 |
3398 | ++### WHERE |
3399 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3400 | ++# at # |
3401 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3402 | ++SET TIMESTAMP=1000000000/*!*/; |
3403 | ++COMMIT |
3404 | ++/*!*/; |
3405 | ++# at # |
3406 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3407 | ++SET TIMESTAMP=1000000000/*!*/; |
3408 | ++BEGIN |
3409 | ++/*!*/; |
3410 | ++# at # |
3411 | ++# at # |
3412 | ++# at # |
3413 | ++# at # |
3414 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3415 | ++SET TIMESTAMP=1000000000/*!*/; |
3416 | ++COMMIT |
3417 | ++/*!*/; |
3418 | ++# at # |
3419 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3420 | ++SET TIMESTAMP=1000000000/*!*/; |
3421 | ++BEGIN |
3422 | ++/*!*/; |
3423 | ++# at # |
3424 | ++# at # |
3425 | ++# at # |
3426 | ++# at # |
3427 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3428 | ++SET TIMESTAMP=1000000000/*!*/; |
3429 | ++COMMIT |
3430 | ++/*!*/; |
3431 | ++# at # |
3432 | ++#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4 |
3433 | ++DELIMITER ; |
3434 | ++# End of log file |
3435 | ++ROLLBACK /* added by mysqlbinlog */; |
3436 | ++/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
3437 | ++# |
3438 | ++##################################################################################### |
3439 | ++# mysqlbinlog --read-from-remote-server --skip-annotate-rows-events |
3440 | ++# No Annotates should appear in this output |
3441 | ++##################################################################################### |
3442 | ++/*!40019 SET @@session.max_insert_delayed_threads=0*/; |
3443 | ++/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; |
3444 | ++DELIMITER /*!*/; |
3445 | ++# at # |
3446 | ++#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup |
3447 | ++ROLLBACK/*!*/; |
3448 | ++# at # |
3449 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3450 | ++SET TIMESTAMP=1000000000/*!*/; |
3451 | ++SET @@session.pseudo_thread_id=#/*!*/; |
3452 | ++SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; |
3453 | ++SET @@session.sql_mode=0/*!*/; |
3454 | ++SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; |
3455 | ++/*!\C latin1 *//*!*/; |
3456 | ++SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; |
3457 | ++SET @@session.lc_time_names=0/*!*/; |
3458 | ++SET @@session.collation_database=DEFAULT/*!*/; |
3459 | ++DROP DATABASE IF EXISTS test1 |
3460 | ++/*!*/; |
3461 | ++# at # |
3462 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3463 | ++SET TIMESTAMP=1000000000/*!*/; |
3464 | ++DROP DATABASE IF EXISTS test2 |
3465 | ++/*!*/; |
3466 | ++# at # |
3467 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3468 | ++SET TIMESTAMP=1000000000/*!*/; |
3469 | ++DROP DATABASE IF EXISTS test3 |
3470 | ++/*!*/; |
3471 | ++# at # |
3472 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3473 | ++SET TIMESTAMP=1000000000/*!*/; |
3474 | ++CREATE DATABASE test1 |
3475 | ++/*!*/; |
3476 | ++# at # |
3477 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3478 | ++SET TIMESTAMP=1000000000/*!*/; |
3479 | ++CREATE DATABASE test2 |
3480 | ++/*!*/; |
3481 | ++# at # |
3482 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3483 | ++SET TIMESTAMP=1000000000/*!*/; |
3484 | ++CREATE DATABASE test3 |
3485 | ++/*!*/; |
3486 | ++# at # |
3487 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3488 | ++SET TIMESTAMP=1000000000/*!*/; |
3489 | ++BEGIN |
3490 | ++/*!*/; |
3491 | ++# at # |
3492 | ++# at # |
3493 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
3494 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3495 | ++### INSERT INTO test1.t1 |
3496 | ++### SET |
3497 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3498 | ++### INSERT INTO test1.t1 |
3499 | ++### SET |
3500 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3501 | ++### INSERT INTO test1.t1 |
3502 | ++### SET |
3503 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3504 | ++# at # |
3505 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3506 | ++SET TIMESTAMP=1000000000/*!*/; |
3507 | ++COMMIT |
3508 | ++/*!*/; |
3509 | ++# at # |
3510 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3511 | ++SET TIMESTAMP=1000000000/*!*/; |
3512 | ++BEGIN |
3513 | ++/*!*/; |
3514 | ++# at # |
3515 | ++# at # |
3516 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3517 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3518 | ++### INSERT INTO test2.t2 |
3519 | ++### SET |
3520 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3521 | ++### INSERT INTO test2.t2 |
3522 | ++### SET |
3523 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3524 | ++### INSERT INTO test2.t2 |
3525 | ++### SET |
3526 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3527 | ++# at # |
3528 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3529 | ++SET TIMESTAMP=1000000000/*!*/; |
3530 | ++COMMIT |
3531 | ++/*!*/; |
3532 | ++# at # |
3533 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3534 | ++SET TIMESTAMP=1000000000/*!*/; |
3535 | ++BEGIN |
3536 | ++/*!*/; |
3537 | ++# at # |
3538 | ++# at # |
3539 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test3`.`t3` mapped to number # |
3540 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3541 | ++### INSERT INTO test3.t3 |
3542 | ++### SET |
3543 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3544 | ++### INSERT INTO test3.t3 |
3545 | ++### SET |
3546 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3547 | ++### INSERT INTO test3.t3 |
3548 | ++### SET |
3549 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3550 | ++# at # |
3551 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3552 | ++SET TIMESTAMP=1000000000/*!*/; |
3553 | ++COMMIT |
3554 | ++/*!*/; |
3555 | ++# at # |
3556 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3557 | ++SET TIMESTAMP=1000000000/*!*/; |
3558 | ++BEGIN |
3559 | ++/*!*/; |
3560 | ++# at # |
3561 | ++# at # |
3562 | ++# at # |
3563 | ++# at # |
3564 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # |
3565 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3566 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # |
3567 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
3568 | ++### DELETE FROM test1.t1 |
3569 | ++### WHERE |
3570 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3571 | ++### DELETE FROM test1.t1 |
3572 | ++### WHERE |
3573 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3574 | ++### DELETE FROM test1.t1 |
3575 | ++### WHERE |
3576 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3577 | ++### DELETE FROM test2.t2 |
3578 | ++### WHERE |
3579 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3580 | ++### DELETE FROM test2.t2 |
3581 | ++### WHERE |
3582 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3583 | ++### DELETE FROM test2.t2 |
3584 | ++### WHERE |
3585 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3586 | ++# at # |
3587 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3588 | ++SET TIMESTAMP=1000000000/*!*/; |
3589 | ++COMMIT |
3590 | ++/*!*/; |
3591 | ++# at # |
3592 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3593 | ++SET TIMESTAMP=1000000000/*!*/; |
3594 | ++BEGIN |
3595 | ++/*!*/; |
3596 | ++# at # |
3597 | ++# at # |
3598 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3599 | ++#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F |
3600 | ++### INSERT INTO test2.t2 |
3601 | ++### SET |
3602 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3603 | ++### INSERT INTO test2.t2 |
3604 | ++### SET |
3605 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3606 | ++### INSERT INTO test2.t2 |
3607 | ++### SET |
3608 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3609 | ++# at # |
3610 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3611 | ++SET TIMESTAMP=1000000000/*!*/; |
3612 | ++COMMIT |
3613 | ++/*!*/; |
3614 | ++# at # |
3615 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3616 | ++SET TIMESTAMP=1000000000/*!*/; |
3617 | ++BEGIN |
3618 | ++/*!*/; |
3619 | ++# at # |
3620 | ++# at # |
3621 | ++#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # |
3622 | ++#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F |
3623 | ++### DELETE FROM test2.t2 |
3624 | ++### WHERE |
3625 | ++### @1=3 /* INT meta=0 nullable=1 is_null=0 */ |
3626 | ++### DELETE FROM test2.t2 |
3627 | ++### WHERE |
3628 | ++### @1=2 /* INT meta=0 nullable=1 is_null=0 */ |
3629 | ++### DELETE FROM test2.t2 |
3630 | ++### WHERE |
3631 | ++### @1=1 /* INT meta=0 nullable=1 is_null=0 */ |
3632 | ++# at # |
3633 | ++#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 |
3634 | ++SET TIMESTAMP=1000000000/*!*/; |
3635 | ++COMMIT |
3636 | ++/*!*/; |
3637 | ++# at # |
3638 | ++#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4 |
3639 | ++DELIMITER ; |
3640 | ++# End of log file |
3641 | ++ROLLBACK /* added by mysqlbinlog */; |
3642 | ++/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; |
3643 | +--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result |
3644 | ++++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result |
3645 | +@@ -331,7 +331,7 @@ |
3646 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 243 ) |
3647 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 242 ) |
3648 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 241 ) |
3649 | +-master-bin.000001 # Query # # use `test`; insert into t1 values( 240 ) |
3650 | ++master-bin.000001 # Query # # use `test`; insert into t1 values( <binlog_start> ) |
3651 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 239 ) |
3652 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 238 ) |
3653 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 237 ) |
3654 | +@@ -465,7 +465,7 @@ |
3655 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 109 ) |
3656 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 108 ) |
3657 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 107 ) |
3658 | +-master-bin.000001 # Query # # use `test`; insert into t1 values( <binlog_start> ) |
3659 | ++master-bin.000001 # Query # # use `test`; insert into t1 values( 106 ) |
3660 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 105 ) |
3661 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 104 ) |
3662 | + master-bin.000001 # Query # # use `test`; insert into t1 values( 103 ) |
3663 | +--- a/mysql-test/suite/binlog/t/binlog_incident.test |
3664 | ++++ b/mysql-test/suite/binlog/t/binlog_incident.test |
3665 | +@@ -4,6 +4,7 @@ |
3666 | + |
3667 | + source include/have_log_bin.inc; |
3668 | + source include/have_debug.inc; |
3669 | ++source include/binlog_start_pos.inc; |
3670 | + |
3671 | + let $MYSQLD_DATADIR= `select @@datadir`; |
3672 | + RESET MASTER; |
3673 | +@@ -20,7 +21,7 @@ |
3674 | + DROP TABLE t1; |
3675 | + FLUSH LOGS; |
3676 | + |
3677 | +-exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; |
3678 | ++exec $MYSQL_BINLOG --start-position=$binlog_start_pos $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; |
3679 | + --disable_query_log |
3680 | + eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl; |
3681 | + --enable_query_log |
3682 | +--- a/mysql-test/suite/binlog/t/binlog_killed.test |
3683 | ++++ b/mysql-test/suite/binlog/t/binlog_killed.test |
3684 | +@@ -1,5 +1,6 @@ |
3685 | + -- source include/have_innodb.inc |
3686 | + -- source include/have_binlog_format_statement.inc |
3687 | ++-- source include/binlog_start_pos.inc |
3688 | + |
3689 | + # You cannot use `KILL' with the Embedded MySQL Server library, |
3690 | + # because the embedded server merely runs inside the threads of the host |
3691 | +@@ -51,7 +52,8 @@ |
3692 | + let $rows= `select count(*) from t2 /* must be 2 or 0 */`; |
3693 | + |
3694 | + let $MYSQLD_DATADIR= `select @@datadir`; |
3695 | +---exec $MYSQL_BINLOG --force-if-open --start-position=134 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog |
3696 | ++let $start_pos= `select @binlog_start_pos + 28`; |
3697 | ++--exec $MYSQL_BINLOG --force-if-open --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog |
3698 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
3699 | + eval select |
3700 | + (@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) |
3701 | +--- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test |
3702 | ++++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test |
3703 | +@@ -1,5 +1,6 @@ |
3704 | + -- source include/have_debug.inc |
3705 | + -- source include/have_binlog_format_statement.inc |
3706 | ++-- source include/binlog_start_pos.inc |
3707 | + # |
3708 | + # bug#27571 asynchronous setting mysql_$query()'s local error and |
3709 | + # Query_log_event::error_code |
3710 | +@@ -24,7 +25,7 @@ |
3711 | + # for some constants like the offset of the first real event |
3712 | + # that is different between severs versions. |
3713 | + let $MYSQLD_DATADIR= `select @@datadir`; |
3714 | +---exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog |
3715 | ++--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_start_pos $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog |
3716 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
3717 | + eval select |
3718 | + (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) |
3719 | +--- /dev/null |
3720 | ++++ b/mysql-test/suite/binlog/t/binlog_row_annotate-master.opt |
3721 | +@@ -0,0 +1 @@ |
3722 | ++--timezone=GMT-3 --binlog-do-db=test1 --binlog-do-db=test2 --binlog-do-db=test3 |
3723 | +--- /dev/null |
3724 | ++++ b/mysql-test/suite/binlog/t/binlog_row_annotate.test |
3725 | +@@ -0,0 +1,189 @@ |
3726 | ++############################################################################### |
3727 | ++# WL47: Store in binlog text of statements that caused RBR events |
3728 | ++# new event: ANNOTATE_ROWS_EVENT |
3729 | ++# new master option: --binlog-annotate-rows-events |
3730 | ++# new mysqlbinlog option: --skip-annotate-rows-events |
3731 | ++# |
3732 | ++# Intended to test that: |
3733 | ++# *** If the --binlog-annotate-rows-events option is switched on on master |
3734 | ++# then Annotate_rows events: |
3735 | ++# - are generated; |
3736 | ++# - are generated only once for "multi-table-maps" rbr queries; |
3737 | ++# - are not generated when the corresponding queries are filtered away; |
3738 | ++# - are generated when the corresponding queries are filtered away partialy |
3739 | ++# (e.g. in case of multi-delete). |
3740 | ++# *** Annotate_rows events are printed by mysqlbinlog started without |
3741 | ++# --skip-annotate-rows-events options both in remote and local cases. |
3742 | ++# *** Annotate_rows events are not printed by mysqlbinlog started with |
3743 | ++# --skip-annotate-rows-events options both in remote and local cases. |
3744 | ++############################################################################### |
3745 | ++ |
3746 | ++--source include/have_log_bin.inc |
3747 | ++--source include/have_binlog_format_row.inc |
3748 | ++--source include/binlog_start_pos.inc |
3749 | ++ |
3750 | ++--disable_query_log |
3751 | ++ |
3752 | ++# Fix timestamp to avoid varying results |
3753 | ++SET timestamp=1000000000; |
3754 | ++ |
3755 | ++# Delete all existing binary logs |
3756 | ++RESET MASTER; |
3757 | ++ |
3758 | ++--disable_warnings |
3759 | ++DROP DATABASE IF EXISTS test1; |
3760 | ++DROP DATABASE IF EXISTS test2; |
3761 | ++DROP DATABASE IF EXISTS test3; |
3762 | ++DROP DATABASE IF EXISTS xtest1; |
3763 | ++DROP DATABASE IF EXISTS xtest2; |
3764 | ++--enable_warnings |
3765 | ++ |
3766 | ++CREATE DATABASE test1; |
3767 | ++CREATE TABLE test1.t1(a int); |
3768 | ++ |
3769 | ++CREATE DATABASE test2; |
3770 | ++CREATE TABLE test2.t2(a int); |
3771 | ++CREATE VIEW test2.v2 AS SELECT * FROM test2.t2; |
3772 | ++ |
3773 | ++CREATE DATABASE test3; |
3774 | ++CREATE TABLE test3.t3(a int); |
3775 | ++ |
3776 | ++CREATE DATABASE xtest1; |
3777 | ++CREATE TABLE xtest1.xt1(a int); |
3778 | ++ |
3779 | ++CREATE DATABASE xtest2; |
3780 | ++CREATE TABLE xtest2.xt2(a int); |
3781 | ++ |
3782 | ++# By default SESSION binlog_annotate_rows_events = OFF |
3783 | ++ |
3784 | ++INSERT INTO test1.t1 VALUES (1), (2), (3); |
3785 | ++ |
3786 | ++SET SESSION binlog_annotate_rows_events = ON; |
3787 | ++ |
3788 | ++INSERT INTO test2.t2 VALUES (1), (2), (3); |
3789 | ++INSERT INTO test3.t3 VALUES (1), (2), (3); |
3790 | ++ |
3791 | ++# This query generates two Table maps but the Annotate |
3792 | ++# event should appear only once before the first Table map |
3793 | ++DELETE test1.t1, test2.t2 |
3794 | ++ FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
3795 | ++ WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a; |
3796 | ++ |
3797 | ++# This event should be filtered out together with Annotate event |
3798 | ++INSERT INTO xtest1.xt1 VALUES (1), (2), (3); |
3799 | ++ |
3800 | ++# This event should pass the filter |
3801 | ++INSERT INTO test2.v2 VALUES (1), (2), (3); |
3802 | ++ |
3803 | ++# This event should pass the filter only for test2.t2 part |
3804 | ++DELETE xtest1.xt1, test2.t2 |
3805 | ++ FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3 |
3806 | ++ WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3.a; |
3807 | ++ |
3808 | ++# These events should be filtered out together with Annotate events |
3809 | ++INSERT INTO xtest1.xt1 VALUES (1), (2), (3); |
3810 | ++INSERT INTO xtest2.xt2 VALUES (1), (2), (3); |
3811 | ++DELETE xtest1.xt1, xtest2.xt2 |
3812 | ++ FROM xtest1.xt1 INNER JOIN xtest2.xt2 INNER JOIN test3.t3 |
3813 | ++ WHERE xtest1.xt1.a=xtest2.xt2.a AND xtest2.xt2.a=test3.t3.a; |
3814 | ++ |
3815 | ++FLUSH LOGS; |
3816 | ++--enable_query_log |
3817 | ++ |
3818 | ++--echo ##################################################################################### |
3819 | ++--echo # The following Annotate_rows events should appear below: |
3820 | ++--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3821 | ++--echo # - INSERT INTO test3.t3 VALUES (1), (2), (3) |
3822 | ++--echo # - DELETE test1.t1, test2.t2 FROM <...> |
3823 | ++--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3824 | ++--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> |
3825 | ++--echo ##################################################################################### |
3826 | ++ |
3827 | ++let $start_pos= `select @binlog_start_pos`; |
3828 | ++--replace_column 2 # 5 # |
3829 | ++--replace_result $start_pos <start_pos> |
3830 | ++--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// |
3831 | ++--eval show binlog events in 'master-bin.000001' from $start_pos |
3832 | ++ |
3833 | ++--echo # |
3834 | ++--echo ##################################################################################### |
3835 | ++--echo # mysqlbinlog |
3836 | ++--echo # The following Annotates should appear in this output: |
3837 | ++--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3838 | ++--echo # - INSERT INTO test3.t3 VALUES (1), (2), (3) |
3839 | ++--echo # - DELETE test1.t1, test2.t2 FROM <...> (with two subsequent Table maps) |
3840 | ++--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3841 | ++--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map) |
3842 | ++--echo ##################################################################################### |
3843 | ++ |
3844 | ++let $MYSQLD_DATADIR= `select @@datadir`; |
3845 | ++--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
3846 | ++--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001 |
3847 | ++ |
3848 | ++--echo # |
3849 | ++--echo ##################################################################################### |
3850 | ++--echo # mysqlbinlog --database=test1 |
3851 | ++--echo # The following Annotate should appear in this output: |
3852 | ++--echo # - DELETE test1.t1, test2.t2 FROM <...> |
3853 | ++--echo ##################################################################################### |
3854 | ++ |
3855 | ++let $MYSQLD_DATADIR= `select @@datadir`; |
3856 | ++--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
3857 | ++--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v $MYSQLD_DATADIR/master-bin.000001 |
3858 | ++ |
3859 | ++--echo # |
3860 | ++--echo ##################################################################################### |
3861 | ++--echo # mysqlbinlog --skip-annotate-rows-events |
3862 | ++--echo # No Annotates should appear in this output |
3863 | ++--echo ##################################################################################### |
3864 | ++ |
3865 | ++let $MYSQLD_DATADIR= `select @@datadir`; |
3866 | ++--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
3867 | ++--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v $MYSQLD_DATADIR/master-bin.000001 |
3868 | ++ |
3869 | ++--echo # |
3870 | ++--echo ##################################################################################### |
3871 | ++--echo # mysqlbinlog --read-from-remote-server |
3872 | ++--echo # The following Annotates should appear in this output: |
3873 | ++--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3874 | ++--echo # - INSERT INTO test3.t3 VALUES (1), (2), (3) |
3875 | ++--echo # - DELETE test1.t1, test2.t2 FROM <...> (with two subsequent Table maps) |
3876 | ++--echo # - INSERT INTO test2.t2 VALUES (1), (2), (3) |
3877 | ++--echo # - DELETE xtest1.xt1, test2.t2 FROM <...> (with one subsequent Table map) |
3878 | ++--echo ##################################################################################### |
3879 | ++ |
3880 | ++let $MYSQLD_DATADIR= `select @@datadir`; |
3881 | ++--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
3882 | ++--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 |
3883 | ++ |
3884 | ++--echo # |
3885 | ++--echo ##################################################################################### |
3886 | ++--echo # mysqlbinlog --read-from-remote-server --database=test1 |
3887 | ++--echo # The following Annotate should appear in this output: |
3888 | ++--echo # - DELETE test1.t1, test2.t2 FROM <...> |
3889 | ++--echo ##################################################################################### |
3890 | ++ |
3891 | ++let $MYSQLD_DATADIR= `select @@datadir`; |
3892 | ++--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
3893 | ++--exec $MYSQL_BINLOG --base64-output=decode-rows --database=test1 -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 |
3894 | ++ |
3895 | ++--echo # |
3896 | ++--echo ##################################################################################### |
3897 | ++--echo # mysqlbinlog --read-from-remote-server --skip-annotate-rows-events |
3898 | ++--echo # No Annotates should appear in this output |
3899 | ++--echo ##################################################################################### |
3900 | ++ |
3901 | ++let $MYSQLD_DATADIR= `select @@datadir`; |
3902 | ++--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ |
3903 | ++--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001 |
3904 | ++ |
3905 | ++# Clean-up |
3906 | ++ |
3907 | ++--disable_query_log |
3908 | ++DROP DATABASE test1; |
3909 | ++DROP DATABASE test2; |
3910 | ++DROP DATABASE test3; |
3911 | ++DROP DATABASE xtest1; |
3912 | ++DROP DATABASE xtest2; |
3913 | ++--enable_query_log |
3914 | ++ |
3915 | +--- /dev/null |
3916 | ++++ b/mysql-test/suite/rpl/r/percona_replicate_annotate_rows_events.result |
3917 | +@@ -0,0 +1,16 @@ |
3918 | ++include/master-slave.inc |
3919 | ++[connection master] |
3920 | ++DROP TABLE IF EXISTS t; |
3921 | ++CREATE TABLE t (a INT); |
3922 | ++INSERT INTO t VALUES(1); |
3923 | ++DROP TABLE t; |
3924 | ++select 738; |
3925 | ++738 |
3926 | ++738 |
3927 | ++select 738 = 738; |
3928 | ++738 = 738 |
3929 | ++1 |
3930 | ++select 738 = 738; |
3931 | ++738 = 738 |
3932 | ++1 |
3933 | ++include/rpl_end.inc |
3934 | +--- /dev/null |
3935 | ++++ b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result |
3936 | +@@ -0,0 +1,141 @@ |
3937 | ++include/master-slave.inc |
3938 | ++[connection master] |
3939 | ++######################################################################## |
3940 | ++# TABLES ON MASTER |
3941 | ++######################################################################## |
3942 | ++SELECT * FROM t1 ORDER BY a; |
3943 | ++a b |
3944 | ++0 1 |
3945 | ++SELECT * FROM t2 ORDER BY a; |
3946 | ++a b |
3947 | ++SELECT * FROM t3 ORDER BY a; |
3948 | ++a b |
3949 | ++1 1 |
3950 | ++2 2 |
3951 | ++3 3 |
3952 | ++SELECT * FROM t5 ORDER BY a; |
3953 | ++a b |
3954 | ++1 foo |
3955 | ++2 bar |
3956 | ++3 baz |
3957 | ++4 gås |
3958 | ++5 gås |
3959 | ++######################################################################## |
3960 | ++# TABLES ON SLAVE: should be the same as on master |
3961 | ++######################################################################## |
3962 | ++SELECT * FROM t1 ORDER BY a; |
3963 | ++a b |
3964 | ++0 1 |
3965 | ++SELECT * FROM t2 ORDER BY a; |
3966 | ++a b |
3967 | ++SELECT * FROM t3 ORDER BY a; |
3968 | ++a b |
3969 | ++1 1 |
3970 | ++2 2 |
3971 | ++3 3 |
3972 | ++SELECT * FROM t5 ORDER BY a; |
3973 | ++a b |
3974 | ++1 foo |
3975 | ++2 bar |
3976 | ++3 baz |
3977 | ++4 gås |
3978 | ++5 gås |
3979 | ++######################################################################## |
3980 | ++# EVENTS ON SLAVE |
3981 | ++# The following Annotate_rows events should appear below: |
3982 | ++# - UPDATE t1 SET b = b + 1; |
3983 | ++# - REPLACE t1 VALUES (1,1), (2,2), (3,3); |
3984 | ++# - INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
3985 | ++# - INSERT INTO t3 VALUES (1,1), (2,2), (3,3) |
3986 | ++# - DELETE t1, t2 FROM <...> |
3987 | ++# - INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
3988 | ++# - DELETE xt1, t2 FROM <...> |
3989 | ++# - INSERT INTO t5(b) VALUES <...> (3 instances) |
3990 | ++######################################################################## |
3991 | ++FLUSH LOGS; |
3992 | ++show binlog events in 'slave-bin.000001' from <start_pos>; |
3993 | ++Log_name Pos Event_type Server_id End_log_pos Info |
3994 | ++slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test1 |
3995 | ++slave-bin.000001 # Query 1 # CREATE DATABASE test1 |
3996 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t1(a int primary key, b int) |
3997 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t2(a int, b int) |
3998 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t3(a int, b int) |
3999 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t4(a int, b int) |
4000 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t5 ( |
4001 | ++a INT PRIMARY KEY AUTO_INCREMENT, |
4002 | ++b VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin |
4003 | ++) |
4004 | ++slave-bin.000001 # Query 1 # BEGIN |
4005 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4006 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4007 | ++slave-bin.000001 # Query 1 # COMMIT |
4008 | ++slave-bin.000001 # Query 1 # BEGIN |
4009 | ++slave-bin.000001 # Annotate_rows 1 # UPDATE t1 SET b = b + 1 |
4010 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4011 | ++slave-bin.000001 # Update_rows 1 # table_id: # flags: STMT_END_F |
4012 | ++slave-bin.000001 # Query 1 # COMMIT |
4013 | ++slave-bin.000001 # Query 1 # BEGIN |
4014 | ++slave-bin.000001 # Annotate_rows 1 # REPLACE t1 VALUES (1,1), (2,2), (3,3) |
4015 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4016 | ++slave-bin.000001 # Update_rows 1 # table_id: # |
4017 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4018 | ++slave-bin.000001 # Query 1 # COMMIT |
4019 | ++slave-bin.000001 # Query 1 # BEGIN |
4020 | ++slave-bin.000001 # Annotate_rows 1 # INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
4021 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4022 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4023 | ++slave-bin.000001 # Query 1 # COMMIT |
4024 | ++slave-bin.000001 # Query 1 # BEGIN |
4025 | ++slave-bin.000001 # Annotate_rows 1 # INSERT INTO t3 VALUES (1,1), (2,2), (3,3) |
4026 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t3) |
4027 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4028 | ++slave-bin.000001 # Query 1 # COMMIT |
4029 | ++slave-bin.000001 # Query 1 # BEGIN |
4030 | ++slave-bin.000001 # Annotate_rows 1 # DELETE t1, t2 FROM t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.a=t2.a AND t2.a=t3.a |
4031 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4032 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4033 | ++slave-bin.000001 # Delete_rows 1 # table_id: # |
4034 | ++slave-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F |
4035 | ++slave-bin.000001 # Query 1 # COMMIT |
4036 | ++slave-bin.000001 # Query 1 # BEGIN |
4037 | ++slave-bin.000001 # Annotate_rows 1 # INSERT INTO t2 VALUES (1,1), (2,2), (3,3) |
4038 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4039 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4040 | ++slave-bin.000001 # Query 1 # COMMIT |
4041 | ++slave-bin.000001 # Query 1 # BEGIN |
4042 | ++slave-bin.000001 # Annotate_rows 1 # DELETE xt1, t2 FROM xt1 INNER JOIN t2 INNER JOIN t3 WHERE xt1.a=t2.a AND t2.a=t3.a |
4043 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4044 | ++slave-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F |
4045 | ++slave-bin.000001 # Query 1 # COMMIT |
4046 | ++slave-bin.000001 # Query 1 # BEGIN |
4047 | ++slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5(b) VALUES ('foo'), ('bar'), ('baz') |
4048 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) |
4049 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4050 | ++slave-bin.000001 # Query 1 # COMMIT |
4051 | ++slave-bin.000001 # Query 1 # BEGIN |
4052 | ++slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5(b) VALUES ('gås') |
4053 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) |
4054 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4055 | ++slave-bin.000001 # Query 1 # COMMIT |
4056 | ++slave-bin.000001 # Query 1 # BEGIN |
4057 | ++slave-bin.000001 # Annotate_rows 1 # INSERT INTO t5(b) VALUES ('gås') |
4058 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) |
4059 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4060 | ++slave-bin.000001 # Query 1 # COMMIT |
4061 | ++slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 |
4062 | ++# |
4063 | ++######################################################################## |
4064 | ++# INSERTs DELAYED ON MASTERs |
4065 | ++######################################################################## |
4066 | ++SET SESSION binlog_annotate_rows_events = ON; |
4067 | ++INSERT DELAYED INTO test1.t4 VALUES (1,1); |
4068 | ++FLUSH TABLES; |
4069 | ++SELECT * FROM test1.t4 ORDER BY a; |
4070 | ++a b |
4071 | ++1 1 |
4072 | ++######################################################################## |
4073 | ++# ON SLAVE |
4074 | ++# No Annotate_rows events should appear below |
4075 | ++######################################################################## |
4076 | ++FLUSH LOGS; |
4077 | ++include/rpl_end.inc |
4078 | +--- /dev/null |
4079 | ++++ b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result |
4080 | +@@ -0,0 +1,123 @@ |
4081 | ++include/master-slave.inc |
4082 | ++[connection master] |
4083 | ++######################################################################## |
4084 | ++# TABLES ON MASTER |
4085 | ++######################################################################## |
4086 | ++SELECT * FROM t1 ORDER BY a; |
4087 | ++a b |
4088 | ++0 1 |
4089 | ++SELECT * FROM t2 ORDER BY a; |
4090 | ++a b |
4091 | ++SELECT * FROM t3 ORDER BY a; |
4092 | ++a b |
4093 | ++1 1 |
4094 | ++2 2 |
4095 | ++3 3 |
4096 | ++SELECT * FROM t5 ORDER BY a; |
4097 | ++a b |
4098 | ++1 foo |
4099 | ++2 bar |
4100 | ++3 baz |
4101 | ++4 gås |
4102 | ++5 gås |
4103 | ++######################################################################## |
4104 | ++# TABLES ON SLAVE: should be the same as on master |
4105 | ++######################################################################## |
4106 | ++SELECT * FROM t1 ORDER BY a; |
4107 | ++a b |
4108 | ++0 1 |
4109 | ++SELECT * FROM t2 ORDER BY a; |
4110 | ++a b |
4111 | ++SELECT * FROM t3 ORDER BY a; |
4112 | ++a b |
4113 | ++1 1 |
4114 | ++2 2 |
4115 | ++3 3 |
4116 | ++SELECT * FROM t5 ORDER BY a; |
4117 | ++a b |
4118 | ++1 foo |
4119 | ++2 bar |
4120 | ++3 baz |
4121 | ++4 gås |
4122 | ++5 gås |
4123 | ++######################################################################## |
4124 | ++# EVENTS ON SLAVE |
4125 | ++# No Annotate_rows events should appear below |
4126 | ++######################################################################## |
4127 | ++FLUSH LOGS; |
4128 | ++show binlog events in 'slave-bin.000001' from <start_pos>; |
4129 | ++Log_name Pos Event_type Server_id End_log_pos Info |
4130 | ++slave-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test1 |
4131 | ++slave-bin.000001 # Query 1 # CREATE DATABASE test1 |
4132 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t1(a int primary key, b int) |
4133 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t2(a int, b int) |
4134 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t3(a int, b int) |
4135 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t4(a int, b int) |
4136 | ++slave-bin.000001 # Query 1 # use `test1`; CREATE TABLE t5 ( |
4137 | ++a INT PRIMARY KEY AUTO_INCREMENT, |
4138 | ++b VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin |
4139 | ++) |
4140 | ++slave-bin.000001 # Query 1 # BEGIN |
4141 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4142 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4143 | ++slave-bin.000001 # Query 1 # COMMIT |
4144 | ++slave-bin.000001 # Query 1 # BEGIN |
4145 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4146 | ++slave-bin.000001 # Update_rows 1 # table_id: # flags: STMT_END_F |
4147 | ++slave-bin.000001 # Query 1 # COMMIT |
4148 | ++slave-bin.000001 # Query 1 # BEGIN |
4149 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4150 | ++slave-bin.000001 # Update_rows 1 # table_id: # |
4151 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4152 | ++slave-bin.000001 # Query 1 # COMMIT |
4153 | ++slave-bin.000001 # Query 1 # BEGIN |
4154 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4155 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4156 | ++slave-bin.000001 # Query 1 # COMMIT |
4157 | ++slave-bin.000001 # Query 1 # BEGIN |
4158 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t3) |
4159 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4160 | ++slave-bin.000001 # Query 1 # COMMIT |
4161 | ++slave-bin.000001 # Query 1 # BEGIN |
4162 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4163 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t1) |
4164 | ++slave-bin.000001 # Delete_rows 1 # table_id: # |
4165 | ++slave-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F |
4166 | ++slave-bin.000001 # Query 1 # COMMIT |
4167 | ++slave-bin.000001 # Query 1 # BEGIN |
4168 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4169 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4170 | ++slave-bin.000001 # Query 1 # COMMIT |
4171 | ++slave-bin.000001 # Query 1 # BEGIN |
4172 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t2) |
4173 | ++slave-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F |
4174 | ++slave-bin.000001 # Query 1 # COMMIT |
4175 | ++slave-bin.000001 # Query 1 # BEGIN |
4176 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) |
4177 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4178 | ++slave-bin.000001 # Query 1 # COMMIT |
4179 | ++slave-bin.000001 # Query 1 # BEGIN |
4180 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) |
4181 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4182 | ++slave-bin.000001 # Query 1 # COMMIT |
4183 | ++slave-bin.000001 # Query 1 # BEGIN |
4184 | ++slave-bin.000001 # Table_map 1 # table_id: # (test1.t5) |
4185 | ++slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F |
4186 | ++slave-bin.000001 # Query 1 # COMMIT |
4187 | ++slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 |
4188 | ++# |
4189 | ++######################################################################## |
4190 | ++# INSERTs DELAYED ON MASTERs |
4191 | ++######################################################################## |
4192 | ++SET SESSION binlog_annotate_rows_events = ON; |
4193 | ++INSERT DELAYED INTO test1.t4 VALUES (1,1); |
4194 | ++FLUSH TABLES; |
4195 | ++SELECT * FROM test1.t4 ORDER BY a; |
4196 | ++a b |
4197 | ++1 1 |
4198 | ++######################################################################## |
4199 | ++# ON SLAVE |
4200 | ++# No Annotate_rows events should appear below |
4201 | ++######################################################################## |
4202 | ++FLUSH LOGS; |
4203 | ++include/rpl_end.inc |
4204 | +--- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result |
4205 | ++++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result |
4206 | +@@ -21,7 +21,7 @@ |
4207 | + [on slave] |
4208 | + ---- Wait until slave stops with an error ---- |
4209 | + include/wait_for_slave_sql_error.inc [errno=1062] |
4210 | +-Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error) |
4211 | ++Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 480 (expected "duplicate key" error) |
4212 | + call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); |
4213 | + SELECT * FROM t1; |
4214 | + a |
4215 | +--- /dev/null |
4216 | ++++ b/mysql-test/suite/rpl/t/percona_replicate_annotate_rows_events-master.opt |
4217 | +@@ -0,0 +1 @@ |
4218 | ++--binlog_annotate_rows_events --replicate_annotate_rows_events |
4219 | +--- /dev/null |
4220 | ++++ b/mysql-test/suite/rpl/t/percona_replicate_annotate_rows_events-slave.opt |
4221 | +@@ -0,0 +1 @@ |
4222 | ++--slave_net_timeout=1 --log_slave_updates=0 --binlog_annotate_rows_events --replicate_annotate_rows_events |
4223 | +--- /dev/null |
4224 | ++++ b/mysql-test/suite/rpl/t/percona_replicate_annotate_rows_events.test |
4225 | +@@ -0,0 +1,35 @@ |
4226 | ++######################################################################## |
4227 | ++# Bug #872754: Annotate rows events on slave doesnt' work without slave's binlog |
4228 | ++######################################################################## |
4229 | ++ |
4230 | ++--source include/master-slave.inc |
4231 | ++--source include/have_binlog_format_row.inc |
4232 | ++--source include/have_debug.inc |
4233 | ++ |
4234 | ++connection master; |
4235 | ++--disable_warnings |
4236 | ++DROP TABLE IF EXISTS t; |
4237 | ++--enable_warnings |
4238 | ++ |
4239 | ++CREATE TABLE t (a INT); |
4240 | ++INSERT INTO t VALUES(1); |
4241 | ++ |
4242 | ++--sleep 2 |
4243 | ++ |
4244 | ++DROP TABLE t; |
4245 | ++ |
4246 | ++# The following would hang with the bug not fixed |
4247 | ++--sync_slave_with_master |
4248 | ++ |
4249 | ++connection master; |
4250 | ++--let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1) |
4251 | ++--eval select $master_log_pos |
4252 | ++ |
4253 | ++connection slave; |
4254 | ++--let $read_master_log_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1) |
4255 | ++--eval select $master_log_pos = $read_master_log_pos |
4256 | ++ |
4257 | ++--let $exec_master_log_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) |
4258 | ++--eval select $master_log_pos = $exec_master_log_pos |
4259 | ++ |
4260 | ++--source include/rpl_end.inc |
4261 | +--- /dev/null |
4262 | ++++ b/mysql-test/suite/rpl/t/rpl_row_annotate_do-slave.opt |
4263 | +@@ -0,0 +1 @@ |
4264 | ++--log-slave-updates --replicate-annotate-rows-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2 |
4265 | +\ No newline at end of file |
4266 | +--- /dev/null |
4267 | ++++ b/mysql-test/suite/rpl/t/rpl_row_annotate_do.test |
4268 | +@@ -0,0 +1,16 @@ |
4269 | ++############################################################################### |
4270 | ++# WL47: Store in binlog text of statements that caused RBR events |
4271 | ++# Wrapper for extra/rpl/rpl_row_annotate.test. |
4272 | ++# Intended to test that if the --replicate-annotate-rows-events option |
4273 | ++# is switched on on slave then Annotate_events: |
4274 | ++# - are reproduced on slave |
4275 | ++# - are reproduced only once for "multi-table-maps" rbr queries |
4276 | ++# - are not reproduced when the corresponding queries are filtered away |
4277 | ++# on replication |
4278 | ++# - are reproduced when the corresponding queries are filtered away partialy |
4279 | ++# (e.g. in case of multi-delete) |
4280 | ++# - are not generated on slave for queries that are not annotated on master. |
4281 | ++############################################################################### |
4282 | ++ |
4283 | ++--source include/have_binlog_format_row.inc |
4284 | ++--source extra/rpl_tests/rpl_row_annotate.test |
4285 | +--- /dev/null |
4286 | ++++ b/mysql-test/suite/rpl/t/rpl_row_annotate_dont-slave.opt |
4287 | +@@ -0,0 +1 @@ |
4288 | ++--log-slave-updates --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2 |
4289 | +\ No newline at end of file |
4290 | +--- /dev/null |
4291 | ++++ b/mysql-test/suite/rpl/t/rpl_row_annotate_dont.test |
4292 | +@@ -0,0 +1,9 @@ |
4293 | ++############################################################################### |
4294 | ++# WL47: Store in binlog text of statements that caused RBR events |
4295 | ++# Wrapper for extra/rpl/rpl_row_annotate.test. |
4296 | ++# Intended to test that if the --replicate-annotate-rows-events option |
4297 | ++# is switched off on slave then Annotate_events are not reproduced. |
4298 | ++############################################################################### |
4299 | ++ |
4300 | ++--source include/have_binlog_format_row.inc |
4301 | ++--source extra/rpl_tests/rpl_row_annotate.test |
4302 | +--- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test |
4303 | ++++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test |
4304 | +@@ -1,7 +1,8 @@ |
4305 | + # depends on the binlog output |
4306 | + -- source include/have_binlog_format_row.inc |
4307 | ++--source include/binlog_start_pos.inc |
4308 | + |
4309 | +-let $rename_event_pos= 897; |
4310 | ++let $rename_event_pos= `select @binlog_start_pos + 791`; |
4311 | + |
4312 | + # Bug#18326: Do not lock table for writing during prepare of statement |
4313 | + # The use of the ps protocol causes extra table maps in the binlog, so |
4314 | +--- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test |
4315 | ++++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test |
4316 | +@@ -162,15 +162,18 @@ |
4317 | + |
4318 | + remove_file $MYSQLTEST_VARDIR/tmp/master.sql; |
4319 | + |
4320 | ++--source include/binlog_start_pos.inc |
4321 | + |
4322 | + # this test for position option |
4323 | +-# By setting this position to 416, we should only get the create of t3 |
4324 | ++# By setting this position to start_binlog_pos + 310, we should only get the create of t3 |
4325 | ++let $start_pos= `select @binlog_start_pos + 310`; |
4326 | ++let $stop_pos= `select @binlog_start_pos + 463`; |
4327 | + --disable_query_log |
4328 | + select "--- Test 2 position test --" as ""; |
4329 | + --enable_query_log |
4330 | + let $MYSQLD_DATADIR= `select @@datadir;`; |
4331 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4332 | +---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 --stop-position=569 $MYSQLD_DATADIR/master-bin.000001 |
4333 | ++--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=$start_pos --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 |
4334 | + |
4335 | + # These are tests for remote binlog. |
4336 | + # They should return the same as previous test. |
4337 | +@@ -181,7 +184,7 @@ |
4338 | + |
4339 | + # This is broken now |
4340 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4341 | +---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=569 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4342 | ++--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4343 | + |
4344 | + # This part is disabled due to bug #17654 |
4345 | + |
4346 | +@@ -257,7 +260,7 @@ |
4347 | + select "--- Test 5 LOAD DATA --" as ""; |
4348 | + --enable_query_log |
4349 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4350 | +---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=106 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
4351 | ++--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=$binlog_start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
4352 | + |
4353 | + # Bug#7853 (mysqlbinlog does not accept input from stdin) |
4354 | + |
4355 | +@@ -265,14 +268,17 @@ |
4356 | + select "--- Test 6 reading stdin --" as ""; |
4357 | + --enable_query_log |
4358 | + let $MYSQLD_DATADIR= `select @@datadir;`; |
4359 | ++let $stop_pos= `select @binlog_start_pos + 463`; |
4360 | + --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
4361 | +---exec $MYSQL_BINLOG --short-form --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001 |
4362 | ++--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos - < $MYSQLD_DATADIR/master-bin.000001 |
4363 | + |
4364 | + --disable_query_log |
4365 | + select "--- Test 7 reading stdin w/position --" as ""; |
4366 | + --enable_query_log |
4367 | ++let $start_pos= `select @binlog_start_pos + 310`; |
4368 | ++let $stop_pos= `select @binlog_start_pos + 463`; |
4369 | + --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
4370 | +---exec $MYSQL_BINLOG --short-form --position=416 --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001 |
4371 | ++--exec $MYSQL_BINLOG --short-form --position=$start_pos --stop-position=$stop_pos - < $MYSQLD_DATADIR/master-bin.000001 |
4372 | + |
4373 | + # Bug#16217 (mysql client did not know how not switch its internal charset) |
4374 | + --disable_query_log |
4375 | +--- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test |
4376 | ++++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test |
4377 | +@@ -1,5 +1,6 @@ |
4378 | + # depends on the binlog output |
4379 | + --source include/have_binlog_format_mixed_or_statement.inc |
4380 | ++--source include/binlog_start_pos.inc |
4381 | + |
4382 | +-let $rename_event_pos= 656; |
4383 | ++let $rename_event_pos= `select @binlog_start_pos + 550`; |
4384 | + -- source extra/rpl_tests/rpl_flsh_tbls.test |
4385 | +--- a/mysql-test/t/ctype_cp932_binlog_stm.test |
4386 | ++++ b/mysql-test/t/ctype_cp932_binlog_stm.test |
4387 | +@@ -28,16 +28,6 @@ |
4388 | + |
4389 | + --echo End of 5.0 tests |
4390 | + |
4391 | +-# |
4392 | +-# #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump |
4393 | +-# Note: 364 is a magic position (found experimentally, depends on |
4394 | +-# the log's contents) that caused the server crash. |
4395 | +- |
4396 | +-call mtr.add_suppression("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"); |
4397 | +- |
4398 | +---error 1220 |
4399 | +-SHOW BINLOG EVENTS FROM 365; |
4400 | +- |
4401 | + --echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. |
4402 | + CREATE TABLE t1 (a varchar(16)) character set cp932; |
4403 | + INSERT INTO t1 VALUES (0x8372835E),(0x8352835E); |
4404 | +--- a/mysql-test/t/mysqlbinlog-master.opt |
4405 | ++++ b/mysql-test/t/mysqlbinlog-master.opt |
4406 | +@@ -1,2 +1 @@ |
4407 | +---max-binlog-size=4096 |
4408 | + --force-restart |
4409 | +--- a/mysql-test/t/mysqlbinlog.test |
4410 | ++++ b/mysql-test/t/mysqlbinlog.test |
4411 | +@@ -3,10 +3,18 @@ |
4412 | + -- source include/have_binlog_format_statement.inc |
4413 | + |
4414 | + -- source include/have_log_bin.inc |
4415 | ++-- source include/binlog_start_pos.inc |
4416 | + |
4417 | + # Deletes all the binary logs |
4418 | + reset master; |
4419 | + |
4420 | ++# We need small binlog size to break the last LOAD DATA INFILE below so that |
4421 | ++# the corresponding Begin_load_query will be written to master-bin.000001 |
4422 | ++# while the Execute_load_query will be written to master-bin.000002. |
4423 | ++ |
4424 | ++SET @save_binlog_size= @@global.max_binlog_size; |
4425 | ++SET @@global.max_binlog_size= 4096; |
4426 | ++ |
4427 | + # we need this for getting fixed timestamps inside of this test |
4428 | + set timestamp=1000000000; |
4429 | + |
4430 | +@@ -26,13 +34,15 @@ |
4431 | + |
4432 | + # test for load data and load data distributed among the several |
4433 | + # files (we need to fill up first binlog) |
4434 | +-load data infile '../../std_data/words.dat' into table t1; |
4435 | +-load data infile '../../std_data/words.dat' into table t1; |
4436 | +-load data infile '../../std_data/words.dat' into table t1; |
4437 | +-load data infile '../../std_data/words.dat' into table t1; |
4438 | +-load data infile '../../std_data/words.dat' into table t1; |
4439 | ++load data infile '../../std_data/words3.dat' into table t1; |
4440 | ++load data infile '../../std_data/words3.dat' into table t1; |
4441 | ++load data infile '../../std_data/words3.dat' into table t1; |
4442 | ++load data infile '../../std_data/words3.dat' into table t1; |
4443 | ++load data infile '../../std_data/words3.dat' into table t1; |
4444 | + # simple query to show more in second binlog |
4445 | + insert into t1 values ("Alas"); |
4446 | ++ |
4447 | ++### Starting master-bin.000003 |
4448 | + flush logs; |
4449 | + |
4450 | + # delimiters are for easier debugging in future |
4451 | +@@ -46,7 +56,7 @@ |
4452 | + # |
4453 | + let $MYSQLD_DATADIR= `select @@datadir`; |
4454 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4455 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4456 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4457 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000001 |
4458 | + |
4459 | + # this should not fail but shouldn't produce any working statements |
4460 | +@@ -54,7 +64,7 @@ |
4461 | + select "--- Broken LOAD DATA --" as ""; |
4462 | + --enable_query_log |
4463 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4464 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4465 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4466 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000002 2> /dev/null |
4467 | + |
4468 | + # this should show almost nothing |
4469 | +@@ -62,17 +72,17 @@ |
4470 | + select "--- --database --" as ""; |
4471 | + --enable_query_log |
4472 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4473 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4474 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4475 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLD_DATADIR/master-bin.000001 2> /dev/null |
4476 | + |
4477 | + # this test for position option |
4478 | + --disable_query_log |
4479 | + select "--- --position --" as ""; |
4480 | + --enable_query_log |
4481 | ++let $start_pos= `select @binlog_start_pos + 227`; |
4482 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4483 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4484 | +---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=332 $MYSQLD_DATADIR/master-bin.000002 |
4485 | +- |
4486 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4487 | ++--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=$start_pos $MYSQLD_DATADIR/master-bin.000002 |
4488 | + |
4489 | + # These are tests for remote binlog. |
4490 | + # They should return the same as previous test. |
4491 | +@@ -83,7 +93,7 @@ |
4492 | + |
4493 | + # This is broken now |
4494 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4495 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4496 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4497 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4498 | + |
4499 | + # This is broken too |
4500 | +@@ -91,7 +101,7 @@ |
4501 | + select "--- Broken LOAD DATA --" as ""; |
4502 | + --enable_query_log |
4503 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4504 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4505 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4506 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 2> /dev/null |
4507 | + |
4508 | + # And this too ! (altough it is documented) |
4509 | +@@ -99,34 +109,39 @@ |
4510 | + select "--- --database --" as ""; |
4511 | + --enable_query_log |
4512 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4513 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4514 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4515 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.000001 2> /dev/null |
4516 | + |
4517 | + # Strangely but this works |
4518 | + --disable_query_log |
4519 | + select "--- --position --" as ""; |
4520 | + --enable_query_log |
4521 | ++let $start_pos= `select @binlog_start_pos + 227`; |
4522 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4523 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4524 | +---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=332 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
4525 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4526 | ++--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=$start_pos --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 |
4527 | + |
4528 | + # Bug#7853 mysqlbinlog does not accept input from stdin |
4529 | + --disable_query_log |
4530 | + select "--- reading stdin --" as ""; |
4531 | + --enable_query_log |
4532 | + --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
4533 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4534 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4535 | + --exec $MYSQL_BINLOG --short-form - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 |
4536 | + |
4537 | + --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR |
4538 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4539 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4540 | + --exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 |
4541 | + drop table t1,t2; |
4542 | + |
4543 | ++SET @@global.max_binlog_size= @save_binlog_size; |
4544 | ++ |
4545 | + # |
4546 | + # Bug#14157 utf8 encoding in binlog without set character_set_client |
4547 | + # |
4548 | ++### Starting master-bin.000004 |
4549 | + flush logs; |
4550 | ++ |
4551 | + --write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql |
4552 | + create table if not exists t5 (a int); |
4553 | + set names latin1; |
4554 | +@@ -140,6 +155,8 @@ |
4555 | + # resulted binlog, parly consisting of multi-byte utf8 chars, |
4556 | + # must be digestable for both client and server. In 4.1 the client |
4557 | + # should use default-character-set same as the server. |
4558 | ++ |
4559 | ++### Starting master-bin.000005 |
4560 | + flush logs; |
4561 | + --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000004 | $MYSQL |
4562 | + select * from t5 /* must be (1),(1) */; |
4563 | +@@ -150,6 +167,8 @@ |
4564 | + # Check that a dump created by mysqlbinlog reproduces |
4565 | + # lc_time_names dependent values correctly |
4566 | + # |
4567 | ++ |
4568 | ++### Starting master-bin.000006 |
4569 | + flush logs; |
4570 | + create table t5 (c1 int, c2 varchar(128) character set latin1 not null); |
4571 | + insert into t5 values (1, date_format('2001-01-01','%W')); |
4572 | +@@ -158,7 +177,10 @@ |
4573 | + set lc_time_names=en_US; |
4574 | + insert into t5 values (3, date_format('2001-01-01','%W')); |
4575 | + select * from t5 order by c1; |
4576 | ++ |
4577 | ++### Starting master-bin.000007 |
4578 | + flush logs; |
4579 | ++ |
4580 | + drop table t5; |
4581 | + --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000006 | $MYSQL |
4582 | + select * from t5 order by c1; |
4583 | +@@ -170,7 +192,10 @@ |
4584 | + --disable_warnings |
4585 | + drop procedure if exists p1; |
4586 | + --enable_warnings |
4587 | ++ |
4588 | ++### Starting master-bin.000008 |
4589 | + flush logs; |
4590 | ++ |
4591 | + delimiter //; |
4592 | + create procedure p1() |
4593 | + begin |
4594 | +@@ -178,12 +203,15 @@ |
4595 | + end; |
4596 | + // |
4597 | + delimiter ;// |
4598 | ++ |
4599 | ++### Starting master-bin.000009 |
4600 | + flush logs; |
4601 | ++ |
4602 | + call p1(); |
4603 | + drop procedure p1; |
4604 | + --error ER_SP_DOES_NOT_EXIST |
4605 | + call p1(); |
4606 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4607 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4608 | + --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 |
4609 | + --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000008 | $MYSQL |
4610 | + call p1(); |
4611 | +@@ -202,7 +230,9 @@ |
4612 | + # (LOAD DATA INFILE need it) |
4613 | + # |
4614 | + |
4615 | ++### Starting master-bin.000010 |
4616 | + flush logs; |
4617 | ++ |
4618 | + create table t1 (a varchar(64) character set utf8); |
4619 | + load data infile '../../std_data/loaddata6.dat' into table t1; |
4620 | + set character_set_database=koi8r; |
4621 | +@@ -217,9 +247,12 @@ |
4622 | + load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r; |
4623 | + select hex(a) from t1; |
4624 | + drop table t1; |
4625 | ++ |
4626 | ++### Starting master-bin.000011 |
4627 | + flush logs; |
4628 | ++ |
4629 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4630 | +---replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ |
4631 | ++--replace_regex /SQL_LOAD_MB-[0-9a-f]+-[0-9a-f]+/SQL_LOAD_MB-#-#/ |
4632 | + --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLD_DATADIR/master-bin.000010 |
4633 | + |
4634 | + # |
4635 | +@@ -229,9 +262,14 @@ |
4636 | + |
4637 | + CREATE TABLE t1 (c1 CHAR(10)); |
4638 | + # we need this for getting fixed timestamps inside of this test |
4639 | ++### Starting master-bin.000012 |
4640 | + FLUSH LOGS; |
4641 | ++ |
4642 | + INSERT INTO t1 VALUES ('0123456789'); |
4643 | ++ |
4644 | ++### Starting master-bin.000013 |
4645 | + FLUSH LOGS; |
4646 | ++ |
4647 | + DROP TABLE t1; |
4648 | + |
4649 | + # We create a table, patch, and load the output into it |
4650 | +@@ -257,11 +295,16 @@ |
4651 | + # |
4652 | + # Bug#29928 incorrect connection_id() restoring from mysqlbinlog out |
4653 | + # |
4654 | ++### Starting master-bin.000014 |
4655 | + FLUSH LOGS; |
4656 | ++ |
4657 | + CREATE TABLE t1(a INT); |
4658 | + INSERT INTO t1 VALUES(connection_id()); |
4659 | + let $a= `SELECT a FROM t1`; |
4660 | ++ |
4661 | ++### Starting master-bin.000015 |
4662 | + FLUSH LOGS; |
4663 | ++ |
4664 | + let $outfile= $MYSQLTEST_VARDIR/tmp/bug29928.sql; |
4665 | + --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000014 > $outfile |
4666 | + DROP TABLE t1; |
4667 | +@@ -281,11 +324,12 @@ |
4668 | + exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTEST_VARDIR/tmp/bug31793.sql; |
4669 | + --remove_file $MYSQLTEST_VARDIR/tmp/bug31793.sql |
4670 | + |
4671 | +- |
4672 | + # |
4673 | + # Test --disable-force-if-open and --force-if-open |
4674 | + # |
4675 | ++### Starting master-bin.000016 |
4676 | + FLUSH LOGS; |
4677 | ++ |
4678 | + --error 1 |
4679 | + --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null |
4680 | + --exec $MYSQL_BINLOG --force-if-open $MYSQLD_DATADIR/master-bin.000016 >/dev/null 2>/dev/null |
4681 | +@@ -300,9 +344,15 @@ |
4682 | + SHOW GRANTS FOR untrusted@localhost; |
4683 | + USE mysqltest1; |
4684 | + CREATE TABLE t1 (a INT, b CHAR(64)); |
4685 | ++ |
4686 | ++### Starting master-bin.000017 |
4687 | + flush logs; |
4688 | ++ |
4689 | + INSERT INTO t1 VALUES (1,USER()); |
4690 | ++ |
4691 | ++### Starting master-bin.000018 |
4692 | + flush logs; |
4693 | ++ |
4694 | + echo mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql; |
4695 | + exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000017 > $MYSQLTEST_VARDIR/tmp/bug31611.sql; |
4696 | + connect (unsecure,localhost,untrusted,,mysqltest1); |
4697 | +@@ -326,14 +376,20 @@ |
4698 | + connection default; |
4699 | + USE test; |
4700 | + SET BINLOG_FORMAT = STATEMENT; |
4701 | ++ |
4702 | ++### Starting master-bin.000019 |
4703 | + FLUSH LOGS; |
4704 | ++ |
4705 | + CREATE TABLE t1 (a_real FLOAT, an_int INT, a_decimal DECIMAL(5,2), a_string CHAR(32)); |
4706 | + SET @a_real = rand(20) * 1000; |
4707 | + SET @an_int = 1000; |
4708 | + SET @a_decimal = CAST(rand(19) * 999 AS DECIMAL(5,2)); |
4709 | + SET @a_string = 'Just a test'; |
4710 | + INSERT INTO t1 VALUES (@a_real, @an_int, @a_decimal, @a_string); |
4711 | ++ |
4712 | ++### Starting master-bin.000020 |
4713 | + FLUSH LOGS; |
4714 | ++ |
4715 | + query_vertical SELECT * FROM t1; |
4716 | + DROP TABLE t1; |
4717 | + |
4718 | +@@ -357,6 +413,7 @@ |
4719 | + |
4720 | + RESET MASTER; |
4721 | + FLUSH LOGS; |
4722 | ++ |
4723 | + --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $binlog_file |
4724 | + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
4725 | + eval SELECT |
4726 | +--- a/mysql-test/t/mysqlbinlog2.test |
4727 | ++++ b/mysql-test/t/mysqlbinlog2.test |
4728 | +@@ -3,7 +3,7 @@ |
4729 | + |
4730 | + # TODO: Need to look at making row based version once new binlog client is complete. |
4731 | + -- source include/have_binlog_format_mixed_or_statement.inc |
4732 | +- |
4733 | ++-- source include/binlog_start_pos.inc |
4734 | + |
4735 | + --disable_warnings |
4736 | + drop table if exists t1; |
4737 | +@@ -50,15 +50,19 @@ |
4738 | + --disable_query_log |
4739 | + select "--- start-position --" as ""; |
4740 | + --enable_query_log |
4741 | +---exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 |
4742 | ++let $start_pos= `select @binlog_start_pos + 502`; |
4743 | ++--exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 |
4744 | + --disable_query_log |
4745 | + select "--- stop-position --" as ""; |
4746 | + --enable_query_log |
4747 | +---exec $MYSQL_BINLOG --short-form --stop-position=608 $MYSQLD_DATADIR/master-bin.000001 |
4748 | ++let $stop_pos= `select @binlog_start_pos + 502`; |
4749 | ++--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 |
4750 | + --disable_query_log |
4751 | + select "--- start and stop positions ---" as ""; |
4752 | + --enable_query_log |
4753 | +---exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 $MYSQLD_DATADIR/master-bin.000001 |
4754 | ++let $start_pos= `select @binlog_start_pos + 502`; |
4755 | ++let $stop_pos= `select @binlog_start_pos + 619`; |
4756 | ++--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position $stop_pos $MYSQLD_DATADIR/master-bin.000001 |
4757 | + --disable_query_log |
4758 | + select "--- start-datetime --" as ""; |
4759 | + --enable_query_log |
4760 | +@@ -84,11 +88,13 @@ |
4761 | + --disable_query_log |
4762 | + select "--- start-position --" as ""; |
4763 | + --enable_query_log |
4764 | +---exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
4765 | ++let $start_pos= `select @binlog_start_pos + 502`; |
4766 | ++--exec $MYSQL_BINLOG --short-form --start-position=$start_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
4767 | + --disable_query_log |
4768 | + select "--- stop-position --" as ""; |
4769 | + --enable_query_log |
4770 | +---exec $MYSQL_BINLOG --short-form --stop-position=134 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
4771 | ++let $stop_pos= `select @binlog_start_pos + 28`; |
4772 | ++--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 |
4773 | + --disable_query_log |
4774 | + select "--- start-datetime --" as ""; |
4775 | + --enable_query_log |
4776 | +@@ -111,15 +117,19 @@ |
4777 | + --disable_query_log |
4778 | + select "--- start-position --" as ""; |
4779 | + --enable_query_log |
4780 | +---exec $MYSQL_BINLOG --short-form --start-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4781 | ++let $start_pos= `select @binlog_start_pos + 502`; |
4782 | ++--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4783 | + --disable_query_log |
4784 | + select "--- stop-position --" as ""; |
4785 | + --enable_query_log |
4786 | +---exec $MYSQL_BINLOG --short-form --stop-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4787 | ++let $stop_pos= `select @binlog_start_pos + 502`; |
4788 | ++--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4789 | + --disable_query_log |
4790 | + select "--- start and stop positions ---" as ""; |
4791 | + --enable_query_log |
4792 | +---exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4793 | ++let $start_pos= `select @binlog_start_pos + 502`; |
4794 | ++let $stop_pos= `select @binlog_start_pos + 619`; |
4795 | ++--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --stop-position $stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 |
4796 | + --disable_query_log |
4797 | + select "--- start-datetime --" as ""; |
4798 | + --enable_query_log |
4799 | +@@ -142,11 +152,13 @@ |
4800 | + --disable_query_log |
4801 | + select "--- start-position --" as ""; |
4802 | + --enable_query_log |
4803 | +---exec $MYSQL_BINLOG --short-form --start-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
4804 | ++let $start_pos= `select @binlog_start_pos + 502`; |
4805 | ++--exec $MYSQL_BINLOG --short-form --start-position=$start_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
4806 | + --disable_query_log |
4807 | + select "--- stop-position --" as ""; |
4808 | + --enable_query_log |
4809 | +---exec $MYSQL_BINLOG --short-form --stop-position=134 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
4810 | ++let $stop_pos= `select @binlog_start_pos + 28`; |
4811 | ++--exec $MYSQL_BINLOG --short-form --stop-position=$stop_pos --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 |
4812 | + --disable_query_log |
4813 | + select "--- start-datetime --" as ""; |
4814 | + --enable_query_log |
4815 | --- a/sql/handler.cc |
4816 | +++ b/sql/handler.cc |
4817 | @@ -4625,7 +4625,8 @@ |
4818 | @@ -237,19 +3040,20 @@ |
4819 | for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i ) |
4820 | { |
4821 | MYSQL_LOCK const *const lock= locks[i]; |
4822 | -@@ -4679,7 +4683,8 @@ |
4823 | +@@ -4679,7 +4683,9 @@ |
4824 | check_table_binlog_row_based(thd, table)) |
4825 | { |
4826 | int const has_trans= table->file->has_transactions(); |
4827 | - int const error= thd->binlog_write_table_map(table, has_trans); |
4828 | -+ int const error= thd->binlog_write_table_map(table, has_trans, |
4829 | ++ int const error= thd->binlog_write_table_map(table, |
4830 | ++ has_trans, |
4831 | + &with_annotate); |
4832 | /* |
4833 | If an error occurs, it is the responsibility of the caller to |
4834 | roll back the transaction. |
4835 | --- a/sql/log.cc |
4836 | +++ b/sql/log.cc |
4837 | -@@ -4296,10 +4296,12 @@ |
4838 | +@@ -4296,10 +4296,13 @@ |
4839 | |
4840 | |
4841 | /* |
4842 | @@ -259,12 +3063,13 @@ |
4843 | */ |
4844 | |
4845 | -int THD::binlog_write_table_map(TABLE *table, bool is_trans) |
4846 | -+int THD::binlog_write_table_map(TABLE *table, bool is_trans, |
4847 | -+ my_bool *with_annotate) |
4848 | ++int THD::binlog_write_table_map(TABLE* table, |
4849 | ++ bool is_trans, |
4850 | ++ my_bool* with_annotate) |
4851 | { |
4852 | int error; |
4853 | DBUG_ENTER("THD::binlog_write_table_map"); |
4854 | -@@ -4317,7 +4319,7 @@ |
4855 | +@@ -4317,7 +4320,7 @@ |
4856 | if (is_trans && binlog_table_maps == 0) |
4857 | binlog_start_trans_and_stmt(); |
4858 | |
4859 | @@ -273,7 +3078,7 @@ |
4860 | DBUG_RETURN(error); |
4861 | |
4862 | binlog_table_maps++; |
4863 | -@@ -4447,10 +4449,12 @@ |
4864 | +@@ -4447,10 +4450,12 @@ |
4865 | } |
4866 | |
4867 | /** |
4868 | @@ -288,7 +3093,7 @@ |
4869 | { |
4870 | THD *thd= event_info->thd; |
4871 | bool error= 1; |
4872 | -@@ -4631,6 +4635,16 @@ |
4873 | +@@ -4631,6 +4636,16 @@ |
4874 | } |
4875 | } |
4876 | |
4877 | @@ -305,6 +3110,18 @@ |
4878 | /* |
4879 | Write the SQL command |
4880 | */ |
4881 | +--- a/sql/log.h |
4882 | ++++ b/sql/log.h |
4883 | +@@ -359,7 +359,8 @@ |
4884 | + int new_file(); |
4885 | + |
4886 | + void reset_gathered_updates(THD *thd); |
4887 | +- bool write(Log_event* event_info); // binary log write |
4888 | ++ bool write(Log_event* event_info, |
4889 | ++ my_bool* with_annotate= 0); // binary log write |
4890 | + bool write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident); |
4891 | + |
4892 | + bool write_incident(THD *thd, bool lock); |
4893 | --- a/sql/log_event.cc |
4894 | +++ b/sql/log_event.cc |
4895 | @@ -656,6 +656,7 @@ |
4896 | @@ -405,7 +3222,7 @@ |
4897 | load_header_len + header_len : |
4898 | (fake_base ? (header_len+load_header_len) : |
4899 | (header_len+load_header_len) + |
4900 | -@@ -7960,6 +7971,141 @@ |
4901 | +@@ -7960,6 +7971,140 @@ |
4902 | #endif |
4903 | |
4904 | /************************************************************************** |
4905 | @@ -462,9 +3279,8 @@ |
4906 | +{ |
4907 | + return 0; |
4908 | +} |
4909 | -+#endif |
4910 | -+ |
4911 | -+#ifndef MYSQL_CLIENT |
4912 | ++ |
4913 | ++ |
4914 | +bool Annotate_rows_log_event::write_data_body(IO_CACHE *file) |
4915 | +{ |
4916 | + return my_b_safe_write(file, (uchar*) m_query_txt, m_query_len); |
4917 | @@ -488,9 +3304,9 @@ |
4918 | + print_header(&pinfo->head_cache, pinfo, TRUE); |
4919 | + my_b_printf(&pinfo->head_cache, "\tAnnotate_rows:\n"); |
4920 | + |
4921 | -+ char *pbeg; // beginning of the next line |
4922 | -+ char *pend; // end of the next line |
4923 | -+ uint cnt= 0; // characters counter |
4924 | ++ char *pbeg; // beginning of the next line |
4925 | ++ char *pend; // end of the next line |
4926 | ++ uint cnt= 0; // characters counter |
4927 | + |
4928 | + for (pbeg= m_query_txt; ; pbeg= pend) |
4929 | + { |
4930 | @@ -507,12 +3323,12 @@ |
4931 | + // find end of the next line |
4932 | + for (pend= pbeg + 1; |
4933 | + ++cnt <= m_query_len && *pend != '\r' && *pend != '\n'; |
4934 | -+ pend++) ; |
4935 | ++ pend++) {}; |
4936 | + |
4937 | + // print next line |
4938 | + my_b_write(&pinfo->head_cache, (const uchar*) "#Q> ", 4); |
4939 | -+ my_b_write(&pinfo->head_cache, (const uchar*) pbeg, pend - pbeg); |
4940 | -+ my_b_write(&pinfo->head_cache, (const uchar*) "\n", 1); |
4941 | ++ my_b_write(&pinfo->head_cache, (const uchar*) pbeg, pend - pbeg); |
4942 | ++ my_b_write(&pinfo->head_cache, (const uchar*) "\n", 1); |
4943 | + } |
4944 | +} |
4945 | +#endif |
4946 | @@ -633,18 +3449,20 @@ |
4947 | @class Table_map_log_event |
4948 | |
4949 | In row-based mode, every row operation event is preceded by a |
4950 | ---- a/sql/log.h |
4951 | -+++ b/sql/log.h |
4952 | -@@ -359,7 +359,8 @@ |
4953 | - int new_file(); |
4954 | - |
4955 | - void reset_gathered_updates(THD *thd); |
4956 | -- bool write(Log_event* event_info); // binary log write |
4957 | -+ bool write(Log_event* event_info, |
4958 | -+ my_bool *with_annotate= 0); // binary log write |
4959 | - bool write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident); |
4960 | - |
4961 | - bool write_incident(THD *thd, bool lock); |
4962 | +--- a/sql/mysql_priv.h |
4963 | ++++ b/sql/mysql_priv.h |
4964 | +@@ -615,7 +615,11 @@ |
4965 | + /* BINLOG_DUMP options */ |
4966 | + |
4967 | + #define BINLOG_DUMP_NON_BLOCK 1 |
4968 | ++#endif /* !MYSQL_CLIENT */ |
4969 | + |
4970 | ++#define BINLOG_SEND_ANNOTATE_ROWS_EVENT 2 |
4971 | ++ |
4972 | ++#ifndef MYSQL_CLIENT |
4973 | + /* sql_show.cc:show_log_files() */ |
4974 | + #define SHOW_LOG_STATUS_FREE "FREE" |
4975 | + #define SHOW_LOG_STATUS_INUSE "IN USE" |
4976 | --- a/sql/mysqld.cc |
4977 | +++ b/sql/mysqld.cc |
4978 | @@ -504,6 +504,7 @@ |
4979 | @@ -683,20 +3501,6 @@ |
4980 | {"binlog-do-db", OPT_BINLOG_DO_DB, |
4981 | "Tells the master it should log updates for the specified database, " |
4982 | "and exclude all others not explicitly mentioned.", |
4983 | ---- a/sql/mysql_priv.h |
4984 | -+++ b/sql/mysql_priv.h |
4985 | -@@ -615,7 +615,11 @@ |
4986 | - /* BINLOG_DUMP options */ |
4987 | - |
4988 | - #define BINLOG_DUMP_NON_BLOCK 1 |
4989 | -+#endif /* !MYSQL_CLIENT */ |
4990 | - |
4991 | -+#define BINLOG_SEND_ANNOTATE_ROWS_EVENT 2 |
4992 | -+ |
4993 | -+#ifndef MYSQL_CLIENT |
4994 | - /* sql_show.cc:show_log_files() */ |
4995 | - #define SHOW_LOG_STATUS_FREE "FREE" |
4996 | - #define SHOW_LOG_STATUS_INUSE "IN USE" |
4997 | --- a/sql/rpl_rli.cc |
4998 | +++ b/sql/rpl_rli.cc |
4999 | @@ -45,7 +45,8 @@ |
5000 | @@ -731,7 +3535,7 @@ |
You propose to merge this to PS 5.1, while the prerequisite branch is proposed to be merged to rnt-5.1.