From 45b145a96e9a5992b8a5c8a0a1a23d99951058ca Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Aug 2003 15:04:49 +0300 Subject: fixed problem with reference on derived table fields (BUG#1031) mysql-test/r/derived.result: test of BUG#1031 mysql-test/t/derived.test: test of BUG#1031 sql/item_sum.cc: 'alias' parameter added to create_tmp_table sql/sql_derived.cc: Derived table should be named (to pass it name to Field and then to Item_field) sql/sql_select.cc: 'alias' parameter added to create_tmp_table sql/sql_select.h: 'alias' parameter added to create_tmp_table sql/sql_union.cc: 'alias' parameter added to create_tmp_table sql/sql_update.cc: 'alias' parameter added to create_tmp_table --- sql/sql_derived.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_derived.cc') diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 81439a19918..7f70cecdb04 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -157,7 +157,8 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, is_union && !unit->union_option, 1, (select_cursor->options | thd->options | TMP_TABLE_ALL_COLUMNS), - HA_POS_ERROR))) + HA_POS_ERROR, + org_table_list->alias))) { res= -1; goto exit; -- cgit v1.2.1