summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-07-03 10:36:37 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-07-03 10:36:37 +0300
commit841cf4053257a96eafb203eeea796bc44a8d9330 (patch)
tree6921edd366c58e3fe6fc1d60c962db19a2130e88 /sql/log.cc
parent69f82e256378eb4a3c1ed5d193e203c959e974b8 (diff)
downloadmariadb-git-841cf4053257a96eafb203eeea796bc44a8d9330.tar.gz
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. sql/log.cc: Bug #28983: can't reliably check if bin_log is open outside of its mutex
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 818828f9557..dd989ebd76d 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -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