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
is an actual PS bug:
int
mysql_execute_command(THD *thd)
{
...
struct system_variables *per_query_variables_backup;
...
if (this or that) goto error;
...
if (lex->set_statement && !lex->var_list.is_empty()) {
per_query_variables_backup= copy_system_variables(&thd->variables, thd->m_enable_plugins);
...
error:
...
if (lex->set_statement && !lex->var_list.is_empty()) {
...
free_system_variables(&thd->variables, thd->m_enable_plugins);
thd->variables= *per_query_variables_backup;
my_free(per_query_variables_backup);
...
}
So, in case of "this or that" we end up with corrupted thd->variables going forward, and this might be the cause of numerous SET STATEMENT crashes: bug 1387951, bug 1417028, bug 1416975, bug 1416956, etc, etc, etc, see the set-statement bug tag.
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*)': 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
07:37:58 /home/jenkins/
is an actual PS bug:
int command( THD *thd) variables_ backup; list.is_ empty() ) { query_variables _backup= copy_system_ variables( &thd->variables ,
thd- >m_enable_ plugins) ; list.is_ empty() ) { system_ variables( &thd->variables , thd->m_ enable_ plugins) ; variables_ backup; free(per_ query_variables _backup) ;
mysql_execute_
{
...
struct system_variables *per_query_
...
if (this or that) goto error;
...
if (lex->set_statement && !lex->var_
per_
...
error:
...
if (lex->set_statement && !lex->var_
...
free_
thd->variables= *per_query_
my_
...
}
So, in case of "this or that" we end up with corrupted thd->variables going forward, and this might be the cause of numerous SET STATEMENT crashes: bug 1387951, bug 1417028, bug 1416975, bug 1416956, etc, etc, etc, see the set-statement bug tag.