Merge lp://staging/~laurynas-biveinis/percona-server/bug1387951 into lp://staging/percona-server/5.6

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 736
Proposed branch: lp://staging/~laurynas-biveinis/percona-server/bug1387951
Merge into: lp://staging/percona-server/5.6
Diff against target: 150 lines (+82/-6)
3 files modified
mysql-test/r/percona_statement_set.result (+29/-2)
mysql-test/t/percona_statement_set.test (+48/-2)
sql/sql_parse.cc (+5/-2)
To merge this branch: bzr merge lp://staging/~laurynas-biveinis/percona-server/bug1387951
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+248575@code.staging.launchpad.net

Description of the change

Fix SET STATEMENT ... FOR <statement> crashes:
1) if <statement> needs to commit implicitly and fails (bug 1418049);
2) if <statement> is RW in a RO transaction (bug 1387951);
3) if <statement> is needs to reopen a temp table and fails (bug 1412423).

All three bugs are related and caused by mysql_execute_command jumping
over to an error exit (one goto per each bug) and thus skipping
per_query_variables_backup variable initialization. But the cleanup of
restoring thd->variables from the uninitialzied variable still
happened. Fixed trivially.

This bug was also indicated by a compilation warning:

07:37:58 /home/jenkins/workspace/percona-server-5.6-debian-binary-32/label_exp/debian6-32/percona-server-5.6-5.6.22-71.0/sql/sql_parse.cc: In function 'int mysql_execute_command(THD*)':
07:37:58
/home/jenkins/workspace/percona-server-5.6-debian-binary-32/label_exp/debian6-32/percona-server-5.6-5.6.22-71.0/sql/sql_parse.cc:2609:
error: 'per_query_variables_backup' may be used uninitialized in this
function

fixing which is part of bug 1408232.

Added testcases.

http://jenkins.percona.com/job/percona-server-5.6-param/805/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches