diff options
author | Eugene Kosov <claprix@yandex.ru> | 2019-07-04 21:31:35 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2019-07-05 13:14:19 +0300 |
commit | c9aa495fb67ab4fd5c9790d4f61b7e988423619f (patch) | |
tree | 9f6aa0423075e0450ce433983c163d06023b638d /storage/blackhole | |
parent | 23c12ed5cb2a86516f4d4502779d2be312fa6e17 (diff) | |
download | mariadb-git-c9aa495fb67ab4fd5c9790d4f61b7e988423619f.tar.gz |
MDEV-19955 make argument of handler::ha_write_row() const
MDEV-19486 and one more similar bug appeared because handler::write_row() interface
welcomes to modify buffer by storage engine. But callers are not ready for that
thus bugs are possible in future.
handler::write_row():
handler::ha_write_row(): make argument const
Diffstat (limited to 'storage/blackhole')
-rw-r--r-- | storage/blackhole/ha_blackhole.cc | 2 | ||||
-rw-r--r-- | storage/blackhole/ha_blackhole.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc index 3f770c7005e..1b64db142e0 100644 --- a/storage/blackhole/ha_blackhole.cc +++ b/storage/blackhole/ha_blackhole.cc @@ -117,7 +117,7 @@ const char *ha_blackhole::index_type(uint key_number) HA_KEY_ALG_RTREE) ? "RTREE" : "BTREE"); } -int ha_blackhole::write_row(uchar * buf) +int ha_blackhole::write_row(const uchar * buf) { DBUG_ENTER("ha_blackhole::write_row"); DBUG_RETURN(table->next_number_field ? update_auto_increment() : 0); diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h index 0632c87c306..6ee30877b64 100644 --- a/storage/blackhole/ha_blackhole.h +++ b/storage/blackhole/ha_blackhole.h @@ -96,7 +96,7 @@ public: THR_LOCK_DATA **to, enum thr_lock_type lock_type); private: - virtual int write_row(uchar *buf); + virtual int write_row(const uchar *buf); virtual int update_row(const uchar *old_data, const uchar *new_data); virtual int delete_row(const uchar *buf); }; |