summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2010-05-09 23:45:25 +0100
committerAlfranio Correia <alfranio.correia@sun.com>2010-05-09 23:45:25 +0100
commitf438d08aeeaeb263ae024e5a43a46a46c2a7ce38 (patch)
tree611b0494224847e2be5a1cdd101562653016f1d8 /sql
parent455f754e6ba4de3d3b527aad6ac317b7e5994b86 (diff)
downloadmariadb-git-f438d08aeeaeb263ae024e5a43a46a46c2a7ce38.tar.gz
BUG#49019 Mixing self-logging eng. and regular eng. does not switch to row in mixed mode
Backport of the patch for 5.1-bugteam.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_base.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 0e70eb93725..9e38a4142eb 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5183,6 +5183,16 @@ int decide_logging_format(THD *thd, TABLE_LIST *tables)
thd->variables.binlog_format));
DBUG_PRINT("info", ("multi_engine: %s",
multi_engine ? "TRUE" : "FALSE"));
+ /*
+ Reading from a self-logging engine and updating another engine
+ generates changes that are written to the binary log in the
+ statement format and may make slaves to diverge. In the mixed
+ mode, such changes should be written to the binary log in the
+ row format.
+ */
+ if (multi_engine &&
+ (flags_some_set & HA_HAS_OWN_BINLOGGING))
+ thd->lex->set_stmt_unsafe();
int error= 0;
if (flags_all_set == 0)