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

avoiding coping tmptable_param

This commit is contained in:
bell@sanja.is.com.ua
2003-11-26 20:12:26 +02:00
parent 5a7514643f
commit 908bc22217
2 changed files with 5 additions and 6 deletions

View File

@@ -128,14 +128,14 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
cursor->table->clear_query_id= 1;
}
bzero((char*) &tmp_table_param,sizeof(tmp_table_param));
tmp_table_param.field_count= unit->types.elements;
bzero((char*) &derived_result->tmp_table_param, sizeof(tmp_table_param));
derived_result->tmp_table_param.field_count= unit->types.elements;
/*
Temp table is created so that it hounours if UNION without ALL is to be
processed
*/
if (!(table= create_tmp_table(thd, &tmp_table_param, unit->types,
(ORDER*) 0,
if (!(table= create_tmp_table(thd, &derived_result->tmp_table_param,
unit->types, (ORDER*) 0,
is_union && !unit->union_option, 1,
(first_select->options | thd->options |
TMP_TABLE_ALL_COLUMNS),
@@ -146,7 +146,6 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
goto exit;
}
derived_result->set_table(table);
derived_result->tmp_table_param=tmp_table_param;
unit->offset_limit_cnt= first_select->offset_limit;
unit->select_limit_cnt= first_select->select_limit+