summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authormonty@mysql.com/nosik.monty.fi <>2007-08-03 01:14:27 +0300
committermonty@mysql.com/nosik.monty.fi <>2007-08-03 01:14:27 +0300
commit237d58670021e62d22d04f70174f4a13b85a0d02 (patch)
treee484df98228dddbe77df4c8040131f1c053dc6f9 /sql/field.h
parent0174fa66d5621a8eba89cb35d06f809ea97b6f03 (diff)
downloadmariadb-git-237d58670021e62d22d04f70174f4a13b85a0d02.tar.gz
Simplify logging code a bit (to make code smaller and faster)
Moved duplicated code to inline function store_timestamp() Save thd->time_zone_used when logging to table as CSV internally cases it to be changed Added MYSQL_LOCK_IGNORE_FLUSH to log tables to avoid deadlock in case of flush tables. Mark log tables with TIMESTAMP_NO_AUTO_SET to avoid automatic timestamping Set TABLE->no_replicate on open
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 2782042e911..3ff5e5b9653 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -952,6 +952,17 @@ public:
longget(tmp,ptr);
return tmp;
}
+ inline void store_timestamp(my_time_t timestamp)
+ {
+#ifdef WORDS_BIGENDIAN
+ if (table && table->s->db_low_byte_first)
+ {
+ int4store(ptr,timestamp);
+ }
+ else
+#endif
+ longstore(ptr,(uint32) timestamp);
+ }
bool get_date(MYSQL_TIME *ltime,uint fuzzydate);
bool get_time(MYSQL_TIME *ltime);
timestamp_auto_set_type get_auto_set_type() const;