Bug #28983: 'reset master' in multiple threads and innodb tables

asserts debug binary

We can't reliably check if the binary log is opened without 
acquiring its mutex. 
Fixed by removing this check.
parent 8209199c
......@@ -85,7 +85,7 @@ bool binlog_init()
static int binlog_close_connection(THD *thd)
{
IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
DBUG_ASSERT(mysql_bin_log.is_open() && !my_b_tell(trans_log));
DBUG_ASSERT(!my_b_tell(trans_log));
close_cached_file(trans_log);
my_free((gptr)trans_log, MYF(0));
return 0;
......@@ -126,7 +126,7 @@ static int binlog_commit(THD *thd, bool all)
{
IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
DBUG_ENTER("binlog_commit");
DBUG_ASSERT(mysql_bin_log.is_open() &&
DBUG_ASSERT(
(all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))));
if (my_b_tell(trans_log) == 0)
......@@ -155,7 +155,7 @@ static int binlog_rollback(THD *thd, bool all)
unnecessary, doing extra work. The cause should be found and eliminated
*/
DBUG_ASSERT(all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)));
DBUG_ASSERT(mysql_bin_log.is_open() && my_b_tell(trans_log));
DBUG_ASSERT(my_b_tell(trans_log));
/*
Update the binary log with a BEGIN/ROLLBACK block if we have
cached some queries and we updated some non-transactional
......@@ -198,7 +198,7 @@ static int binlog_savepoint_set(THD *thd, void *sv)
{
IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
DBUG_ENTER("binlog_savepoint_set");
DBUG_ASSERT(mysql_bin_log.is_open() && my_b_tell(trans_log));
DBUG_ASSERT(my_b_tell(trans_log));
*(my_off_t *)sv= my_b_tell(trans_log);
/* Write it to the binary log */
......@@ -210,7 +210,7 @@ static int binlog_savepoint_rollback(THD *thd, void *sv)
{
IO_CACHE *trans_log= (IO_CACHE*)thd->ha_data[binlog_hton.slot];
DBUG_ENTER("binlog_savepoint_rollback");
DBUG_ASSERT(mysql_bin_log.is_open() && my_b_tell(trans_log));
DBUG_ASSERT(my_b_tell(trans_log));
/*
Write ROLLBACK TO SAVEPOINT to the binlog cache if we have updated some
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment