diff options
author | Kentoku <kentokushiba@gmail.com> | 2019-11-08 10:27:07 +0900 |
---|---|---|
committer | Kentoku <kentokushiba@gmail.com> | 2019-11-09 05:57:16 +0900 |
commit | 0cf2ebd18acd945b04111133ccbb479cbc81d405 (patch) | |
tree | 769a262ef5322079f594cd6665aede8b065221e4 /sql/handler.h | |
parent | c24ec3cece6d8bf70dac7519b6fd397c464f7a82 (diff) | |
download | mariadb-git-bb-10.4-MDEV-18973.tar.gz |
MDEV-18973 CLIENT_FOUND_ROWS wrong in spiderbb-10.4-MDEV-18973
Get count from last_used_con->info
Contributed by willhan at Tencent Games
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/sql/handler.h b/sql/handler.h index 2d25568488b..07ef73b9b27 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -2927,6 +2927,9 @@ public: }; +typedef struct st_copy_info COPY_INFO; + + /** The handler class is the interface for dynamically loadable storage engines. Do not add ifdefs and take care when adding or @@ -3248,6 +3251,7 @@ public: */ int ha_external_lock(THD *thd, int lock_type); int ha_write_row(const uchar * buf); + int ha_write_row_ext(const uchar * buf, COPY_INFO *info); int ha_update_row(const uchar * old_data, const uchar * new_data); int ha_delete_row(const uchar * buf); void ha_release_auto_increment(); @@ -3286,6 +3290,13 @@ public: int ret= end_bulk_insert(); DBUG_RETURN(ret); } + int ha_end_bulk_insert_ext(COPY_INFO *info) + { + DBUG_ENTER("handler::ha_end_bulk_insert_ext"); + estimation_rows_to_insert= 0; + int ret= end_bulk_insert_ext(info); + DBUG_RETURN(ret); + } int ha_bulk_update_row(const uchar *old_data, const uchar *new_data, ha_rows *dup_key_found); int ha_delete_all_rows(); @@ -4571,6 +4582,11 @@ private: { return HA_ERR_WRONG_COMMAND; } + virtual int write_row_ext(const uchar *buf, + COPY_INFO *info __attribute__((unused))) + { + return write_row(buf); + } /** Update a single row. @@ -4599,7 +4615,7 @@ private: /* Perform initialization for a direct update request */ public: - int ha_direct_update_rows(ha_rows *update_rows); + int ha_direct_update_rows(ha_rows *update_rows, ha_rows *found_rows); virtual int direct_update_rows_init(List<Item> *update_fields) { return HA_ERR_WRONG_COMMAND; @@ -4609,7 +4625,8 @@ private: { return HA_ERR_WRONG_COMMAND; } - virtual int direct_update_rows(ha_rows *update_rows __attribute__((unused))) + virtual int direct_update_rows(ha_rows *update_rows __attribute__((unused)), + ha_rows *found_rows __attribute__((unused))) { return HA_ERR_WRONG_COMMAND; } @@ -4692,6 +4709,10 @@ private: } virtual void start_bulk_insert(ha_rows rows, uint flags) {} virtual int end_bulk_insert() { return 0; } + virtual int end_bulk_insert_ext(COPY_INFO *info) + { + return end_bulk_insert(); + } protected: virtual int index_read(uchar * buf, const uchar * key, uint key_len, enum ha_rkey_function find_flag) |