1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

supported possiblity of item substitute (fixed bug) in setup_fields

more efficient reference creation
fixed table_name of Field in temporary table


mysql-test/r/subselect.result:
  test of 2 references bugs
mysql-test/t/subselect.test:
  test of 2 references bugs
sql/field.h:
  fixed layout
  fixed table name of fields of temporary table (derived table)
sql/item.cc:
  more efficient reference creation
sql/sql_base.cc:
  fixed layout
  supported possiblity of item substitute (fixed bug)
This commit is contained in:
unknown
2002-11-25 01:38:56 +02:00
parent 06e647472f
commit b5b19a7877
5 changed files with 23 additions and 6 deletions

View File

@ -2061,9 +2061,9 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields,
if (item->type() == Item::FIELD_ITEM &&
((Item_field*) item)->field_name[0] == '*')
{
uint elem=fields.elements;
uint elem= fields.elements;
if (insert_fields(thd,tables,((Item_field*) item)->db_name,
((Item_field*) item)->table_name,&it))
((Item_field*) item)->table_name, &it))
DBUG_RETURN(-1); /* purecov: inspected */
if (sum_func_list)
{
@ -2079,6 +2079,7 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List<Item> &fields,
{
if (item->fix_fields(thd, tables, it.ref()))
DBUG_RETURN(-1); /* purecov: inspected */
item= *(it.ref()); //Item can be chenged in fix fields
if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM &&
sum_func_list)
item->split_sum_func(*sum_func_list);