diff options
author | Kentoku SHIBA <kentokushiba@gmail.com> | 2017-11-16 11:11:52 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-12-03 13:58:36 +0200 |
commit | e53ef202bd7706b88760472472af5ae878065f4f (patch) | |
tree | b4835ec250e0e00d06097da05a28206ca75df75d /sql/ha_partition.h | |
parent | d1e4ecec07b0611d3d0cbbf53342246ca2c4f600 (diff) | |
download | mariadb-git-e53ef202bd7706b88760472472af5ae878065f4f.tar.gz |
Adding direct update/delete to the server and to the partition engine.
Add support for direct update and direct delete requests for spider.
A direct update/delete request handles all qualified rows in a single
operation rather than one row at a time.
Contains Spiral patches:
006_mariadb-10.2.0.direct_update_rows.diff MDEV-7704
008_mariadb-10.2.0.partition_direct_update.diff MDEV-7706
010_mariadb-10.2.0.direct_update_rows2.diff MDEV-7708
011_mariadb-10.2.0.aggregate.diff MDEV-7709
027_mariadb-10.2.0.force_bulk_update.diff MDEV-7724
061_mariadb-10.2.0.mariadb-10.1.8.diff MDEV-12870
- The differences compared to the original patches:
- Most of the parameters of the new functions are unnecessary. The
unnecessary parameters have been removed.
- Changed bit positions for new handler flags upon consideration of
handler flags not needed by other Spiral patches and handler flags
merged from MySQL.
- Added info_push() (Was originally part of bulk access patch)
- Didn't include code related to handler socket
- Added HA_CAN_DIRECT_UPDATE_AND_DELETE
Original author: Kentoku SHIBA
First reviewer: Jacob Mathew
Second reviewer: Michael Widenius
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index c636340a5dc..f79a272abad 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -296,6 +296,7 @@ private: ha_rows m_bulk_inserted_rows; /** used for prediction of start_bulk_insert rows */ enum_monotonicity_info m_part_func_monotonicity_info; + part_id_range m_direct_update_part_spec; bool m_pre_calling; bool m_pre_call_use_parallel; /* Keep track of bulk access requests */ @@ -535,8 +536,23 @@ public: number of calls to write_row. */ virtual int write_row(uchar * buf); + virtual bool start_bulk_update(); + virtual int exec_bulk_update(ha_rows *dup_key_found); + virtual int end_bulk_update(); + virtual int bulk_update_row(const uchar *old_data, const uchar *new_data, + ha_rows *dup_key_found); virtual int update_row(const uchar * old_data, const uchar * new_data); + virtual int direct_update_rows_init(); + virtual int pre_direct_update_rows_init(); + virtual int direct_update_rows(ha_rows *update_rows); + virtual int pre_direct_update_rows(); + virtual bool start_bulk_delete(); + virtual int end_bulk_delete(); virtual int delete_row(const uchar * buf); + virtual int direct_delete_rows_init(); + virtual int pre_direct_delete_rows_init(); + virtual int direct_delete_rows(ha_rows *delete_rows); + virtual int pre_direct_delete_rows(); virtual int delete_all_rows(void); virtual int truncate(); virtual void start_bulk_insert(ha_rows rows, uint flags); @@ -1306,6 +1322,7 @@ public: virtual const COND *cond_push(const COND *cond); virtual void cond_pop(); virtual void clear_top_table_fields(); + virtual int info_push(uint info_type, void *info); private: int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags); |