#At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl2540/ based on revid:andrei.elkin@stripped
3194 Andrei Elkin 2010-11-08
Bug #58063 rpl_server_uuid segfaults on win
This is an intermediate patch to get more details out of the failure.
@ sql/log_event.cc
compilation warning is fixed.
@ sql/rpl_slave.cc
Printing out more info in case Win run of rpl_server_id discovers unexpected NULL
as the value of @master_binlog_checksum.
modified:
sql/log_event.cc
sql/rpl_slave.cc
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2010-11-02 19:57:34 +0000
+++ b/sql/log_event.cc 2010-11-08 21:00:21 +0000
@@ -739,7 +739,7 @@ const char* Log_event::get_type_str()
#ifndef MYSQL_CLIENT
Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans)
:log_pos(0), temp_buf(0), exec_time(0), flags(flags_arg),
- cache_type(Log_event::EVENT_INVALID_CACHE), thd(thd_arg), crc(0),
+ cache_type(Log_event::EVENT_INVALID_CACHE), crc(0), thd(thd_arg),
checksum_alg(BINLOG_CHECKSUM_ALG_UNDEF)
{
server_id= thd->server_id;
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc 2010-11-02 12:43:13 +0000
+++ b/sql/rpl_slave.cc 2010-11-08 21:00:21 +0000
@@ -1691,6 +1691,7 @@ when it try to get the value of TIME_ZON
goto past_checksum;);
{
int rc;
+ ulong thread_id= mysql->thread_id;
const char query[]= "SET @master_binlog_checksum= @@global.binlog_checksum";
master_res= NULL;
mi->checksum_alg_before_fd= BINLOG_CHECKSUM_ALG_UNDEF; //initially undefined
@@ -1742,6 +1743,19 @@ when it try to get the value of TIME_ZON
(master_res= mysql_store_result(mysql)) &&
(master_row= mysql_fetch_row(master_res)))
{
+#ifndef DBUG_OFF
+ if (master_row[0] == NULL)
+ {
+ errmsg= "The slave I/O thread stops because a fatal error is "
+ "encountered when it tried to SELECT @master_binlog_checksum. "
+ "The setting time thread_id %lu, the current thread_i %lu; "
+ "reconnecting %d.";
+ err_code= ER_SLAVE_FATAL_ERROR;
+ sprintf(err_buff, errmsg, thread_id, mysql->thread_id,
+ mysql->reconnect);
+ goto err;
+ }
+#endif
mi->checksum_alg_before_fd= (uint8)
find_type(master_row[0], &binlog_checksum_typelib, 1) - 1;
// valid outcome is either of
Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20101108210021-znkccbqrdn1f25u5.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr branch (andrei.elkin:3194) Bug#58063 | Andrei Elkin | 8 Nov |