1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

keep old engine & JOIN if we changed subquery Item (Bug #3646)

This commit is contained in:
bell@sanja.is.com.ua
2004-05-07 23:06:11 +03:00
parent 5c4f83bbd9
commit d2fa79b291
11 changed files with 291 additions and 20 deletions

View File

@ -555,3 +555,32 @@ void st_select_lex_unit::reinit_exec_mechanism()
}
#endif
}
/*
change select_result object of unit
SYNOPSIS
st_select_lex_unit::change_result()
result new select_result object
old_result old select_result object
RETURN
0 - OK
-1 - error
*/
int st_select_lex_unit::change_result(select_subselect *result,
select_subselect *old_result)
{
int res= 0;
for (SELECT_LEX *sl= first_select_in_union(); sl; sl= sl->next_select())
{
if (sl->join && sl->join->result == old_result)
if ((res= sl->join->change_result(result)))
return (res);
}
if (fake_select_lex && fake_select_lex->join)
res= fake_select_lex->join->change_result(result);
return (res);
}