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/archive/ha_archive.h | |
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/archive/ha_archive.h')
-rw-r--r-- | storage/archive/ha_archive.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h index 043eab2670a..b9fcf10f96f 100644 --- a/storage/archive/ha_archive.h +++ b/storage/archive/ha_archive.h @@ -95,7 +95,7 @@ class ha_archive: public handler void destroy_record_buffer(archive_record_buffer *r); int frm_copy(azio_stream *src, azio_stream *dst); int frm_compare(azio_stream *src); - unsigned int pack_row_v1(uchar *record); + unsigned int pack_row_v1(const uchar *record); public: ha_archive(handlerton *hton, TABLE_SHARE *table_arg); @@ -131,8 +131,8 @@ public: int index_next(uchar * buf); int open(const char *name, int mode, uint test_if_locked); int close(void); - int write_row(uchar * buf); - int real_write_row(uchar *buf, azio_stream *writer); + int write_row(const uchar * buf); + int real_write_row(const uchar *buf, azio_stream *writer); int truncate(); int rnd_init(bool scan=1); int rnd_next(uchar *buf); @@ -168,7 +168,7 @@ public: uint32 max_row_length(const uchar *buf); bool fix_rec_buff(unsigned int length); int unpack_row(azio_stream *file_to_read, uchar *record); - unsigned int pack_row(uchar *record, azio_stream *writer); + unsigned int pack_row(const uchar *record, azio_stream *writer); bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes); int external_lock(THD *thd, int lock_type); private: |