diff options
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e4f9660f649..31d9671ea85 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -21183,14 +21183,12 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (pfs_batch_update) join_tab->table->file->start_psi_batch_mode(); - - bool ops_batch_started= false; /* A crude check to employ the optimization only if this is a one-table select. Check the list of open tables. It must have one table open (2), but just one table (3). - */ + if (join_tab->next_select == end_send && join->thd->open_tables && // (2) !join->thd->open_tables->next) // (3) @@ -21198,7 +21196,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) join_tab->table->file->start_operations_batch(); ops_batch_started= true; } - +*/ if (rc != NESTED_LOOP_NO_MORE_ROWS) { @@ -21247,9 +21245,6 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) rc= evaluate_join_record(join, join_tab, error); } - if (ops_batch_started) - join_tab->table->file->end_operations_batch(); - if (rc == NESTED_LOOP_NO_MORE_ROWS && join_tab->last_inner && !join_tab->found) rc= evaluate_null_complemented_join_record(join, join_tab); |