From 79a23f7466e99ebfd872d213c4abbd99d448f8ab Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Mar 2005 08:36:48 +0200 Subject: fixed union types merging and table related metadata (BUG#8824) mysql-test/r/func_group.result: new result mysql-test/r/metadata.result: new result test of metadata of variables, unions and derived tables mysql-test/r/union.result: new results test of union of enum mysql-test/t/metadata.test: test of metadata of variables, unions and derived tables mysql-test/t/union.test: test of union of enum sql/field.cc: Field type merging rules added Fixed table name/alias returting for field made from temporary tables sql/field.h: removed unned field type reporting sql/item.cc: fixed bug in NEW_DATE type field creartion replaced mechanism of merging types of UNION sql/item.h: replaced mechanism of merging types of UNION sql/item_func.h: new item type to make correct field type detection possible sql/item_subselect.cc: added table name parameter to prepare() to show right table alias for derived tables sql/sql_derived.cc: added table name parameter to prepare() to show right table alias for derived tables sql/sql_lex.h: added table name parameter to prepare() to show right table alias for derived tables sql/sql_parse.cc: made function for enum/set pack length calculation sql/sql_prepare.cc: added table name parameter to prepare() to show right table alias for derived tables sql/sql_select.cc: new temporary table field creation by Item_type_holder fixed table alias for temporary table sql/sql_union.cc: added table name parameter to prepare() to show right table alias for derived tables --- sql/sql_derived.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/sql_derived.cc') diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 3e627243b9f..e9f9b432c21 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -123,7 +123,7 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, DBUG_RETURN(1); // out of memory // st_select_lex_unit::prepare correctly work for single select - if ((res= unit->prepare(thd, derived_result, 0))) + if ((res= unit->prepare(thd, derived_result, 0, org_table_list->alias))) goto exit; @@ -161,7 +161,7 @@ static int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, if (is_union) { // execute union without clean up - if (!(res= unit->prepare(thd, derived_result, SELECT_NO_UNLOCK))) + if (!(res= unit->prepare(thd, derived_result, SELECT_NO_UNLOCK, ""))) res= unit->exec(); } else -- cgit v1.2.1