#At file:///home/bzr/merges/merge-6.0-bugteam/ based on revid:ramil@stripped
3268 Mats Kindahl 2009-05-11 [merge]
Merging BUG#44442 into 6.0-bugteam.
added:
mysql-test/suite/binlog/r/binlog_incident.result
mysql-test/suite/binlog/t/binlog_incident-master.opt
mysql-test/suite/binlog/t/binlog_incident.test
modified:
sql/log_event.cc
=== added file 'mysql-test/suite/binlog/r/binlog_incident.result'
--- a/mysql-test/suite/binlog/r/binlog_incident.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/r/binlog_incident.result 2009-05-11 11:32:38 +0000
@@ -0,0 +1,12 @@
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1;
+a
+1
+2
+3
+REPLACE INTO t1 VALUES (4);
+DROP TABLE t1;
+FLUSH LOGS;
+Contain RELOAD DATABASE
+1
=== added file 'mysql-test/suite/binlog/t/binlog_incident-master.opt'
--- a/mysql-test/suite/binlog/t/binlog_incident-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_incident-master.opt 2009-05-11 11:32:38 +0000
@@ -0,0 +1 @@
+--loose-debug=+d,incident_database_resync_on_replace
\ No newline at end of file
=== added file 'mysql-test/suite/binlog/t/binlog_incident.test'
--- a/mysql-test/suite/binlog/t/binlog_incident.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_incident.test 2009-05-11 11:32:38 +0000
@@ -0,0 +1,27 @@
+# The purpose of this test is to provide a reference for how the
+# incident log event is represented in the output from the mysqlbinlog
+# program.
+
+source include/have_log_bin.inc;
+source include/have_debug.inc;
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+CREATE TABLE t1 (a INT);
+
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1;
+
+# This will generate an incident log event and store it in the binary
+# log before the replace statement.
+REPLACE INTO t1 VALUES (4);
+
+DROP TABLE t1;
+FLUSH LOGS;
+
+exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
+--disable_query_log
+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;
+--enable_query_log
+
+remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
\ No newline at end of file
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2009-04-30 14:35:36 +0000
+++ b/sql/log_event.cc 2009-05-11 14:19:55 +0000
@@ -9393,7 +9393,7 @@ Incident_log_event::print(FILE *file,
Write_on_release_cache cache(&print_event_info->head_cache, file);
print_header(&cache, print_event_info, FALSE);
- my_b_printf(&cache, "\n# Incident: %s", description());
+ my_b_printf(&cache, "\n# Incident: %s\nRELOAD DATABASE; # Shall generate syntax error\n", description());
}
#endif
Attachment: [text/bzr-bundle] bzr/mats@sun.com-20090511141955-y57wn3ooxdp7dd41.bundle
| Thread |
|---|
| • bzr commit into mysql-6.0-bugteam branch (mats:3268) Bug#44442 | Mats Kindahl | 11 May |