diff options
author | unknown <bell@laptop.sanja.is.com.ua> | 2003-10-10 21:49:48 +0300 |
---|---|---|
committer | unknown <bell@laptop.sanja.is.com.ua> | 2003-10-10 21:49:48 +0300 |
commit | 8b09f4b074f1b31453fd142b7f3417b33fc0b6f2 (patch) | |
tree | e60d9e7ab843bfb80babd2dfe3bbec6a6af13f00 /sql/sql_select.h | |
parent | bc8f801bf0f239b85ee95ea5410915f0f5424fc1 (diff) | |
download | mariadb-git-8b09f4b074f1b31453fd142b7f3417b33fc0b6f2.tar.gz |
samall optimisation (any independent query will not save data for rexecution)
saving/restoring join_tab array (to save it of chnging by create_sort_index() before reexecuting)
(BUG#1523)
mysql-test/r/subselect.result:
test of BUG#1523
mysql-test/t/subselect.test:
test of BUG#1523
sql/sql_select.cc:
samall optimisation (any independent query will not save data for rexecution)
layout fix
saving/restoring join_tab array (to save it of chnging by create_sort_index() before reexecuting)
sql/sql_select.h:
field for storing saved join_tab_array
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 6c17a646ee6..aa9dc4f01cf 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -131,6 +131,7 @@ class JOIN :public Sql_alloc { public: JOIN_TAB *join_tab,**best_ref,**map2table; + JOIN_TAB *join_tab_save; //saved join_tab for subquery reexecution TABLE **table,**all_tables,*sort_by_table; uint tables,const_tables; uint send_group_parts; @@ -202,7 +203,7 @@ class JOIN :public Sql_alloc void init(THD *thd_arg, List<Item> &fields, ulong select_options_arg, select_result *result_arg) { - join_tab= 0; + join_tab= join_tab_save= 0; table= 0; tables= 0; const_tables= 0; @@ -242,7 +243,7 @@ class JOIN :public Sql_alloc zero_result_cause= 0; optimized= 0; - fields_list = fields; + fields_list= fields; bzero((char*) &keyuse,sizeof(keyuse)); tmp_table_param.copy_field=0; tmp_table_param.end_write_records= HA_POS_ERROR; @@ -280,6 +281,7 @@ class JOIN :public Sql_alloc int rollup_send_data(uint idx); bool test_in_subselect(Item **where); void clear(); + bool save_join_tab(); }; |