Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f438d08a
Commit
f438d08a
authored
May 09, 2010
by
Alfranio Correia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
455f754e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
0 deletions
+70
-0
mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
...suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
+37
-0
mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
...t/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
+23
-0
sql/sql_base.cc
sql/sql_base.cc
+10
-0
No files found.
mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
View file @
f438d08a
...
@@ -341,6 +341,33 @@ ROLLBACK;
...
@@ -341,6 +341,33 @@ ROLLBACK;
Warnings:
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SET AUTOCOMMIT = 1;
SET AUTOCOMMIT = 1;
---- Mixed statements Innodb ----
BEGIN;
INSERT INTO tndb VALUES (147);
INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
COMMIT;
INSERT INTO tndb VALUES (148);
BEGIN;
INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO tndb VALUES (149);
COMMIT;
BEGIN;
INSERT INTO tndb VALUES (150);
INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
COMMIT;
INSERT INTO tndb VALUES (151);
BEGIN;
INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO tndb VALUES (152);
COMMIT;
==== Verify the result ====
==== Verify the result ====
SELECT * FROM tmyisam ORDER BY a;
SELECT * FROM tmyisam ORDER BY a;
a
a
...
@@ -393,6 +420,8 @@ a
...
@@ -393,6 +420,8 @@ a
140
140
142
142
146
146
150
151
SELECT * FROM tinnodb ORDER BY a;
SELECT * FROM tinnodb ORDER BY a;
a
a
1
1
...
@@ -420,6 +449,8 @@ a
...
@@ -420,6 +449,8 @@ a
120
120
125
125
127
127
147
148
SELECT * FROM tndb ORDER BY a;
SELECT * FROM tndb ORDER BY a;
a
a
2
2
...
@@ -447,6 +478,12 @@ a
...
@@ -447,6 +478,12 @@ a
121
121
123
123
126
126
147
148
149
150
151
152
[on slave]
[on slave]
Comparing tables master:test.tmyisam and slave:test.tmyisam
Comparing tables master:test.tmyisam and slave:test.tmyisam
Comparing tables master:test.tinnodb and slave:test.tinnodb
Comparing tables master:test.tinnodb and slave:test.tinnodb
...
...
mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
View file @
f438d08a
...
@@ -415,6 +415,29 @@ ROLLBACK;
...
@@ -415,6 +415,29 @@ ROLLBACK;
SET
AUTOCOMMIT
=
1
;
SET
AUTOCOMMIT
=
1
;
--
echo
----
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
;
--
echo
====
Verify
the
result
====
--
echo
====
Verify
the
result
====
...
...
sql/sql_base.cc
View file @
f438d08a
...
@@ -5183,6 +5183,16 @@ int decide_logging_format(THD *thd, TABLE_LIST *tables)
...
@@ -5183,6 +5183,16 @@ int decide_logging_format(THD *thd, TABLE_LIST *tables)
thd
->
variables
.
binlog_format
));
thd
->
variables
.
binlog_format
));
DBUG_PRINT
(
"info"
,
(
"multi_engine: %s"
,
DBUG_PRINT
(
"info"
,
(
"multi_engine: %s"
,
multi_engine
?
"TRUE"
:
"FALSE"
));
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
;
int
error
=
0
;
if
(
flags_all_set
==
0
)
if
(
flags_all_set
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment