summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-11-26 20:12:26 +0200
committerunknown <bell@sanja.is.com.ua>2003-11-26 20:12:26 +0200
commit358799ecf75912539c498e082b56d3a2a920b392 (patch)
treee7f7dcf48754d0604761ed8689802393955473de /sql/sql_derived.cc
parent4f19b5776b343f28e16d592caadd541bc2f1f3e2 (diff)
downloadmariadb-git-358799ecf75912539c498e082b56d3a2a920b392.tar.gz
avoiding coping tmptable_param
sql/sql_union.cc: fixed layout
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 20a1f7f0124..2de56d715ea 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -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+