diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-03-27 03:45:16 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-03-27 03:45:16 +0400 |
commit | 5de770f31736e1ed7088b6d609a4237083d4fe47 (patch) | |
tree | 7a806cb868f740609a99d3dcdd352f68d8dcb188 /sql/sql_cursor.cc | |
parent | 290a72d50b65975e0bdd5caffa74d04acee906a5 (diff) | |
download | mariadb-git-5de770f31736e1ed7088b6d609a4237083d4fe47.tar.gz |
MWL#90: Address review feedback part #14
Diffstat (limited to 'sql/sql_cursor.cc')
-rw-r--r-- | sql/sql_cursor.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 308c49fc15c..915a4dd0c9c 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -381,14 +381,14 @@ Sensitive_cursor::open(JOIN *join_arg) /* Prepare JOIN for reading rows. */ join->tmp_table= 0; - join->join_tab[join->tables-1].next_select= setup_end_select_func(join); + join->join_tab[join->top_jtrange_tables - 1].next_select= setup_end_select_func(join); join->send_records= 0; join->fetch_limit= join->unit->offset_limit_cnt; /* Disable JOIN CACHE as it is not working with cursors yet */ - for (JOIN_TAB *tab= join_tab; - tab != join->join_tab + join->tables - 1; - tab++) + for (JOIN_TAB *tab= first_linear_tab(join, WITHOUT_CONST_TABLES); + tab != join->join_tab + join->top_jtrange_tables - 1; + tab= next_linear_tab(join, tab, WITH_BUSH_ROOTS)) { if (tab->next_select == sub_select_cache) tab->next_select= sub_select; |