Fixed bug #27937: crash for the the second execution of a prepared
statement from a UNION query with ORDER BY an expression containing RAND(). The crash happened because the global order by list in the union query was not re-initialized for execution. (Local order by lists were re-initialized though). mysql-test/r/ps.result: Added a test case for bug #27937. mysql-test/t/ps.test: Added a test case for bug #27937. sql/sql_union.cc: Fixed bug #27937: crash for the the second execution of a prepared statement from a UNION query with ORDER BY an expression containing RAND(). The crash happened because the global order by list in the union query was not re-initialized for execution. (Local order by lists were re-initialized though). Added re-initialization of the global order by list in the function st_select_lex_unit::init_prepare_fake_select_lex.
Showing
Please register or sign in to comment