summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-10-18 10:32:52 +0400
committerunknown <dlenev@brandersnatch.localdomain>2004-10-18 10:32:52 +0400
commita4d8ed871a52d0e2e424698da570c3ba87bec86b (patch)
tree6ec919e586e7e2a2d328fabde584f639528ff635 /sql/examples
parent221d51ebb1b178061904e68cc2ff40a11da835d1 (diff)
downloadmariadb-git-a4d8ed871a52d0e2e424698da570c3ba87bec86b.tar.gz
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().
Diffstat (limited to 'sql/examples')
-rw-r--r--sql/examples/ha_example.cc4
-rw-r--r--sql/examples/ha_tina.cc8
2 files changed, 6 insertions, 6 deletions
diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc
index 097abd48e05..cb0780ea74d 100644
--- a/sql/examples/ha_example.cc
+++ b/sql/examples/ha_example.cc
@@ -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();
diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc
index 06a19e478ae..0345a170c3c 100644
--- a/sql/examples/ha_tina.cc
+++ b/sql/examples/ha_tina.cc
@@ -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);