Commit 34d0db76 authored by unknown's avatar unknown

Server core dumped if ALTER TABLE SET DEFAULT was called on a blob

field.


sql/sql_table.cc:
  - error if ALTER TABLE SET DEFAULT called on blob field
parent 99110483
...@@ -1144,6 +1144,11 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, ...@@ -1144,6 +1144,11 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
} }
if (alter) if (alter)
{ {
if (def->sql_type == FIELD_TYPE_BLOB)
{
my_error(ER_BLOB_CANT_HAVE_DEFAULT,MYF(0),def->change);
DBUG_RETURN(-1);
}
def->def=alter->def; // Use new default def->def=alter->def; // Use new default
alter_it.remove(); alter_it.remove();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment