summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-04-03 21:19:13 +0300
committerunknown <heikki@hundin.mysql.fi>2003-04-03 21:19:13 +0300
commitecd9e7129186ca1b8617c183a7cb2950ecaa0a78 (patch)
tree167b3e9c3742c4578ef2bf009ba9447aabf11428 /sql/log.cc
parent36140349a40dac10792bc8077a3f318d61e8411b (diff)
downloadmariadb-git-ecd9e7129186ca1b8617c183a7cb2950ecaa0a78.tar.gz
log.cc:
Fix bug number 224: do not call ha_report_binlog_offset_and_commit() when a MyISAM table is updated; this also makes CREATE TABLE not to commit an InnoDB transaction, even when binlogging is enabled sql/log.cc: Fix bug number 224: do not call ha_report_binlog_offset_and_commit() when a MyISAM table is updated; this also makes CREATE TABLE not to commit an InnoDB transaction, even when binlogging is enabled
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 1e903613300..a2ed2b05d4e 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1120,9 +1120,16 @@ bool MYSQL_LOG::write(Log_event* event_info)
the table handler commit here, protected by the LOCK_log mutex,
because otherwise the transactions may end up in a different order
in the table handler log!
+
+ Note that we will NOT call ha_report_binlog_offset_and_commit() if
+ there are binlog events cached in the transaction cache. That is
+ because then the log event which we write to the binlog here is
+ not a transactional event. In versions < 4.0.13 before this fix this
+ caused an InnoDB transaction to be committed if in the middle there
+ was a MyISAM event!
*/
- if (file == &log_file)
+ if (file == &log_file && !my_b_tell(&thd->transaction.trans_log))
{
/*
LOAD DATA INFILE in AUTOCOMMIT=1 mode writes to the binlog