lp:~laurynas-biveinis/percona-server/bug1387951

Created by Laurynas Biveinis on 2015-02-04 and last modified on 2015-02-04
Get this branch:
bzr branch lp:~laurynas-biveinis/percona-server/bug1387951
Only Laurynas Biveinis can upload to this branch. If you are Laurynas Biveinis please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

735. By Laurynas Biveinis on 2015-02-04

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.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-server/5.6
This branch contains Public information 
Everyone can see this information.