Commit a4d8ed87 authored by unknown's avatar unknown
Browse files

Fix for broken --with-csv-storage-engine build.

Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().


sql/examples/ha_example.cc:
  Now we use TABLE::timestamp_field_type instead of
  TABLE::timestamp_default_now/on_update_now for determining
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of
  handler::update_timestamp().
sql/examples/ha_tina.cc:
  Now we use TABLE::timestamp_field_type instead of
  TABLE::timestamp_default_now/on_update_now for determining
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of
  handler::update_timestamp().
parent 221d51eb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -263,8 +263,8 @@ int ha_example::write_row(byte * buf)
  clause was used. Consecutive ordering is not guarenteed.
  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_on_update_now)
    update_timestamp(new_row+table->timestamp_on_update_now-1);
  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();

+4 −4
Original line number Diff line number Diff line
@@ -428,8 +428,8 @@ int ha_tina::write_row(byte * buf)

  statistic_increment(ha_write_count,&LOCK_status);

  if (table->timestamp_default_now)
    update_timestamp(buf+table->timestamp_default_now-1);
  if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
    table->timestamp_field->set_time();

  size= encode_quote(buf);

@@ -464,8 +464,8 @@ int ha_tina::update_row(const byte * old_data, byte * new_data)

  statistic_increment(ha_update_count,&LOCK_status);

  if (table->timestamp_default_now)
    update_timestamp(new_data+table->timestamp_default_now-1);
  if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
    table->timestamp_field->set_time();

  size= encode_quote(new_data);