summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-09-21 20:08:59 +0200
committerSergei Golubchik <serg@mariadb.org>2017-09-22 14:01:26 +0200
commita5e1f60b3167e0057e64166df06424f1fb96bec3 (patch)
treef6584c226dc30b8f038b593ce3243d9457e915b1 /sql/field.h
parentbc4409ab4ee3729f09151a4d7bdc6d95fdcaa3a1 (diff)
downloadmariadb-git-a5e1f60b3167e0057e64166df06424f1fb96bec3.tar.gz
bugfix: ALTER TABLE and TIMESTAMPs around DST change time
Implement a special Copy_func function for timestamps, that copies timestamps without converting them to MYSQL_TIME (the conversion is lossy around DST change time). This fixes ALTER TABLE part of main.old-mode test. This is 10.2 version of f4f48e06215
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 13d43201c6a..cd65cb9c580 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -699,6 +699,7 @@ protected:
static void do_field_real(Copy_field *copy);
static void do_field_string(Copy_field *copy);
static void do_field_temporal(Copy_field *copy);
+ static void do_field_timestamp(Copy_field *copy);
static void do_field_decimal(Copy_field *copy);
public:
static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
@@ -2388,6 +2389,7 @@ public:
TABLE_SHARE *share);
enum_field_types type() const { return MYSQL_TYPE_TIMESTAMP;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
+ Copy_func *get_copy_func(const Field *from) const;
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);