1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-11527 Virtual columns do not get along well with NO_ZERO_DATE

don't check defaults for vcols
This commit is contained in:
Sergei Golubchik
2017-01-12 13:54:21 +01:00
parent 0d1d0d77f2
commit 20ca1bcf4b
3 changed files with 19 additions and 1 deletions

View File

@ -3826,7 +3826,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
Field::utype type= (Field::utype) MTYP_TYPENR(sql_field->unireg_check);
if (thd->variables.sql_mode & MODE_NO_ZERO_DATE &&
!sql_field->def &&
!sql_field->def && !sql_field->vcol_info &&
sql_field->sql_type == MYSQL_TYPE_TIMESTAMP &&
(sql_field->flags & NOT_NULL_FLAG) &&
(type == Field::NONE || type == Field::TIMESTAMP_UN_FIELD))