Merge branch '2.2' into 2.3

This commit is contained in:
Johan Wikman
2018-12-04 11:23:31 +02:00
3 changed files with 33 additions and 4 deletions

View File

@ -829,6 +829,7 @@ static uint32_t resolve_query_type(parsing_info_t* pi, THD* thd)
}
else if (lex->option_type == OPT_SESSION)
{
bool do_return = true;
/**
* SHOW syntax http://dev.mysql.com/doc/refman/5.6/en/show.html
*/
@ -872,10 +873,16 @@ static uint32_t resolve_query_type(parsing_info_t* pi, THD* thd)
}
else
{
type |= QUERY_TYPE_READ;
// This will cause the type of a statement like
// "SET STATEMENT ... FOR XYZ" to be the type
// of XYZ.
do_return = false;
}
goto return_qtype;
if (do_return)
{
goto return_qtype;
}
}
/**

View File

@ -112,3 +112,6 @@ SET STATEMENT max_statement_time=30 FOR SELECT seq FROM seq_0_to_100000;
# MXS-1935
PREPARE a FROM @sql;
# MXS-2207
SET STATEMENT max_statement_time=30 FOR UPDATE tbl SET a = 42;