1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug #14693 (ALTER COLUMN SET DEFAULT has no effect)

mysql-test/r/alter_table.result:
  test result
mysql-test/t/alter_table.test:
  test case
sql/sql_table.cc:
  we should set the flag with the ALTER requirements
This commit is contained in:
unknown
2005-11-24 20:24:45 +04:00
parent 97bfd41fe1
commit ae2dc30930
3 changed files with 19 additions and 1 deletions

View File

@ -3379,7 +3379,10 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
my_error(ER_BLOB_CANT_HAVE_DEFAULT, MYF(0), def->change);
DBUG_RETURN(TRUE);
}
def->def=alter->def; // Use new default
if ((def->def=alter->def)) // Use new default
def->flags&= ~NO_DEFAULT_VALUE_FLAG;
else
def->flags|= NO_DEFAULT_VALUE_FLAG;
alter_it.remove();
}
}