From a05a610d60a6d177b66f9da97906efdb44336a6f Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sun, 16 Apr 2017 22:40:39 +0300 Subject: 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. --- storage/example/ha_example.cc | 2 +- storage/example/ha_example.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'storage/example') diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 3a5b269e79f..13062c0bf7c 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -431,7 +431,7 @@ int ha_example::write_row(uchar *buf) @see sql_select.cc, sql_acl.cc, sql_update.cc and sql_insert.cc */ -int ha_example::update_row(const uchar *old_data, uchar *new_data) +int ha_example::update_row(const uchar *old_data, const uchar *new_data) { DBUG_ENTER("ha_example::update_row"); diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h index 2d3d0c81ed9..3a9654bbb7b 100644 --- a/storage/example/ha_example.h +++ b/storage/example/ha_example.h @@ -186,7 +186,7 @@ public: We implement this in ha_example.cc. It's not an obligatory method; skip it and and MySQL will treat it as not implemented. */ - int update_row(const uchar *old_data, uchar *new_data); + int update_row(const uchar *old_data, const uchar *new_data); /** @brief We implement this in ha_example.cc. It's not an obligatory method; -- cgit v1.2.1