summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-07-04 21:31:35 +0300
committerEugene Kosov <claprix@yandex.ru>2019-07-05 13:14:19 +0300
commitc9aa495fb67ab4fd5c9790d4f61b7e988423619f (patch)
tree9f6aa0423075e0450ce433983c163d06023b638d /sql/handler.h
parent23c12ed5cb2a86516f4d4502779d2be312fa6e17 (diff)
downloadmariadb-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 'sql/handler.h')
-rw-r--r--sql/handler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/handler.h b/sql/handler.h
index e144cbc6642..7bdcb637485 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -3238,7 +3238,7 @@ public:
and delete_row() below.
*/
int ha_external_lock(THD *thd, int lock_type);
- int ha_write_row(uchar * buf);
+ int ha_write_row(const uchar * buf);
int ha_update_row(const uchar * old_data, const uchar * new_data);
int ha_delete_row(const uchar * buf);
void ha_release_auto_increment();
@@ -4548,7 +4548,7 @@ private:
*/
virtual int rnd_init(bool scan)= 0;
virtual int rnd_end() { return 0; }
- virtual int write_row(uchar *buf __attribute__((unused)))
+ virtual int write_row(const uchar *buf __attribute__((unused)))
{
return HA_ERR_WRONG_COMMAND;
}
@@ -4571,7 +4571,7 @@ private:
Optimized function for updating the first row. Only used by sequence
tables
*/
- virtual int update_first_row(uchar *new_data);
+ virtual int update_first_row(const uchar *new_data);
virtual int delete_row(const uchar *buf __attribute__((unused)))
{