diff options
author | holyfoot/hf@hfmain.(none) <> | 2007-05-18 20:00:49 +0500 |
---|---|---|
committer | holyfoot/hf@hfmain.(none) <> | 2007-05-18 20:00:49 +0500 |
commit | 85d5dfedf6f765cb3fb4c27f2ff38ec26978b93c (patch) | |
tree | c1b4adb86cd3226dc4d006ca15ff9a9fd145b025 /sql/sql_union.cc | |
parent | d12e6f7b0bc7fdae82cf8742010f53ff53c6b014 (diff) | |
parent | 835189cb85531606c06d67c98e488325f37f7d94 (diff) | |
download | mariadb-git-85d5dfedf6f765cb3fb4c27f2ff38ec26978b93c.tar.gz |
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 2a1db422058..dbae7977d62 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -147,8 +147,16 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg) fake_select_lex->table_list.link_in_list((byte *)&result_table_list, (byte **) &result_table_list.next_local); - fake_select_lex->context.table_list= fake_select_lex->context.first_name_resolution_table= + fake_select_lex->context.table_list= + fake_select_lex->context.first_name_resolution_table= fake_select_lex->get_table_list(); + if (!fake_select_lex->first_execution) + { + for (ORDER *order= (ORDER *) global_parameters->order_list.first; + order; + order= order->next) + order->item= &order->item_ptr; + } for (ORDER *order= (ORDER *)global_parameters->order_list.first; order; order=order->next) |