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


23.18.26 update_row

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

  • old_data

  • new_data

Return Values

There are no return values.

Usage

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.