mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 15:45:33 +02:00
BUG#12915: Added single-table UPDATE/DELTE ... ORDER BY ... LIMIT
optimization: now can use index to find records to update/delete when there is no WHERE clause. mysql-test/r/update.result: Testcase for BUG#12915 mysql-test/t/update.test: Testcase for BUG#12915 sql/mysql_priv.h: BUG#12915: Added init_read_record_idx function. sql/opt_range.cc: BUG#12915: Added get_index_for_order() - find an index that can be used to get first N table records in given ordering cheaper then one would with full table scan. sql/opt_range.h: BUG#12915: Added get_index_for_order() function sql/records.cc: BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan index using init_read_record()/read_record.read_record() sql/sql_delete.cc: BUG#12915: Added single-table DELETE ... ORDER BY ... LIMIT optimization: now can use index to find records to delete when there is no WHERE clause. sql/sql_update.cc: BUG#12915: Added single-table UPDATE ... ORDER BY ... LIMIT optimization: now can use index to find records to update when there is no WHERE clause. sql/structs.h: BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan index using init_read_record()/READ_RECORD::read_record()
This commit is contained in:
parent
7b8a6e458e
commit
1fe423aeba
9 changed files with 342 additions and 22 deletions
|
|
@ -167,4 +167,6 @@ public:
|
|||
QUICK_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
|
||||
struct st_table_ref *ref);
|
||||
|
||||
uint get_index_for_order(TABLE *table, ORDER *order, ha_rows limit);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue