#At file:///media/sdb2/hezx/work/mysql/bzrwork/b42244/6.0-bugteam/
3115 He Zhenxing 2009-03-13
BUG#42244 Segmentation fault at rpl_handler.h
When some error caused the server to exit before calling
delegates_init(), transaction_delegate, etc, were not initialzed,
this would cause segmental fault when calling delegates_destroy
because the latter does not check if the objects were NULL or not.
Fixed the problem by only calling destruction on these objects if
they are not NULL.
modified:
sql/rpl_handler.cc
=== modified file 'sql/rpl_handler.cc'
--- a/sql/rpl_handler.cc 2009-01-27 02:08:48 +0000
+++ b/sql/rpl_handler.cc 2009-03-13 08:57:47 +0000
@@ -115,11 +115,15 @@ int delegates_init()
void delegates_destroy()
{
- transaction_delegate->~Trans_delegate();
- binlog_storage_delegate->~Binlog_storage_delegate();
+ if (transaction_delegate)
+ transaction_delegate->~Trans_delegate();
+ if (binlog_storage_delegate)
+ binlog_storage_delegate->~Binlog_storage_delegate();
#ifdef HAVE_REPLICATION
- binlog_transmit_delegate->~Binlog_transmit_delegate();
- binlog_relay_io_delegate->~Binlog_relay_IO_delegate();
+ if (binlog_transmit_delegate)
+ binlog_transmit_delegate->~Binlog_transmit_delegate();
+ if (binlog_relay_io_delegate)
+ binlog_relay_io_delegate->~Binlog_relay_IO_delegate();
#endif /* HAVE_REPLICATION */
}
| Thread |
|---|
| • bzr commit into mysql-6.0-bugteam branch (zhenxing.he:3115) Bug#42244 | He Zhenxing | 13 Mar |