Commit 9ea02899 authored by kevg's avatar kevg Committed by Aleksey Midenkov

SQL: nested equi-join for versioned table [fixes #150]

parent a37cf525
......@@ -425,6 +425,9 @@ select * from t1 natural join vt1;
a
1
drop view vt1;
create or replace table t1(x int) with system versioning;
select * from (t1 as r left join t1 as u using (x)), t1;
x x
drop table t1, t2;
call verify_vtq;
No A B C D
......
......@@ -148,6 +148,9 @@ create view vt1 as select a from t1;
select * from t1 natural join vt1;
drop view vt1;
create or replace table t1(x int) with system versioning;
select * from (t1 as r left join t1 as u using (x)), t1;
drop table t1, t2;
call verify_vtq;
......
......@@ -835,10 +835,10 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
if ((table->is_derived() && !table->is_recursive_with_table()) ||
table->join_columns)
{
row_start= newx Item_field(thd, &slex->context, NULL, NULL,
row_start= newx Item_field(thd, &slex->context, table->db, table->alias,
fstart->field_name);
row_end=
newx Item_field(thd, &slex->context, NULL, NULL, fend->field_name);
row_end= newx Item_field(thd, &slex->context, table->db, table->alias,
fend->field_name);
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment