summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-07-24 15:12:54 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-27 16:59:13 +0200
commitcd51c7fb60e39ae113e6bcf0d029564dd1b391e3 (patch)
treeca47c7f51cd9300900fdf6a3be7eeeaeb995562e /sql/unireg.cc
parent12d2c4fcd0bc3fbe74759e8285f2c93ad348e749 (diff)
downloadmariadb-git-cd51c7fb60e39ae113e6bcf0d029564dd1b391e3.tar.gz
move away from TIMESTAMP_DNUN_FIELD/TIMESTAMP_DN_FIELD code
use the new approach with Field->default_value expressions. But keep the old TIMESTAMP_UN_FIELD for ON UPDATE NOW().
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index add09411acb..d3a9b832aaf 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -1039,7 +1039,10 @@ static bool make_empty_rec(THD *thd, uchar *buff, uint table_options,
field->sql_type,
field->charset,
field->geom_type, field->srid,
- field->unireg_check,
+ field->unireg_check == Field::TIMESTAMP_DNUN_FIELD
+ ? Field::TIMESTAMP_UN_FIELD
+ : field->unireg_check == Field::TIMESTAMP_DN_FIELD
+ ? Field::NONE : field->unireg_check,
field->save_interval ? field->save_interval :
field->interval,
field->field_name);