diff options
author | Michael Widenius <monty@mariadb.org> | 2017-04-16 22:40:39 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-04-18 12:23:53 +0300 |
commit | a05a610d60a6d177b66f9da97906efdb44336a6f (patch) | |
tree | bca0d63ddc2a8b43d22a3d1732e5497caab40f78 /storage/blackhole | |
parent | d82ac8eaafd89a6a74436747b660ef02c69eaac3 (diff) | |
download | mariadb-git-a05a610d60a6d177b66f9da97906efdb44336a6f.tar.gz |
Added "const" to new data for handler::update_row()
This was done to make it clear that a update_row() should not change the
row.
This was not done for handler::write_row() as this function still needs
to update auto_increment values in the row. This should at some point
be moved to handler::ha_write_row() after which write_row can also have
const arguments.
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 56d8000d64d..ed9b03dc82b 100644 --- a/storage/blackhole/ha_blackhole.cc +++ b/storage/blackhole/ha_blackhole.cc @@ -105,7 +105,7 @@ int ha_blackhole::write_row(uchar * buf) DBUG_RETURN(table->next_number_field ? update_auto_increment() : 0); } -int ha_blackhole::update_row(const uchar *old_data, uchar *new_data) +int ha_blackhole::update_row(const uchar *old_data, const uchar *new_data) { DBUG_ENTER("ha_blackhole::update_row"); THD *thd= ha_thd(); diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h index b70320848d7..9a4b34809f8 100644 --- a/storage/blackhole/ha_blackhole.h +++ b/storage/blackhole/ha_blackhole.h @@ -97,6 +97,6 @@ public: enum thr_lock_type lock_type); private: virtual int write_row(uchar *buf); - virtual int update_row(const uchar *old_data, uchar *new_data); + virtual int update_row(const uchar *old_data, const uchar *new_data); virtual int delete_row(const uchar *buf); }; |