summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-07-30 19:02:21 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-07-30 19:02:21 +0300
commite5fd6b3c71d3ac5c0d0f2d46cdc301dc99390022 (patch)
tree7da108a5ff817f9b4aec681922a904983e5f804b /sql/log.cc
parentc0b65fb77dcb7010056dff7e476b7397dd912c89 (diff)
parent1307d3b8033985d842b900ec8ebe7be9f0a4e092 (diff)
downloadmariadb-git-e5fd6b3c71d3ac5c0d0f2d46cdc301dc99390022.tar.gz
(Pushing for Andrei)
Merge magare.gmz:/home/kgeorge/mysql/work/B27417-5.0-opt into magare.gmz:/home/kgeorge/mysql/work/B27417-5.1-opt mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_table.cc: Auto merged mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: merge of bug 27471 from 5.0-opt to 5.1-opt sql/log.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/set_var.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sp_head.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_delete.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_insert.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_load.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_parse.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_update.cc: merge of bug 27471 from 5.0-opt to 5.1-opt
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 0bf77d68410..415f98fd406 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1609,7 +1609,8 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all)
table. Such cases should be rare (updating a
non-transactional table inside a transaction...)
*/
- if (unlikely(thd->no_trans_update.all || (thd->options & OPTION_KEEP_LOG)))
+ if (unlikely(thd->transaction.all.modified_non_trans_table ||
+ (thd->options & OPTION_KEEP_LOG)))
{
Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE);
qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE)
@@ -1663,7 +1664,8 @@ static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv)
non-transactional table. Otherwise, truncate the binlog cache starting
from the SAVEPOINT command.
*/
- if (unlikely(thd->no_trans_update.all || (thd->options & OPTION_KEEP_LOG)))
+ if (unlikely(thd->transaction.all.modified_non_trans_table ||
+ (thd->options & OPTION_KEEP_LOG)))
{
int error=
thd->binlog_query(THD::STMT_QUERY_TYPE,
@@ -4094,6 +4096,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event)
/* NULL would represent nothing to replicate after ROLLBACK */
DBUG_ASSERT(commit_event != NULL);
+ DBUG_ASSERT(is_open());
if (likely(is_open())) // Should always be true
{
/*