diff options
author | Oleg Smirnov <olernov@gmail.com> | 2023-01-02 14:46:46 +0700 |
---|---|---|
committer | Oleg Smirnov <olernov@gmail.com> | 2023-01-02 14:46:50 +0700 |
commit | 657ddf17491740f652f011458f03366e70c4728f (patch) | |
tree | b0d31279d3848424dab3a1260a59fcd2cebdc1b4 /sql/sql_select.cc | |
parent | 92665b862b479f6582e3a15247bfc812e59e7e34 (diff) | |
download | mariadb-git-10.9-MDEV-16232.tar.gz |
MDEV-16232: Use fewer mini-transactions10.9-MDEV-16232
SQL Layer support #3.
Add checks of applicability for UPDATEs and DELETEs.
Rename "operations batch" to "mini transactions" to disambiguate
the term "batch" which is already used.
Temporary disable mini-transactions for SELECTs.
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); |