summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl_ndb/r
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
commit3fad4e8df1281c43d4fd343d3107b0a8e52c2327 (patch)
treec5dd369b1ce37b5593c4e71c573287b9c6916e3d /mysql-test/suite/rpl_ndb/r
parenteb79ef1535f092a2e3fee9cf514ff0c581de0bd2 (diff)
downloadmariadb-git-3fad4e8df1281c43d4fd343d3107b0a8e52c2327.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); mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result: Augmented test case to check mixed statements mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test: Augmented test case to check mixed statements sql/share/errmsg-utf8.txt: Added ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE sql/sql_class.cc: Redefined flags' name in order to have two sets of flags: (i) flags that are checked when there is a write operation; (ii) flags that are checked regardless of the type of the operation. Classified 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); sql/sql_lex.cc: Added error ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE sql/sql_lex.h: Added BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE
Diffstat (limited to 'mysql-test/suite/rpl_ndb/r')
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
index da60b0bbbbf..7caa88a16a1 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
@@ -341,6 +341,25 @@ ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SET AUTOCOMMIT = 1;
+---- Mixed statements Innodb ----
+BEGIN;
+INSERT INTO tndb VALUES (147);
+INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+COMMIT;
+INSERT INTO tndb VALUES (148);
+BEGIN;
+INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+INSERT INTO tndb VALUES (149);
+COMMIT;
+BEGIN;
+INSERT INTO tndb VALUES (150);
+INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+COMMIT;
+INSERT INTO tndb VALUES (151);
+BEGIN;
+INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+INSERT INTO tndb VALUES (152);
+COMMIT;
==== Verify the result ====
SELECT * FROM tmyisam ORDER BY a;
a
@@ -393,6 +412,8 @@ a
140
142
146
+150
+151
SELECT * FROM tinnodb ORDER BY a;
a
1
@@ -420,6 +441,8 @@ a
120
125
127
+147
+148
SELECT * FROM tndb ORDER BY a;
a
2
@@ -447,6 +470,12 @@ a
121
123
126
+147
+148
+149
+150
+151
+152
[on slave]
Comparing tables master:test.tmyisam and slave:test.tmyisam
Comparing tables master:test.tinnodb and slave:test.tinnodb