1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #32858: Erro: "Incorrect usage of UNION and INTO" does not take

subselects into account
  
It is forbidden to use the SELECT INTO construction inside UNION statements
unless on the last SELECT of the union. The parser records whether it 
has seen INTO or not when parsing a UNION statement. But if the INTO was
legally used in an outer query, an error is thrown if UNION is seen in a
subquery. Fixed in 5.0 by remembering the nesting level of INTO tokens and 
mitigate the error unless it collides with the UNION.
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2008-05-13 18:10:46 +03:00
parent e6b8470d56
commit f6951f3e9f
5 changed files with 152 additions and 9 deletions

View File

@@ -1430,6 +1430,7 @@ void THD::rollback_item_tree_changes()
select_result::select_result()
{
thd=current_thd;
nest_level= -1;
}
void select_result::send_error(uint errcode,const char *err)