Restore MySQL 5.6.10 change for "15847447"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.6 |
Fix Released
|
High
|
Laurynas Biveinis |
Bug Description
A combination of a revert of MariaDB rpl_mdev382 fix and a fix for https:/
+++ /Users/
@@ -318,9 +318,7 @@
# The DELETE statement should be correctly quoted
include/
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Query # # BEGIN
master-bin.000002 # Query # # use `test`; DELETE FROM `db1``; select 'oops!'`.`t``1`
-master-bin.000002 # Query # # COMMIT
include/
# The table should be empty on the slave also.
i.e. different binlogging for a MEMORY table replication reset upon master server restart.
Source code shows that this difference is due to upstream setting direct = TRUE and PS w/ MariaDB fix direct = FALSE for
if (thd->binlog_
in open_table_
Thus PS has effectively reverted the upstream revision [1] released in 5.6.10. We mismerged it, partly because it was lacking a testcase.
A revert of MariaDB fix will fix this, with a testcase re-record.
[1]
$ bzr log -r 4591.1.77
-------
revno: 4591.1.77
committer: Ahmad Abdullateef<email address hidden>
branch nick: mysql-5.6-bug15847447
timestamp: Mon 2012-11-26 18:52:00 +0530
message:
BUG#15847447 - THD->TRANSACTIO
|| (THD->STATE_FLAGS & OPEN_TABLES_
DESCRIPTION:
When a view is based on a Heap (In memory) backed table and this
Table is altered to drop some field which was in use by the view, then
a SELECT on this view results in an ASSETION failure when the server
is started with Bin-Log enabled.
ANALYSIS :
The triggered assert in open_normal_
the current statement transaction is empty if something fails during
opening of tables and handling of derived tables. This makes sure that
there is nothing that the statement has done that needs to be rolled
back at this point.
The reason that the assert is triggered in this case is that a
statement transaction is started by THD::binlog_query() during
open_tables() -> open_table_
HEAP table for the first time, subsequently mysql_handle_
fails while processing the view since a column has disappeared.
FIX :
During implicit_emptied processing in the call to THD::binlog_query() direct
is set to TRUE, as a result the event is immediately written to the log bypassing
a transaction, hence the assert is not triggered.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 1997 lines (+459/-572)23 files modifiedclient/sql_string.cc (+0/-44)
client/sql_string.h (+0/-10)
mysql-test/suite/rpl/r/rpl_mdev382.result (+0/-2)
sql/binlog.cc (+8/-6)
sql/ha_ndbcluster_binlog.cc (+31/-17)
sql/item.cc (+0/-16)
sql/item.h (+0/-4)
sql/item_func.cc (+2/-2)
sql/item_func.h (+1/-1)
sql/log_event.cc (+225/-260)
sql/log_event.h (+25/-28)
sql/log_event_old.cc (+1/-1)
sql/log_event_old.h (+1/-1)
sql/sql_base.cc (+15/-31)
sql/sql_db.cc (+42/-21)
sql/sql_load.cc (+43/-32)
sql/sql_select.cc (+0/-1)
sql/sql_show.cc (+39/-7)
sql/sql_show.h (+1/-1)
sql/sql_string.cc (+10/-61)
sql/sql_string.h (+0/-10)
sql/sql_truncate.cc (+14/-15)
sql/sql_yacc.yy (+1/-1)
tags: | added: merge-regression |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-806