Commit 92c7a871 authored by kevg's avatar kevg Committed by Aleksey Midenkov

Misc: vers_setup_select() Item_field ctor fix

Related to #150
parent 77f23b3e
...@@ -827,24 +827,13 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr, ...@@ -827,24 +827,13 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
dst_cond= &table->on_expr; dst_cond= &table->on_expr;
} }
Field *fstart= table->table->vers_start_field(); const char *fstart= table->table->vers_start_field()->field_name;
Field *fend= table->table->vers_end_field(); const char *fend= table->table->vers_end_field()->field_name;
Item *row_start= NULL; Item *row_start=
Item *row_end= NULL; newx Item_field(thd, &slex->context, table->db, table->alias, fstart);
if ((table->is_derived() && !table->is_recursive_with_table()) || Item *row_end=
table->join_columns) newx Item_field(thd, &slex->context, table->db, table->alias, fend);
{
row_start= newx Item_field(thd, &slex->context, table->db, table->alias,
fstart->field_name);
row_end= newx Item_field(thd, &slex->context, table->db, table->alias,
fend->field_name);
}
else
{
row_start= newx Item_field(thd, &slex->context, fstart);
row_end= newx Item_field(thd, &slex->context, fend);
}
Item *row_end2= row_end; Item *row_end2= row_end;
if (table->table->versioned_by_sql()) if (table->table->versioned_by_sql())
......
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