diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-20 18:45:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-20 18:45:09 +0300 |
commit | f83c829c1d6b5e773fd13e11afb5a732baed007d (patch) | |
tree | ab7b1bf7776c74eaea0699b3e47cd42c83e8efc0 /sql/sql_table.cc | |
parent | 562bbf5212412437273a469fc59138a939f123cd (diff) | |
parent | 922e676b43c7b5cb0f20ca67c6d2222e2fc5ec03 (diff) | |
download | mariadb-git-bb-10.3-merge.tar.gz |
WIP merge 10.2 into 10.3 (without MDEV-22255)bb-10.3-merge
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 64336ed02af..a6347c58c21 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2019, Oracle and/or its affiliates. - Copyright (c) 2010, 2020, MariaDB + Copyright (c) 2010, 2021, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -8247,7 +8247,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, def->real_field_type() == MYSQL_TYPE_NEWDATE || def->real_field_type() == MYSQL_TYPE_DATETIME || def->real_field_type() == MYSQL_TYPE_DATETIME2) && - !alter_ctx->datetime_field && + !alter_ctx->datetime_field && !def->field && !(~def->flags & (NO_DEFAULT_VALUE_FLAG | NOT_NULL_FLAG)) && thd->variables.sql_mode & MODE_NO_ZERO_DATE) { |