mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
return table list of fake_select in empty state to prevent using TABLE_LIST allocated on stack in next execution of PS (Bug #3577)
sql/sql_union.cc: return table list of fake_select in empty state to prevent using TABLE_LIST allocated on stack in next execution of PS tests/client_test.c: test of UNIONS with PS
This commit is contained in:
@@ -401,7 +401,10 @@ int st_select_lex_unit::exec()
|
||||
*/
|
||||
if (!(fake_select_lex->join= new JOIN(thd, item_list, thd->options,
|
||||
result)))
|
||||
{
|
||||
fake_select_lex->table_list.empty();
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
Fake st_select_lex should have item list for correctref_array
|
||||
@@ -427,6 +430,8 @@ int st_select_lex_unit::exec()
|
||||
(ORDER*) NULL, NULL, (ORDER*) NULL,
|
||||
options_tmp | SELECT_NO_UNLOCK,
|
||||
result, this, fake_select_lex);
|
||||
|
||||
fake_select_lex->table_list.empty();
|
||||
if (!res)
|
||||
thd->limit_found_rows = (ulonglong)table->file->records + add_rows;
|
||||
/*
|
||||
|
Reference in New Issue
Block a user