summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-08-12 15:04:49 +0300
committerunknown <bell@sanja.is.com.ua>2003-08-12 15:04:49 +0300
commit45b145a96e9a5992b8a5c8a0a1a23d99951058ca (patch)
tree9b6eb05bbb347e1704e9fe0036f80dc793830074 /sql/sql_derived.cc
parent253b2a9654f6430d879076771b70bd018dd30732 (diff)
downloadmariadb-git-45b145a96e9a5992b8a5c8a0a1a23d99951058ca.tar.gz
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
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc3
1 files changed, 2 insertions, 1 deletions
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;