Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 0.8Mb

23.18.26 update_row


Updates the contents of an existing row.


virtual int update_row (



const byte *

old_data ;

byte *

new_data ;


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,,, and


  • old_data

  • new_data

Return Values

There are no return values.


This section is still to be written.

Default Implementation

 { return HA_ERR_WRONG_COMMAND; } 

User Comments
Sign Up Login You must be logged in to post a comment.