Add optional causality check to autocommit UPDATE/DELETE statements
Bug #1277053 reported by
Alex Yurchenko
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
Fix Committed
|
Critical
|
Yan Zhang | |||
5.6 |
Fix Released
|
Critical
|
Yan Zhang | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
While not doing causality check on UPDATE / DELETE does not return outdated values, it still can break application logic in that the statement may go ineffective because of the missing row. Note that this won't return a deadlock error (Query OK, 0 rows affected) so the application has no hint to retry the statement.
Related branches
lp://staging/~yan.zhang/codership-mysql/5.5
- Alex Yurchenko: Needs Fixing
-
Diff: 292 lines (+88/-17)8 files modifiedsql/sql_class.h (+1/-0)
sql/sql_parse.cc (+33/-5)
sql/sys_vars.cc (+14/-2)
sql/transaction.cc (+1/-1)
sql/wsrep_mysqld.cc (+6/-4)
sql/wsrep_mysqld.h (+10/-1)
sql/wsrep_var.cc (+21/-3)
sql/wsrep_var.h (+2/-1)
To post a comment you must log in.
I think the current causality logic is more or less m/^select/i ?
I'd argue that this maybe should be extended to any statement starting a transaction (autocommit or not) so the read view is opened after the apply queue is flushed. Not sure how hard that is though...