Commit 7b3263df authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

Merge work:/home/bk/mysql-4.0

into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
parents 665ece68 5fd23197
...@@ -448,8 +448,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -448,8 +448,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
column->field_name); column->field_name);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if (key->type == Key::FULLTEXT)
column->length=1; /* ft-code ignores it anyway :-) */
if (f_is_blob(sql_field->pack_flag)) if (f_is_blob(sql_field->pack_flag))
{ {
if (!(file->option_flag() & HA_BLOB_KEY)) if (!(file->option_flag() & HA_BLOB_KEY))
...@@ -459,6 +457,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -459,6 +457,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
if (!column->length) if (!column->length)
{
if (key->type == Key::FULLTEXT)
column->length=1; /* ft-code ignores it anyway :-) */
else
{ {
my_printf_error(ER_BLOB_KEY_WITHOUT_LENGTH, my_printf_error(ER_BLOB_KEY_WITHOUT_LENGTH,
ER(ER_BLOB_KEY_WITHOUT_LENGTH),MYF(0), ER(ER_BLOB_KEY_WITHOUT_LENGTH),MYF(0),
...@@ -466,6 +468,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, ...@@ -466,6 +468,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
} }
}
if (!(sql_field->flags & NOT_NULL_FLAG)) if (!(sql_field->flags & NOT_NULL_FLAG))
{ {
if (key->type == Key::PRIMARY) if (key->type == Key::PRIMARY)
......
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