1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Michael Widenius
2017-04-16 22:40:39 +03:00
committed by Monty
parent d82ac8eaaf
commit a05a610d60
73 changed files with 126 additions and 110 deletions

View File

@ -2882,7 +2882,7 @@ public:
*/
int ha_external_lock(THD *thd, int lock_type);
int ha_write_row(uchar * buf);
int ha_update_row(const uchar * old_data, uchar * new_data);
int ha_update_row(const uchar * old_data, const uchar * new_data);
int ha_delete_row(const uchar * buf);
void ha_release_auto_increment();
@ -2921,7 +2921,7 @@ public:
int ret= end_bulk_insert();
DBUG_RETURN(ret);
}
int ha_bulk_update_row(const uchar *old_data, uchar *new_data,
int ha_bulk_update_row(const uchar *old_data, const uchar *new_data,
uint *dup_key_found);
int ha_delete_all_rows();
int ha_truncate();
@ -4039,7 +4039,7 @@ private:
message will contain garbage.
*/
virtual int update_row(const uchar *old_data __attribute__((unused)),
uchar *new_data __attribute__((unused)))
const uchar *new_data __attribute__((unused)))
{
return HA_ERR_WRONG_COMMAND;
}
@ -4127,7 +4127,7 @@ public:
@retval 0 Bulk delete used by handler
@retval 1 Bulk delete not used, normal operation used
*/
virtual int bulk_update_row(const uchar *old_data, uchar *new_data,
virtual int bulk_update_row(const uchar *old_data, const uchar *new_data,
uint *dup_key_found)
{
DBUG_ASSERT(FALSE);