mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29001 DROP DEFAULT makes SHOW CREATE non-idempotent
DROP DEFAULT adds DEFAULT NULL in case of nullable column. In case of NOT NULL column it drops default expression if any exists.
This commit is contained in:
committed by
Sergei Golubchik
parent
67745e4dbf
commit
9a51709dba
@@ -8658,7 +8658,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((def->default_value= alter->default_value))
|
||||
if ((def->default_value= alter->default_value) ||
|
||||
!(def->flags & NOT_NULL_FLAG))
|
||||
def->flags&= ~NO_DEFAULT_VALUE_FLAG;
|
||||
else
|
||||
def->flags|= NO_DEFAULT_VALUE_FLAG;
|
||||
|
Reference in New Issue
Block a user