diff options
author | igor@olga.mysql.com <> | 2007-05-14 17:06:05 -0700 |
---|---|---|
committer | igor@olga.mysql.com <> | 2007-05-14 17:06:05 -0700 |
commit | 25f5e7d99940810d9abde0e0b6856693a182317b (patch) | |
tree | a6386736ed9dc993385103a41fcbf92fc7ed1539 /sql/sql_union.cc | |
parent | 10ab91447df003ae2f46ebc93ef53120eebf6161 (diff) | |
parent | d71043b8892ffa6ac1fc66b1ab7e082bcb234bab (diff) | |
download | mariadb-git-25f5e7d99940810d9abde0e0b6856693a182317b.tar.gz |
Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug27937
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27937
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 7fb75732012..373b03d45e6 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) |