Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-29 21:38:03+02:00, mats@romeo.(none) +83 -0
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/w3464-mysql-5.1-new-rpl
MERGE: 1.2390.30.1
client/Makefile.am@stripped, 2007-03-29 20:51:43+02:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.83.1.1
mysql-test/extra/binlog_tests/binlog.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +4 -12
Binlog position change.
MERGE: 1.15.2.1
mysql-test/extra/binlog_tests/binlog_insert_delayed.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -4
Binlog position change.
MERGE: 1.4.1.1
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -4
Binlog position change.
MERGE: 1.6.2.1
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -3
Binlog position change.
MERGE: 1.9.1.1
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-03-29
21:37:58+02:00, mats@romeo.(none) +14 -57
Binlog position change.
MERGE: 1.32.2.1
mysql-test/extra/rpl_tests/rpl_deadlock.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +2 -4
Binlog position change.
MERGE: 1.18.1.1
mysql-test/extra/rpl_tests/rpl_log.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +3 -6
Binlog position change.
MERGE: 1.41.2.1
mysql-test/extra/rpl_tests/rpl_multi_query.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -4
Binlog position change.
MERGE: 1.11.1.1
mysql-test/extra/rpl_tests/rpl_row_charset.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -4
Binlog position change.
MERGE: 1.4.1.1
mysql-test/extra/rpl_tests/rpl_stm_charset.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -4
Binlog position change.
MERGE: 1.22.1.1
mysql-test/include/show_binlog_events.inc@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -2
Binlog position change.
MERGE: 1.2.1.1
mysql-test/r/binlog_row_binlog.result@stripped, 2007-03-29 21:37:58+02:00, mats@romeo.(none)
+5 -10
Result change
MERGE: 1.10.2.1
mysql-test/r/binlog_row_ctype_ucs.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +3 -6
Result change
MERGE: 1.4.1.1
mysql-test/r/binlog_row_insert_select.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +4 -10
Result change
MERGE: 1.4.1.1
mysql-test/r/binlog_row_mix_innodb_myisam.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +14 -28
Result change
MERGE: 1.17.1.1
mysql-test/r/binlog_stm_binlog.result@stripped, 2007-03-29 21:37:58+02:00, mats@romeo.(none)
+10 -21
Result change
MERGE: 1.17.1.1
mysql-test/r/binlog_stm_ctype_ucs.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +3 -6
Result change
MERGE: 1.10.1.1
mysql-test/r/binlog_stm_insert_select.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +3 -8
Result change
MERGE: 1.5.1.1
mysql-test/r/binlog_stm_mix_innodb_myisam.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +14 -28
Result change
MERGE: 1.35.1.1
mysql-test/r/ctype_cp932_binlog_row.result@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -2
Result change
MERGE: 1.3.1.1
mysql-test/r/ctype_cp932_binlog_stm.result@stripped, 2007-03-29 21:21:36+02:00,
mats@romeo.(none) +0 -7
Manual merge
,
MERGE: 1.3.1.1
mysql-test/r/flush_block_commit_notembedded.result@stripped, 2007-03-29 21:21:50+02:00,
mats@romeo.(none) +0 -2
Manual merge
MERGE: 1.3.1.1
mysql-test/r/rpl_000015.result@stripped, 2007-03-29 21:21:56+02:00, mats@romeo.(none) +0 -2
Manual merge
MERGE: 1.41.1.1
mysql-test/r/rpl_change_master.result@stripped, 2007-03-29 21:22:03+02:00, mats@romeo.(none)
+0 -2
Manual merge
MERGE: 1.20.1.1
mysql-test/r/rpl_deadlock_innodb.result@stripped, 2007-03-29 21:22:10+02:00,
mats@romeo.(none) +0 -2
Manual merge
MERGE: 1.16.1.1
mysql-test/r/rpl_flushlog_loop.result@stripped, 2007-03-29 21:22:16+02:00, mats@romeo.(none)
+0 -2
Manual merge
,
MERGE: 1.26.1.1
mysql-test/r/rpl_loaddata.result@stripped, 2007-03-29 21:22:21+02:00, mats@romeo.(none) +0
-3
manual merge
MERGE: 1.37.1.1
mysql-test/r/rpl_loaddata_s.result@stripped, 2007-03-29 21:22:27+02:00, mats@romeo.(none) +0
-1
manual merge
,
MERGE: 1.13.1.1
mysql-test/r/rpl_log_pos.result@stripped, 2007-03-29 21:22:36+02:00, mats@romeo.(none) +6
-10
manual merge
MERGE: 1.44.1.1
mysql-test/r/rpl_ndb_charset.result@stripped, 2007-03-29 21:22:40+02:00, mats@romeo.(none) +0
-1
manual merge
MERGE: 1.5.1.1
mysql-test/r/rpl_ndb_log.result@stripped, 2007-03-29 21:22:45+02:00, mats@romeo.(none) +0 -8
manual merge
,
MERGE: 1.16.3.1
mysql-test/r/rpl_ndb_multi.result@stripped, 2007-03-29 21:22:52+02:00, mats@romeo.(none) +0
-2
manual merge
MERGE: 1.4.1.1
mysql-test/r/rpl_rbr_to_sbr.result@stripped, 2007-03-29 21:22:56+02:00, mats@romeo.(none) +0
-2
manual merge
MERGE: 1.3.1.1
mysql-test/r/rpl_rotate_logs.result@stripped, 2007-03-29 21:23:42+02:00, mats@romeo.(none)
+0 -15
Manual merge
MERGE: 1.73.1.1
mysql-test/r/rpl_row_basic_11bugs.result@stripped, 2007-03-29 21:23:43+02:00,
mats@romeo.(none) +0 -8
Manual merge
MERGE: 1.12.2.1
mysql-test/r/rpl_row_charset.result@stripped, 2007-03-29 21:23:46+02:00, mats@romeo.(none) +0
-1
Manual merge
MERGE: 1.5.1.1
mysql-test/r/rpl_row_create_table.result@stripped, 2007-03-29 21:23:50+02:00,
mats@romeo.(none) +0 -51
Manual merge
MERGE: 1.8.1.1
mysql-test/r/rpl_row_delayed_ins.result@stripped, 2007-03-29 21:23:50+02:00,
mats@romeo.(none) +9 -9
Manual merge
MERGE: 1.5.1.1
mysql-test/r/rpl_row_drop.result@stripped, 2007-03-29 21:23:51+02:00, mats@romeo.(none) +0 -4
Manual merge
MERGE: 1.3.1.1
mysql-test/r/rpl_row_flsh_tbls.result@stripped, 2007-03-29 21:23:52+02:00, mats@romeo.(none)
+0 -2
Manual merge
MERGE: 1.2.1.1
mysql-test/r/rpl_row_inexist_tbl.result@stripped, 2007-03-29 21:23:52+02:00,
mats@romeo.(none) +0 -1
Manual merge
MERGE: 1.2.1.1
mysql-test/r/rpl_row_log.result@stripped, 2007-03-29 21:23:53+02:00, mats@romeo.(none) +0 -8
Manual merge
MERGE: 1.12.2.1
mysql-test/r/rpl_row_log_innodb.result@stripped, 2007-03-29 21:23:53+02:00,
mats@romeo.(none) +0 -8
Manual merge
MERGE: 1.12.2.1
mysql-test/r/rpl_row_max_relay_size.result@stripped, 2007-03-29 21:23:54+02:00,
mats@romeo.(none) +0 -11
Manual merge
MERGE: 1.5.1.1
mysql-test/r/rpl_row_reset_slave.result@stripped, 2007-03-29 21:23:55+02:00,
mats@romeo.(none) +0 -3
Manual merge
MERGE: 1.1.1.1
mysql-test/r/rpl_row_until.result@stripped, 2007-03-29 21:23:55+02:00, mats@romeo.(none) +0
-4
Manual merge
MERGE: 1.1.1.1
mysql-test/r/rpl_server_id1.result@stripped, 2007-03-29 21:23:56+02:00, mats@romeo.(none) +0
-1
Manual merge
MERGE: 1.11.1.1
mysql-test/r/rpl_server_id2.result@stripped, 2007-03-29 21:23:57+02:00, mats@romeo.(none) +0
-1
Manual merge
MERGE: 1.12.1.1
mysql-test/r/rpl_sp.result@stripped, 2007-03-29 21:23:57+02:00, mats@romeo.(none) +0 -1
Manual merge
MERGE: 1.32.1.1
mysql-test/r/rpl_stm_charset.result@stripped, 2007-03-29 21:23:58+02:00, mats@romeo.(none)
+0 -1
Manual merge
MERGE: 1.25.1.1
mysql-test/r/rpl_stm_flsh_tbls.result@stripped, 2007-03-29 21:23:58+02:00, mats@romeo.(none)
+0 -2
Manual merge
MERGE: 1.14.1.1
mysql-test/r/rpl_stm_log.result@stripped, 2007-03-29 21:23:59+02:00, mats@romeo.(none) +0 -8
Manual merge
MERGE: 1.73.2.1
mysql-test/r/rpl_stm_max_relay_size.result@stripped, 2007-03-29 21:24:00+02:00,
mats@romeo.(none) +0 -11
Manual merge
MERGE: 1.26.1.1
mysql-test/r/rpl_stm_multi_query.result@stripped, 2007-03-29 21:24:01+02:00,
mats@romeo.(none) +0 -1
Manual merge
MERGE: 1.5.1.1
mysql-test/r/rpl_stm_reset_slave.result@stripped, 2007-03-29 21:24:01+02:00,
mats@romeo.(none) +0 -3
Manual merge
MERGE: 1.14.1.1
mysql-test/r/rpl_stm_until.result@stripped, 2007-03-29 21:24:02+02:00, mats@romeo.(none) +0
-8
Manual merge
MERGE: 1.26.1.1
mysql-test/r/rpl_switch_stm_row_mixed.result@stripped, 2007-03-29 21:24:03+02:00,
mats@romeo.(none) +472 -474
Manual merge
MERGE: 1.17.2.1
mysql-test/r/rpl_truncate_2myisam.result@stripped, 2007-03-29 21:24:04+02:00,
mats@romeo.(none) +0 -33
Manual merge
MERGE: 1.2.1.1
mysql-test/r/rpl_truncate_3innodb.result@stripped, 2007-03-29 21:24:04+02:00,
mats@romeo.(none) +0 -45
Manual merge
MERGE: 1.2.1.1
mysql-test/r/rpl_truncate_7ndb.result@stripped, 2007-03-29 21:24:05+02:00, mats@romeo.(none)
+0 -34
Manual merge
MERGE: 1.5.2.1
mysql-test/r/user_var-binlog.result@stripped, 2007-03-29 21:24:05+02:00, mats@romeo.(none)
+5 -6
Manual merge
MERGE: 1.9.1.1
mysql-test/t/binlog_row_mix_innodb_myisam.test@stripped, 2007-03-29 21:24:06+02:00,
mats@romeo.(none) +0 -1
Manual merge
MERGE: 1.6.1.1
mysql-test/t/binlog_stm_mix_innodb_myisam.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -2
Binlog position change.
MERGE: 1.6.1.1
mysql-test/t/ctype_cp932_binlog_stm.test@stripped, 2007-03-29 21:37:58+02:00,
mats@romeo.(none) +1 -2
Binlog position change.
MERGE: 1.3.1.1
mysql-test/t/mysqlbinlog.test@stripped, 2007-03-29 21:37:58+02:00, mats@romeo.(none) +2 -4
Binlog position change.
MERGE: 1.34.1.1
mysql-test/t/mysqlbinlog2.test@stripped, 2007-03-29 21:37:58+02:00, mats@romeo.(none) +8 -16
Binlog position change.
MERGE: 1.11.1.1
mysql-test/t/rpl_loaddata_s.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +0
-2
Binlog position change.
MERGE: 1.16.1.1
mysql-test/t/rpl_log_pos.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +1 -2
Binlog position change.
MERGE: 1.36.1.1
mysql-test/t/rpl_row_basic_11bugs.test@stripped, 2007-03-29 21:37:59+02:00,
mats@romeo.(none) +1 -3
Binlog position change.
MERGE: 1.11.2.1
mysql-test/t/rpl_row_create_table.test@stripped, 2007-03-29 21:37:59+02:00,
mats@romeo.(none) +6 -12
Binlog position change.
MERGE: 1.8.2.1
mysql-test/t/rpl_row_flsh_tbls.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +1
-2
Binlog position change.
MERGE: 1.3.1.1
mysql-test/t/rpl_row_mysqlbinlog.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none)
+2 -4
Binlog position change.
MERGE: 1.2.1.1
mysql-test/t/rpl_sp.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +1 -2
Binlog position change.
MERGE: 1.29.1.1
mysql-test/t/rpl_stm_flsh_tbls.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +1
-2
Binlog position change.
MERGE: 1.2.1.1
mysql-test/t/rpl_switch_stm_row_mixed.test@stripped, 2007-03-29 21:37:59+02:00,
mats@romeo.(none) +0 -2
Binlog position change.
MERGE: 1.14.2.1
mysql-test/t/user_var-binlog.test@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +0
-1
Binlog position change.
MERGE: 1.8.1.1
sql/Makefile.am@stripped, 2007-03-29 20:51:46+02:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.171.1.1
sql/log_event.cc@stripped, 2007-03-29 20:51:46+02:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.262.4.1
sql/log_event.h@stripped, 2007-03-29 20:51:46+02:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.136.10.1
sql/rpl_injector.h@stripped, 2007-03-29 20:51:46+02:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.8.1.1
sql/share/errmsg.txt@stripped, 2007-03-29 21:37:59+02:00, mats@romeo.(none) +2 -2
Merging error messages
MERGE: 1.139.1.1
sql/sql_parse.cc@stripped, 2007-03-29 20:51:47+02:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.616.1.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mats
# Host: romeo.(none)
# Root: /home/bk/w3464-mysql-5.1-new-rpl/RESYNC
--- 1.85/client/Makefile.am 2007-03-29 21:38:15 +02:00
+++ 1.86/client/Makefile.am 2007-03-29 21:38:15 +02:00
@@ -95,7 +95,8 @@
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
-DDATADIR="\"$(localstatedir)\""
-sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
+sql_src=log_event.h mysql_priv.h rpl_constants.h \
+ log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
EXTRA_DIST = get_password.c CMakeLists.txt echo.c
--- 1.177/sql/Makefile.am 2007-03-29 21:38:15 +02:00
+++ 1.178/sql/Makefile.am 2007-03-29 21:38:15 +02:00
@@ -52,7 +52,7 @@
sql_error.h field.h handler.h mysqld_suffix.h \
ha_partition.h \
ha_ndbcluster.h ha_ndbcluster_binlog.h \
- ha_ndbcluster_tables.h \
+ ha_ndbcluster_tables.h rpl_constants.h \
opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \
log.h sql_show.h rpl_rli.h rpl_mi.h \
sql_select.h structs.h table.h sql_udf.h hash_filo.h \
--- 1.272/sql/log_event.cc 2007-03-29 21:38:15 +02:00
+++ 1.273/sql/log_event.cc 2007-03-29 21:38:15 +02:00
@@ -305,7 +305,7 @@
read_str()
*/
-static inline int read_str(char **buf, char *buf_end, char **str,
+static inline int read_str(const char **buf, const char *buf_end, const char **str,
uint8 *len)
{
if (*buf + ((uint) (uchar) **buf) >= buf_end)
@@ -420,6 +420,7 @@
case DELETE_ROWS_EVENT: return "Delete_rows";
case BEGIN_LOAD_QUERY_EVENT: return "Begin_load_query";
case EXECUTE_LOAD_QUERY_EVENT: return "Execute_load_query";
+ case INCIDENT_EVENT: return "Incident";
default: return "Unknown"; /* impossible */
}
}
@@ -1011,7 +1012,10 @@
ev = new Begin_load_query_log_event(buf, event_len, description_event);
break;
case EXECUTE_LOAD_QUERY_EVENT:
- ev = new Execute_load_query_log_event(buf, event_len, description_event);
+ ev= new Execute_load_query_log_event(buf, event_len, description_event);
+ break;
+ case INCIDENT_EVENT:
+ ev = new Incident_log_event(buf, event_len, description_event);
break;
default:
DBUG_PRINT("error",("Unknown event code: %d",
@@ -2481,6 +2485,7 @@
post_header_len[DELETE_ROWS_EVENT-1]= 6;);
post_header_len[BEGIN_LOAD_QUERY_EVENT-1]= post_header_len[APPEND_BLOCK_EVENT-1];
post_header_len[EXECUTE_LOAD_QUERY_EVENT-1]= EXECUTE_LOAD_QUERY_HEADER_LEN;
+ post_header_len[INCIDENT_EVENT-1]= INCIDENT_HEADER_LEN;
}
break;
@@ -5520,7 +5525,7 @@
sql_ex_info::init()
*/
-char* sql_ex_info::init(char* buf,char* buf_end,bool use_new_format)
+char *sql_ex_info::init(char *buf, char *buf_end, bool use_new_format)
{
cached_new_format = use_new_format;
if (use_new_format)
@@ -5533,11 +5538,12 @@
the case when we have old format because we will be reusing net buffer
to read the actual file before we write out the Create_file event.
*/
- if (read_str(&buf, buf_end, &field_term, &field_term_len) ||
- read_str(&buf, buf_end, &enclosed, &enclosed_len) ||
- read_str(&buf, buf_end, &line_term, &line_term_len) ||
- read_str(&buf, buf_end, &line_start, &line_start_len) ||
- read_str(&buf, buf_end, &escaped, &escaped_len))
+ const char *ptr= buf;
+ if (read_str(&ptr, buf_end, (const char **) &field_term, &field_term_len)
||
+ read_str(&ptr, buf_end, (const char **) &enclosed, &enclosed_len) ||
+ read_str(&ptr, buf_end, (const char **) &line_term, &line_term_len) ||
+ read_str(&ptr, buf_end, (const char **) &line_start, &line_start_len) ||
+ read_str(&ptr, buf_end, (const char **) &escaped, &escaped_len))
return 0;
opt_flags = *buf++;
}
@@ -7868,4 +7874,114 @@
Rows_log_event::print_helper(file, print_event_info, "Update_rows");
}
#endif
+
+
+Incident_log_event::Incident_log_event(const char *buf, uint event_len,
+ const Format_description_log_event *descr_event)
+ : Log_event(buf, descr_event)
+{
+ DBUG_ENTER("Incident_log_event::Incident_log_event");
+ uint8 const common_header_len=
+ descr_event->common_header_len;
+ uint8 const post_header_len=
+ descr_event->post_header_len[INCIDENT_EVENT-1];
+
+ DBUG_PRINT("info",("event_len: %u; common_header_len: %d; post_header_len: %d",
+ event_len, common_header_len, post_header_len));
+
+ m_incident= static_cast<Incident>(uint2korr(buf + common_header_len));
+ char const *ptr= buf + common_header_len + post_header_len;
+ char const *const str_end= buf + event_len;
+ uint8 len;
+ const char *str;
+ read_str(&ptr, str_end, &str, &len);
+ m_message.str= const_cast<char*>(str);
+ m_message.length= len;
+ DBUG_PRINT("info", ("m_incident: %d", m_incident));
+ DBUG_VOID_RETURN;
+}
+
+
+Incident_log_event::~Incident_log_event()
+{
+}
+
+
+const char *
+Incident_log_event::description() const
+{
+ static const char *const description[]= {
+ "NOTHING", // Not used
+ "LOST_EVENTS"
+ };
+
+ DBUG_PRINT("info", ("m_incident: %d", m_incident));
+
+ DBUG_ASSERT(0 <= m_incident);
+ DBUG_ASSERT((my_size_t) m_incident <= sizeof(description)/sizeof(*description));
+
+ return description[m_incident];
+}
+
+
+#ifndef MYSQL_CLIENT
+void Incident_log_event::pack_info(Protocol *protocol)
+{
+ char buf[256];
+ my_size_t bytes;
+ if (m_message.length > 0)
+ bytes= my_snprintf(buf, sizeof(buf), "#%d (%s)",
+ m_incident, description());
+ else
+ bytes= my_snprintf(buf, sizeof(buf), "#%d (%s): %s",
+ m_incident, description(), m_message.str);
+ protocol->store(buf, bytes, &my_charset_bin);
+}
+#endif
+
+
+#ifdef MYSQL_CLIENT
+void
+Incident_log_event::print(FILE *file,
+ PRINT_EVENT_INFO *print_event_info)
+{
+ if (print_event_info->short_form)
+ return;
+
+ 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());
+}
+#endif
+
+#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
+int
+Incident_log_event::exec_event(st_relay_log_info *rli)
+{
+ DBUG_ENTER("Incident_log_event::exec_event");
+ slave_print_msg(ERROR_LEVEL, rli, ER_SLAVE_INCIDENT,
+ ER(ER_SLAVE_INCIDENT),
+ description(),
+ m_message.length > 0 ? m_message.str : "<none>");
+ DBUG_RETURN(1);
+}
+#endif
+
+bool
+Incident_log_event::write_data_header(IO_CACHE *file)
+{
+ DBUG_ENTER("Incident_log_event::write_data_header");
+ DBUG_PRINT("enter", ("m_incident: %d", m_incident));
+ byte buf[sizeof(int16)];
+ int2store(buf, (int16) m_incident);
+ DBUG_RETURN(my_b_safe_write(file, buf, sizeof(buf)));
+}
+
+bool
+Incident_log_event::write_data_body(IO_CACHE *file)
+{
+ DBUG_ENTER("Incident_log_event::write_data_body");
+ DBUG_RETURN(write_str(file, m_message.str, m_message.length));
+}
+
--- 1.142/sql/log_event.h 2007-03-29 21:38:15 +02:00
+++ 1.143/sql/log_event.h 2007-03-29 21:38:15 +02:00
@@ -22,6 +22,7 @@
#endif
#include <my_bitmap.h>
+#include "rpl_constants.h"
#define LOG_READ_EOF -1
#define LOG_READ_BOGUS -2
@@ -198,7 +199,7 @@
#define TABLE_MAP_HEADER_LEN 8
#define EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN (4 + 4 + 4 + 1)
#define EXECUTE_LOAD_QUERY_HEADER_LEN (QUERY_HEADER_LEN +
EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN)
-
+#define INCIDENT_HEADER_LEN 2
/*
Max number of possible extra bytes in a replication event compared to a
packet (i.e. a query) sent from client to master;
@@ -487,6 +488,11 @@
DELETE_ROWS_EVENT = 25,
/*
+ Something out of the ordinary happened on the master
+ */
+ INCIDENT_EVENT= 23,
+
+ /*
Add new events here - right above this comment!
Existing events (except ENUM_END_EVENT) should never change their numbers
*/
@@ -2510,6 +2516,96 @@
char const *row_start, char const **row_end);
virtual int do_exec_row(TABLE *table);
#endif
+};
+
+
+/**
+ Class representing an incident, an occurance out of the ordinary,
+ that happened on the master.
+
+ The event is used to inform the slave that something out of the
+ ordinary happened on the master that might cause the database to be
+ in an inconsistent state.
+
+ <table id="IncidentFormat">
+ <caption>Incident event format</caption>
+ <tr>
+ <th>Symbol</th>
+ <th>Size<br/>(bytes)</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>INCIDENT</td>
+ <td align="right">2</td>
+ <td>Incident number as an unsigned integer</td>
+ </tr>
+ <tr>
+ <td>MSGLEN</td>
+ <td align="right">1</td>
+ <td>Message length as an unsigned integer</td>
+ </tr>
+ <tr>
+ <td>MESSAGE</td>
+ <td align="right">MSGLEN</td>
+ <td>The message, if present. Not null terminated.</td>
+ </tr>
+ </table>
+ */
+class Incident_log_event : public Log_event {
+public:
+#ifndef MYSQL_CLIENT
+ Incident_log_event(THD *thd_arg, Incident incident)
+ : Log_event(thd_arg, 0, FALSE), m_incident(incident)
+ {
+ DBUG_ENTER("Incident_log_event::Incident_log_event");
+ DBUG_PRINT("enter", ("m_incident: %d", m_incident));
+ m_message.str= NULL; /* Just as a precaution */
+ m_message.length= 0;
+ DBUG_VOID_RETURN;
+ }
+
+ Incident_log_event(THD *thd_arg, Incident incident, LEX_STRING const msg)
+ : Log_event(thd_arg, 0, FALSE), m_incident(incident)
+ {
+ DBUG_ENTER("Incident_log_event::Incident_log_event");
+ DBUG_PRINT("enter", ("m_incident: %d", m_incident));
+ m_message= msg;
+ DBUG_VOID_RETURN;
+ }
+#endif
+
+#ifndef MYSQL_CLIENT
+ void pack_info(Protocol*);
+#endif
+
+ Incident_log_event(const char *buf, uint event_len,
+ const Format_description_log_event *descr_event);
+
+ virtual ~Incident_log_event();
+
+#ifdef MYSQL_CLIENT
+ virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
+#endif
+
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+ virtual int exec_event(struct st_relay_log_info *rli);
+#endif
+
+ virtual bool write_data_header(IO_CACHE *file);
+ virtual bool write_data_body(IO_CACHE *file);
+
+ virtual Log_event_type get_type_code() { return INCIDENT_EVENT; }
+
+ virtual bool is_valid() const { return 1; }
+ virtual int get_data_size() {
+ return INCIDENT_HEADER_LEN + 1 + m_message.length;
+ }
+
+private:
+ const char *description() const;
+
+ Incident m_incident;
+ LEX_STRING m_message;
};
static inline bool copy_event_cache_to_file_and_reinit(IO_CACHE *cache,
--- 1.649/sql/sql_parse.cc 2007-03-29 21:38:15 +02:00
+++ 1.650/sql/sql_parse.cc 2007-03-29 21:38:15 +02:00
@@ -2595,6 +2595,36 @@
break;
}
case SQLCOM_REPLACE:
+#ifndef DBUG_OFF
+ if (mysql_bin_log.is_open())
+ {
+ /*
+ Generate an incident log event before writing the real event
+ to the binary log. We put this event is before the statement
+ since that makes it simpler to check that the statement was
+ not executed on the slave (since incidents usually stop the
+ slave).
+
+ Observe that any row events that are generated will be
+ generated before.
+
+ This is only for testing purposes and will not be present in a
+ release build.
+ */
+
+ Incident incident= INCIDENT_NONE;
+ DBUG_PRINT("debug", ("Just before generate_incident()"));
+ DBUG_EXECUTE_IF("incident_database_resync_on_replace",
+ incident= INCIDENT_LOST_EVENTS;);
+ if (incident)
+ {
+ Incident_log_event ev(thd, incident);
+ mysql_bin_log.write(&ev);
+ mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
+ }
+ DBUG_PRINT("debug", ("Just after generate_incident()"));
+ }
+#endif
case SQLCOM_INSERT:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
@@ -5181,6 +5211,7 @@
lex->query_tables_last= &lex->query_tables;
}
+
/*
When you modify mysql_parse(), you may need to mofify
mysql_test_parse_for_slave() in this same file.
@@ -5193,6 +5224,7 @@
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
mysql_init_query(thd, (uchar*) inBuf, length);
+
if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
{
LEX *lex= thd->lex;
--- 1.5/mysql-test/extra/binlog_tests/binlog_insert_delayed.test 2007-03-29 21:38:15
+02:00
+++ 1.6/mysql-test/extra/binlog_tests/binlog_insert_delayed.test 2007-03-29 21:38:15
+02:00
@@ -23,9 +23,7 @@
# moving binlog check affront of multi-rows queries which work is indeterministic (extra
table_maps)
# todo: better check is to substitute SHOW BINLOG with reading from binlog, probably
bug#19459 is in
# the way
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
insert delayed into t1 values (null),(null),(null),(null);
inc $count; inc $count; inc $count; inc $count;
--- 1.149/sql/share/errmsg.txt 2007-03-29 21:38:15 +02:00
+++ 1.150/sql/share/errmsg.txt 2007-03-29 21:38:15 +02:00
@@ -6055,3 +6055,5 @@
eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set.
Event has not been created"
ER_EVENT_CANNOT_ALTER_IN_THE_PAST
eng "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set.
Event has not been altered"
+ER_SLAVE_INCIDENT
+ eng "The incident %s occured on the master. Message: %-.64s"
--- 1.43/mysql-test/t/mysqlbinlog.test 2007-03-29 21:38:15 +02:00
+++ 1.44/mysql-test/t/mysqlbinlog.test 2007-03-29 21:38:15 +02:00
@@ -65,7 +65,7 @@
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=238
$MYSQLTEST_VARDIR/log/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=239
$MYSQLTEST_VARDIR/log/master-bin.000002
# These are tests for remote binlog.
# They should return the same as previous test.
@@ -97,7 +97,7 @@
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/
--read-from-remote-server --position=238 --user=root --host=127.0.0.1
--port=$MASTER_MYPORT master-bin.000002
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/
--read-from-remote-server --position=239 --user=root --host=127.0.0.1
--port=$MASTER_MYPORT master-bin.000002
# Bug#7853 (mysqlbinlog does not accept input from stdin)
--disable_query_log
--- 1.31/mysql-test/t/rpl_sp.test 2007-03-29 21:38:15 +02:00
+++ 1.32/mysql-test/t/rpl_sp.test 2007-03-29 21:38:15 +02:00
@@ -566,7 +566,7 @@
# were written to the binary log.
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events in 'master-bin.000001' from 105;
+show binlog events in 'master-bin.000001' from 106;
# Restore log_bin_trust_function_creators to its original value.
--- 1.36/mysql-test/r/binlog_stm_mix_innodb_myisam.result 2007-03-29 21:38:15 +02:00
+++ 1.37/mysql-test/r/binlog_stm_mix_innodb_myisam.result 2007-03-29 21:38:15 +02:00
@@ -6,7 +6,7 @@
insert into t1 values(1);
insert into t2 select * from t1;
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1)
@@ -21,7 +21,7 @@
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(2)
@@ -39,7 +39,7 @@
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(3)
@@ -65,7 +65,7 @@
a
5
7
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(5)
@@ -87,7 +87,7 @@
select get_lock("a",10);
get_lock("a",10)
1
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(8)
@@ -98,7 +98,7 @@
reset master;
insert into t1 values(9);
insert into t2 select * from t1;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
@@ -109,14 +109,14 @@
insert into t1 values(10);
begin;
insert into t2 select * from t1;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11);
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
@@ -132,7 +132,7 @@
insert into t1 values(12);
insert into t2 select * from t1;
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(12)
@@ -145,7 +145,7 @@
insert into t1 values(13);
insert into t2 select * from t1;
rollback;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
delete from t1;
delete from t2;
@@ -157,7 +157,7 @@
insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(14)
@@ -177,7 +177,7 @@
a
16
18
-show binlog events from 105;
+show binlog events from <binlog_start>s;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(16)
@@ -227,7 +227,7 @@
select get_lock("lock1",60);
get_lock("lock1",60)
1
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Query 1 # use `test`; insert into t1 values(16)
@@ -331,7 +331,7 @@
a b
100 100
DROP TABLE t1,t2;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 values (1,1),(1,2)
master-bin.000001 # Query 1 # use `test`; DROP TABLE if exists t2
--- 1.37/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-03-29 21:38:15
+02:00
+++ 1.38/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-03-29 21:38:15
+02:00
@@ -29,9 +29,7 @@
insert into t2 select * from t1;
commit;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -43,9 +41,7 @@
# should say some changes to non-transact1onal tables couldn't be rolled back
rollback;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -59,9 +55,7 @@
rollback to savepoint my_savepoint;
commit;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -77,9 +71,7 @@
commit;
select a from t1 order by a; # check that savepoints work :)
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
# and when ROLLBACK is not explicit?
delete from t1;
@@ -99,9 +91,7 @@
# so SHOW BINLOG EVENTS may come before con1 does the loggin. To be sure that
# logging has been done, we use a user lock.
select get_lock("a",10);
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
# and when not in a transact1on?
delete from t1;
@@ -111,9 +101,7 @@
insert into t1 values(9);
insert into t2 select * from t1;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
# Check that when the query updat1ng the MyISAM table is the first in the
# transaction, we log it immediately.
@@ -124,16 +112,11 @@
insert into t1 values(10); # first make t1 non-empty
begin;
insert into t2 select * from t1;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
insert into t1 values(11);
commit;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
-
+source include/show_binlog_events.inc;
# Check that things work like before this BEGIN/ROLLBACK code was added,
# when t2 is INNODB
@@ -149,9 +132,7 @@
insert into t2 select * from t1;
commit;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -162,9 +143,7 @@
insert into t2 select * from t1;
rollback;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -178,9 +157,7 @@
rollback to savepoint my_savepoint;
commit;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -196,9 +173,7 @@
commit;
select a from t1 order by a; # check that savepoints work :)
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
# Test for BUG#5714, where a MyISAM update in the transaction used to
# release row-level locks in InnoDB
@@ -257,9 +232,7 @@
disconnect con2;
connection con3;
select get_lock("lock1",60);
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
do release_lock("lock1");
drop table t0,t2;
@@ -324,9 +297,7 @@
ROLLBACK;
SELECT * from t2;
DROP TABLE t1,t2;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
# binlog). Has to be here and not earlier, as the SELECTs influence
--- 1.12/mysql-test/t/mysqlbinlog2.test 2007-03-29 21:38:15 +02:00
+++ 1.13/mysql-test/t/mysqlbinlog2.test 2007-03-29 21:38:15 +02:00
@@ -52,11 +52,11 @@
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=607
$MYSQLTEST_VARDIR/log/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --start-position=608
$MYSQLTEST_VARDIR/log/master-bin.000001
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=607
$MYSQLTEST_VARDIR/log/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --stop-position=608
$MYSQLTEST_VARDIR/log/master-bin.000001
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
@@ -82,11 +82,11 @@
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=607
$MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --start-position=608
$MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=133
$MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
+--exec $MYSQL_BINLOG --short-form --stop-position=134
$MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
@@ -109,11 +109,11 @@
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=607 --read-from-remote-server
--user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
+--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
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=607 --read-from-remote-server
--user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
+--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
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
@@ -136,11 +136,11 @@
--disable_query_log
select "--- start-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --start-position=607 --read-from-remote-server
--user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
+--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
--disable_query_log
select "--- stop-position --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form --stop-position=133 --read-from-remote-server
--user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
+--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
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
--- 1.23/mysql-test/extra/rpl_tests/rpl_stm_charset.test 2007-03-29 21:38:15 +02:00
+++ 1.24/mysql-test/extra/rpl_tests/rpl_stm_charset.test 2007-03-29 21:38:15 +02:00
@@ -109,9 +109,7 @@
connection master;
drop database mysqltest2;
drop database mysqltest3;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
sync_slave_with_master;
# Check that we can change global.collation_server (since 5.0.3)
--- 1.19/mysql-test/extra/rpl_tests/rpl_deadlock.test 2007-03-29 21:38:15 +02:00
+++ 1.20/mysql-test/extra/rpl_tests/rpl_deadlock.test 2007-03-29 21:38:15 +02:00
@@ -82,7 +82,7 @@
stop slave;
delete from t3;
-change master to master_log_pos=547; # the BEGIN log event
+change master to master_log_pos=548; # the BEGIN log event
begin;
select * from t2 for update; # hold lock
start slave;
@@ -107,7 +107,7 @@
# This is really copy-paste of 2) of above
stop slave;
delete from t3;
-change master to master_log_pos=547;
+change master to master_log_pos=548;
begin;
select * from t2 for update;
start slave;
--- 1.17/mysql-test/t/rpl_loaddata_s.test 2007-03-29 21:38:15 +02:00
+++ 1.18/mysql-test/t/rpl_loaddata_s.test 2007-03-29 21:38:15 +02:00
@@ -20,9 +20,7 @@
connection slave;
sync_with_master;
select count(*) from test.t1; # check that LOAD was replicated
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105; # should be nothing
+source include/show_binlog_events.inc;
# Cleanup
connection master;
--- 1.12/mysql-test/extra/rpl_tests/rpl_multi_query.test 2007-03-29 21:38:15 +02:00
+++ 1.13/mysql-test/extra/rpl_tests/rpl_multi_query.test 2007-03-29 21:38:15 +02:00
@@ -23,8 +23,6 @@
sync_slave_with_master;
select * from mysqltest.t1;
connection master;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
drop database mysqltest;
sync_slave_with_master;
--- 1.16/mysql-test/t/rpl_switch_stm_row_mixed.test 2007-03-29 21:38:15 +02:00
+++ 1.17/mysql-test/t/rpl_switch_stm_row_mixed.test 2007-03-29 21:38:15 +02:00
@@ -519,9 +519,7 @@
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
sync_slave_with_master;
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
@@ -536,9 +534,7 @@
diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
$MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
connection master;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
# Now test that mysqlbinlog works fine on a binlog generated by the
# mixed mode
--- 1.12/mysql-test/r/binlog_stm_ctype_ucs.result 2007-03-29 21:38:15 +02:00
+++ 1.13/mysql-test/r/binlog_stm_ctype_ucs.result 2007-03-29 21:38:15 +02:00
@@ -3,10 +3,10 @@
set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
-show binlog events from 105;
+show binlog events from 106;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 105 User var 1 145 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
-master-bin.000001 145 Query 1 234 use `test`; insert into t2 values (@v)
+master-bin.000001 106 User var 1 145 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
+master-bin.000001 145 Query 1 235 use `test`; insert into t2 values (@v)
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
--- 1.8/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test 2007-03-29 21:38:15 +02:00
+++ 1.9/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test 2007-03-29 21:38:15 +02:00
@@ -26,9 +26,7 @@
# code (and I have used it to test the fix) until there is some way to
# exercise this code from mysql-test-run.
EXECUTE stmt1 USING @var1;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 105;
+source include/show_binlog_events.inc;
SELECT HEX(f1) FROM t1;
DROP table t1;
# end test for bug#11338
--- 1.6/mysql-test/r/binlog_stm_insert_select.result 2007-03-29 21:38:15 +02:00
+++ 1.7/mysql-test/r/binlog_stm_insert_select.result 2007-03-29 21:38:15 +02:00
@@ -6,10 +6,9 @@
reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 'a'
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 105 Query 1 199 use `test`; insert into t1 select * from t2
+master-bin.000001 # Query # # use `test`; insert into t1 select * from t2
select * from t1;
a
1
@@ -20,7 +19,6 @@
reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 'a'
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
drop table t1;
--- 1.10/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test 2007-03-29 21:38:15 +02:00
+++ 1.11/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test 2007-03-29 21:38:15 +02:00
@@ -9,8 +9,7 @@
set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# absolutely need variables names to be quoted and strings to be
# escaped).
--- 1.9/mysql-test/t/user_var-binlog.test 2007-03-29 21:38:15 +02:00
+++ 1.10/mysql-test/t/user_var-binlog.test 2007-03-29 21:38:15 +02:00
@@ -13,9 +13,8 @@
set @var1= "';aaa";
SET @var2=char(ascii('a'));
insert into t1 values (@var1),(@var2);
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
+
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# absolutely need variables names to be quoted and strings to be
# escaped).
--- 1.3/mysql-test/t/rpl_row_mysqlbinlog.test 2007-03-29 21:38:15 +02:00
+++ 1.4/mysql-test/t/rpl_row_mysqlbinlog.test 2007-03-29 21:38:15 +02:00
@@ -162,12 +162,12 @@
# this test for position option
-# By setting this position to 412, we should only get the create of t3
+# By setting this position to 413, we should only get the create of t3
--disable_query_log
select "--- Test 2 position test --" as "";
--enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=415
$MYSQLTEST_VARDIR/log/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416
$MYSQLTEST_VARDIR/log/master-bin.000001
# These are tests for remote binlog.
# They should return the same as previous test.
@@ -263,7 +263,7 @@
select "--- Test 7 reading stdin w/position --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form --position=415 - <
$MYSQLTEST_VARDIR/log/master-bin.000001
+--exec $MYSQL_BINLOG --short-form --position=416 - <
$MYSQLTEST_VARDIR/log/master-bin.000001
# Bug#16217 (mysql client did not know how not switch its internal charset)
--disable_query_log
--- 1.5/mysql-test/extra/rpl_tests/rpl_row_charset.test 2007-03-29 21:38:15 +02:00
+++ 1.6/mysql-test/extra/rpl_tests/rpl_row_charset.test 2007-03-29 21:38:15 +02:00
@@ -113,9 +113,7 @@
connection master;
drop database mysqltest2;
drop database mysqltest3;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 105;
+source include/show_binlog_events.inc;
sync_slave_with_master;
# Check that we can change global.collation_server (since 5.0.3)
--- 1.13/mysql-test/r/binlog_row_binlog.result 2007-03-29 21:38:15 +02:00
+++ 1.14/mysql-test/r/binlog_row_binlog.result 2007-03-29 21:38:15 +02:00
@@ -8,7 +8,7 @@
begin;
insert t2 values (5);
commit;
-show binlog events from 105;
+source include/show_binlog_events.inc;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
@@ -26,7 +26,7 @@
begin;
commit;
drop table t1;
-show binlog events in 'master-bin.000001' from 105;
+show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN
@@ -232,7 +232,7 @@
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002' from 105;
+show binlog events in 'master-bin.000002' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
reset master;
@@ -254,7 +254,7 @@
UPDATE user SET password=password('Another password') WHERE host='localhost' AND
user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
-show binlog events from 105;
+source include/show_binlog_events.inc;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment
primary key)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -279,7 +279,7 @@
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
-show binlog events from 105;
+source include/show_binlog_events.inc;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment
primary key)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
--- 1.5/mysql-test/r/binlog_row_ctype_ucs.result 2007-03-29 21:38:15 +02:00
+++ 1.6/mysql-test/r/binlog_row_ctype_ucs.result 2007-03-29 21:38:15 +02:00
@@ -3,10 +3,10 @@
set @v=convert('abc' using ucs2);
reset master;
insert into t2 values (@v);
-show binlog events from 105;
+show binlog events from 106;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 105 Table_map 1 144 table_id: # (test.t2)
-master-bin.000001 144 Write_rows 1 234 table_id: # flags: STMT_END_F
+master-bin.000001 106 Table_map 1 145 table_id: # (test.t2)
+master-bin.000001 145 Write_rows 1 235 table_id: # flags: STMT_END_F
flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
--- 1.5/mysql-test/r/binlog_row_insert_select.result 2007-03-29 21:38:15 +02:00
+++ 1.6/mysql-test/r/binlog_row_insert_select.result 2007-03-29 21:38:15 +02:00
@@ -6,11 +6,10 @@
reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 'a'
-show binlog events;
+source include/show_binlog_events.inc;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 105 Table_map 1 144 table_id: # (test.t1)
-master-bin.000001 144 Write_rows 1 178 table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
select * from t1;
a
1
@@ -21,7 +20,6 @@
reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 'a'
-show binlog events;
+source include/show_binlog_events.inc;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 105 Server ver: VERSION, Binlog ver: 4
drop table t1;
--- 1.18/mysql-test/r/binlog_row_mix_innodb_myisam.result 2007-03-29 21:38:15 +02:00
+++ 1.19/mysql-test/r/binlog_row_mix_innodb_myisam.result 2007-03-29 21:38:15 +02:00
@@ -6,7 +6,7 @@
insert into t1 values(1);
insert into t2 select * from t1;
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -23,7 +23,7 @@
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -43,7 +43,7 @@
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -72,7 +72,7 @@
a
5
7
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -98,7 +98,7 @@
select get_lock("a",10);
get_lock("a",10)
1
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -111,7 +111,7 @@
reset master;
insert into t1 values(9);
insert into t2 select * from t1;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
@@ -124,7 +124,7 @@
insert into t1 values(10);
begin;
insert into t2 select * from t1;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
@@ -133,7 +133,7 @@
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
insert into t1 values(11);
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
@@ -152,7 +152,7 @@
insert into t1 values(12);
insert into t2 select * from t1;
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -167,7 +167,7 @@
insert into t1 values(13);
insert into t2 select * from t1;
rollback;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
delete from t1;
delete from t2;
@@ -179,7 +179,7 @@
insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -200,7 +200,7 @@
a
16
18
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -252,7 +252,7 @@
select get_lock("lock1",60);
get_lock("lock1",60)
1
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -355,7 +355,7 @@
a b
100 100
DROP TABLE t1,t2;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
--- 1.4/mysql-test/r/ctype_cp932_binlog_row.result 2007-03-29 21:38:15 +02:00
+++ 1.5/mysql-test/r/ctype_cp932_binlog_row.result 2007-03-29 21:38:15 +02:00
@@ -6,7 +6,7 @@
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
SET @var1= x'8300';
EXECUTE stmt1 USING @var1;
-SHOW BINLOG EVENTS FROM 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
--- 1.7/mysql-test/t/binlog_stm_mix_innodb_myisam.test 2007-03-29 21:38:15 +02:00
+++ 1.8/mysql-test/t/binlog_stm_mix_innodb_myisam.test 2007-03-29 21:38:15 +02:00
@@ -12,7 +12,7 @@
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
# and does not make slave to stop)
flush logs;
---exec $MYSQL_BINLOG --start-position=554 $MYSQLTEST_VARDIR/log/master-bin.000001 >
$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
+--exec $MYSQL_BINLOG --start-position=555 $MYSQLTEST_VARDIR/log/master-bin.000001 >
$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
--- 1.5/mysql-test/t/ctype_cp932_binlog_stm.test 2007-03-29 21:38:15 +02:00
+++ 1.6/mysql-test/t/ctype_cp932_binlog_stm.test 2007-03-29 21:38:15 +02:00
@@ -22,7 +22,7 @@
SELECT HEX(s1),HEX(s2),d FROM t4|
DROP PROCEDURE bug18293|
DROP TABLE t4|
-SHOW BINLOG EVENTS FROM 409|
+SHOW BINLOG EVENTS FROM 410|
delimiter ;|
# End of 5.0 tests
--- 1.10/mysql-test/t/rpl_row_create_table.test 2007-03-29 21:38:15 +02:00
+++ 1.11/mysql-test/t/rpl_row_create_table.test 2007-03-29 21:38:15 +02:00
@@ -36,7 +36,7 @@
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---query_vertical SHOW BINLOG EVENTS FROM 215
+--query_vertical SHOW BINLOG EVENTS FROM 216
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t1
--query_vertical SHOW CREATE TABLE t2
@@ -72,7 +72,7 @@
# Shouldn't be written to the binary log
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1097;
+SHOW BINLOG EVENTS FROM 1098;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
@@ -82,7 +82,7 @@
# Should be written to the binary log
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1097;
+SHOW BINLOG EVENTS FROM 1098;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -94,7 +94,7 @@
ROLLBACK;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1293;
+SHOW BINLOG EVENTS FROM 1294;
SELECT * FROM t7 ORDER BY a,b;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -110,7 +110,7 @@
--query_vertical SHOW CREATE TABLE t9
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1389;
+SHOW BINLOG EVENTS FROM 1390;
sync_slave_with_master;
--echo **** On Slave ****
--query_vertical SHOW CREATE TABLE t8
@@ -227,7 +227,7 @@
SELECT * FROM t2 ORDER BY a;
--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server
ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 630;
+SHOW BINLOG EVENTS FROM 631;
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
--- 1.4/mysql-test/t/rpl_row_flsh_tbls.test 2007-03-29 21:38:15 +02:00
+++ 1.5/mysql-test/t/rpl_row_flsh_tbls.test 2007-03-29 21:38:15 +02:00
@@ -1,7 +1,7 @@
# depends on the binlog output
-- source include/have_binlog_format_row.inc
-let $rename_event_pos= 618;
+let $rename_event_pos= 619;
# Bug#18326: Do not lock table for writing during prepare of statement
# The use of the ps protocol causes extra table maps in the binlog, so
--- 1.3/mysql-test/t/rpl_stm_flsh_tbls.test 2007-03-29 21:38:15 +02:00
+++ 1.4/mysql-test/t/rpl_stm_flsh_tbls.test 2007-03-29 21:38:15 +02:00
@@ -1,7 +1,7 @@
# depends on the binlog output
--source include/have_binlog_format_mixed_or_statement.inc
-let $rename_event_pos= 655;
+let $rename_event_pos= 656;
-- source extra/rpl_tests/rpl_flsh_tbls.test
# End of 4.1 tests
--- 1.13/mysql-test/t/rpl_row_basic_11bugs.test 2007-03-29 21:38:15 +02:00
+++ 1.14/mysql-test/t/rpl_row_basic_11bugs.test 2007-03-29 21:38:15 +02:00
@@ -24,8 +24,7 @@
CREATE TABLE t2 (a INT, b INT);
SHOW TABLES;
INSERT INTO t2 VALUES (3,3), (4,4);
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 105;
+source include/show_binlog_events.inc;
sync_slave_with_master;
--echo **** On Slave ****
SHOW DATABASES;
--- 1.37/mysql-test/t/rpl_log_pos.test 2007-03-29 21:38:15 +02:00
+++ 1.38/mysql-test/t/rpl_log_pos.test 2007-03-29 21:38:15 +02:00
@@ -18,12 +18,12 @@
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
stop slave;
-change master to master_log_pos=74;
+change master to master_log_pos=75;
start slave;
sleep 5;
stop slave;
-change master to master_log_pos=74;
+change master to master_log_pos=75;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
@@ -33,7 +33,7 @@
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
stop slave;
-change master to master_log_pos=177;
+change master to master_log_pos=178;
start slave;
sleep 2;
--replace_result $MASTER_MYPORT MASTER_PORT
@@ -49,7 +49,7 @@
save_master_pos;
connection slave;
stop slave;
-change master to master_log_pos=105;
+change master to master_log_pos=106;
start slave;
sync_with_master;
select * from t1 ORDER BY n;
--- 1.43/mysql-test/extra/rpl_tests/rpl_log.test 2007-03-29 21:38:15 +02:00
+++ 1.44/mysql-test/extra/rpl_tests/rpl_log.test 2007-03-29 21:38:15 +02:00
@@ -42,13 +42,13 @@
show binlog events;
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events from 105 limit 1;
+show binlog events from 106 limit 1;
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events from 105 limit 2;
+show binlog events from 106 limit 2;
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events from 105 limit 2,1;
+show binlog events from 106 limit 2,1;
flush logs;
# We need an extra update before doing save_master_pos.
--- 1.20/mysql-test/r/binlog_stm_binlog.result 2007-03-29 21:38:15 +02:00
+++ 1.21/mysql-test/r/binlog_stm_binlog.result 2007-03-29 21:38:15 +02:00
@@ -2,13 +2,12 @@
begin;
insert into t1 values (1,2);
commit;
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 105 Server ver: #, Binlog ver: #
-master-bin.000001 105 Query 1 212 use `test`; create table t1 (a int, b int)
engine=innodb
-master-bin.000001 212 Query 1 280 use `test`; BEGIN
-master-bin.000001 280 Query 1 90 use `test`; insert into t1 values (1,2)
-master-bin.000001 370 Xid 1 397 COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb
+master-bin.000001 # Query # # use `test`; BEGIN
+master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
+master-bin.000001 # Xid # # COMMIT /* XID */
drop table t1;
drop table if exists t1, t2;
reset master;
@@ -20,7 +19,7 @@
begin;
insert t2 values (5);
commit;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
@@ -36,7 +35,7 @@
begin;
commit;
drop table t1;
-show binlog events in 'master-bin.000001' from 105;
+show binlog events in 'master-bin.000001' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN
@@ -142,7 +141,7 @@
master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4)
master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002' from 105;
+show binlog events in 'master-bin.000002' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
reset master;
@@ -164,7 +163,7 @@
UPDATE user SET password=password('Another password') WHERE host='localhost' AND
user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment
primary key)
master-bin.000001 # Intvar 1 # INSERT_ID=127
@@ -183,7 +182,7 @@
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
-show binlog events from 105;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment
primary key)
master-bin.000001 # Intvar 1 # INSERT_ID=127
--- 1.18/mysql-test/extra/binlog_tests/binlog.test 2007-03-29 21:38:15 +02:00
+++ 1.19/mysql-test/extra/binlog_tests/binlog.test 2007-03-29 21:38:15 +02:00
@@ -20,9 +20,7 @@
insert t2 values (5);
commit;
# first COMMIT must be Query_log_event, second - Xid_log_event
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
drop table t1,t2;
#
@@ -44,10 +42,10 @@
drop table t1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events in 'master-bin.000001' from 105;
+show binlog events in 'master-bin.000001' from 106;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events in 'master-bin.000002' from 105;
+show binlog events in 'master-bin.000002' from 106;
# Test of a too big SET INSERT_ID: see if the truncated value goes
# into binlog (right), or the too big value (wrong); we look at the
@@ -80,9 +78,7 @@
--enable_warnings
use test;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 105;
+source include/show_binlog_events.inc;
drop table t1,t2,t3,tt1;
-- source extra/binlog_tests/binlog_insert_delayed.test
--- 1.3/mysql-test/include/show_binlog_events.inc 2007-03-29 21:38:15 +02:00
+++ 1.4/mysql-test/include/show_binlog_events.inc 2007-03-29 21:38:15 +02:00
@@ -1,4 +1,4 @@
---let $binlog_start=105
+--let $binlog_start=106
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
--- 1.9/sql/rpl_injector.h 2007-03-29 21:38:15 +02:00
+++ 1.10/sql/rpl_injector.h 2007-03-29 21:38:15 +02:00
@@ -18,9 +18,10 @@
/* Pull in 'byte', 'my_off_t', and 'uint32' */
#include <my_global.h>
-
#include <my_bitmap.h>
+#include "rpl_constants.h"
+
/* Forward declarations */
class handler;
class MYSQL_BIN_LOG;
@@ -321,6 +322,9 @@
*/
transaction new_trans(THD *);
void new_trans(THD *, transaction *);
+
+ int record_incident(THD*, Incident incident);
+ int record_incident(THD*, Incident incident, LEX_STRING message);
private:
explicit injector();
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.2532) | Mats Kindahl | 29 Mar |