summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2010-02-22 03:25:33 +0000
committerAlfranio Correia <alfranio.correia@sun.com>2010-02-22 03:25:33 +0000
commit7194aec8ba29371be796bd4b42773fd692a1123c (patch)
treec5dd369b1ce37b5593c4e71c573287b9c6916e3d /sql/sql_lex.h
parent36d6330aa12ff3cbe50136c16833851a5ba44f4f (diff)
downloadmariadb-git-7194aec8ba29371be796bd4b42773fd692a1123c.tar.gz
BUG#49019 Mixing self-logging eng. and regular eng. does not switch to row in mixed mode
Reading from a self-logging engine and updating a transactional engine such as Innodb generates changes that are written to the binary log in the statement format and may make slaves diverge. In the mixed mode, such changes should be written to the binary log in the row format. Note that the issue does not happen if we mix a self-logging engine and MyIsam as this case is caught by checking the mixture of non-transactional and transactional engines. So, we classify a mixed statement where one reads from NDB and writes into another engine as unsafe: if (multi_engine && flags_some_set & HA_HAS_OWN_BINLOGGING) lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE);
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 7ec87806ea5..45a86464b5a 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1141,6 +1141,12 @@ public:
*/
BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS,
+ /**
+ Mixing self-logging and non-self-logging engines in a statement
+ is unsafe.
+ */
+ BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE,
+
/* The last element of this enumeration type. */
BINLOG_STMT_UNSAFE_COUNT
};