mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Manual merge
This commit is contained in:
commit
66b31520e9
1 changed files with 14 additions and 0 deletions
|
@ -5403,6 +5403,20 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
|
|||
case FIELD_TYPE_LONG_BLOB:
|
||||
case FIELD_TYPE_MEDIUM_BLOB:
|
||||
case FIELD_TYPE_GEOMETRY:
|
||||
if (new_field->length)
|
||||
{
|
||||
/* The user has given a length to the blob column */
|
||||
if (new_field->length < 256)
|
||||
type= FIELD_TYPE_TINY_BLOB;
|
||||
else if (new_field->length < 65536)
|
||||
type= FIELD_TYPE_BLOB;
|
||||
else if (new_field->length < 256L*256L*256L)
|
||||
type= FIELD_TYPE_MEDIUM_BLOB;
|
||||
else
|
||||
type= FIELD_TYPE_LONG_BLOB;
|
||||
new_field->length= 0;
|
||||
}
|
||||
new_field->sql_type= type;
|
||||
if (default_value) // Allow empty as default value
|
||||
{
|
||||
String str,*res;
|
||||
|
|
Loading…
Add table
Reference in a new issue