Purpose
Updates the contents of an existing row.
Synopsis
virtual int update_row
( |
old_data, |
|
|
new_data) ; |
|
const byte * |
old_data
; |
byte * |
new_data
; |
Description
This is the update_row
method.
old_data will have the previous row record in it, while new_data
will have the newest data in it.
The server can do updates based on ordering if an ORDER BY
clause was used. Consecutive ordering is not guaranteed.
Currently, new_data will not have an updated auto_increament
record, or and updated timestamp field. You can do these for
example by doing these: if (table->timestamp_field_type &
TIMESTAMP_AUTO_SET_ON_UPDATE)
table->timestamp_field->set_time(); if (table->next_number_field
&& record == table->record[0]) update_auto_increment();
Called from sql_select.cc, sql_acl.cc, sql_update.cc, and
sql_insert.cc.
Parameters
Return Values
There are no return values.
Usage
Default Implementation
{ return HA_ERR_WRONG_COMMAND; }