diff options
author | Sinisa@sinisa.nasamreza.org <> | 2004-03-22 16:36:27 +0200 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2004-03-22 16:36:27 +0200 |
commit | 6c389aff75bd7a81ccc90e1203a410fab449107e (patch) | |
tree | 223d41475a38d79a992ff76df8d69fb4788a324d /sql | |
parent | 8c4ade710bf06840c32e4097d570729b7c070ce9 (diff) | |
parent | 2eaa07f1993f3719874e65aeb39f37539e19311b (diff) | |
download | mariadb-git-6c389aff75bd7a81ccc90e1203a410fab449107e.tar.gz |
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_union.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 34acd79f18b..8088737c0de 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -100,6 +100,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result) else { Item *item; + ORDER *orr; List_iterator<Item> it(lex->select_lex.item_list); TABLE_LIST *first_table= (TABLE_LIST*) lex->select_lex.table_list.first; @@ -110,6 +111,15 @@ int mysql_union(THD *thd, LEX *lex,select_result *result) if (setup_tables(first_table) || setup_fields(thd,first_table,item_list,0,0,1)) DBUG_RETURN(-1); + for (orr=order;orr;orr=orr->next) + { + item=*orr->item; + if (((item->type() == Item::FIELD_ITEM) && ((class Item_field*)item)->table_name)) + { + my_error(ER_BAD_FIELD_ERROR,MYF(0),item->full_name(),"ORDER BY"); + DBUG_RETURN(-1); + } + } } bzero((char*) &tmp_table_param,sizeof(tmp_table_param)); |