fix of the small bug in UNION's
mysql-test/r/heap_btree.result: I donno why this changed, aint my fault sql/sql_union.cc: fix of the small bug
This commit is contained in:
parent
61122db525
commit
620b2e6e8b
@ -73,8 +73,8 @@ type=heap;
|
|||||||
insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6);
|
insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6);
|
||||||
select * from t1 where x=1;
|
select * from t1 where x=1;
|
||||||
x y
|
x y
|
||||||
1 1
|
|
||||||
1 3
|
1 3
|
||||||
|
1 1
|
||||||
select * from t1,t1 as t2 where t1.x=t2.y;
|
select * from t1,t1 as t2 where t1.x=t2.y;
|
||||||
x y x y
|
x y x y
|
||||||
1 1 1 1
|
1 1 1 1
|
||||||
|
@ -109,7 +109,7 @@ int st_select_lex_unit::prepare(THD *thd, select_result *result)
|
|||||||
if (prepared)
|
if (prepared)
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
prepared= 1;
|
prepared= 1;
|
||||||
|
union_result=0;
|
||||||
describe=(first_select()->options & SELECT_DESCRIBE) ? 1 : 0;
|
describe=(first_select()->options & SELECT_DESCRIBE) ? 1 : 0;
|
||||||
res= 0;
|
res= 0;
|
||||||
found_rows_for_union= false;
|
found_rows_for_union= false;
|
||||||
@ -309,10 +309,12 @@ int st_select_lex_unit::exec()
|
|||||||
int st_select_lex_unit::cleanup()
|
int st_select_lex_unit::cleanup()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("st_select_lex_unit::cleanup");
|
DBUG_ENTER("st_select_lex_unit::cleanup");
|
||||||
delete union_result;
|
if (union_result)
|
||||||
free_tmp_table(thd,table);
|
{
|
||||||
table= 0; // Safety
|
delete union_result;
|
||||||
|
free_tmp_table(thd,table);
|
||||||
|
table= 0; // Safety
|
||||||
|
}
|
||||||
List_iterator<JOIN*> j(joins);
|
List_iterator<JOIN*> j(joins);
|
||||||
JOIN** join;
|
JOIN** join;
|
||||||
while ((join= j++))
|
while ((join= j++))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user