summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-01-12 03:37:35 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-01-12 03:37:35 +0200
commit4f5338467807f099b67f07d0bfb415358222a2b1 (patch)
tree9be13fd51713f08b9f5952e73f673cda824377d6 /sql/sql_table.cc
parent833fda8f1a0c415ced1f2b8c1851809383bcc639 (diff)
parent1c5ca7c1837b9db071cb2e791d6605f8806af0c1 (diff)
downloadmariadb-git-4f5338467807f099b67f07d0bfb415358222a2b1.tar.gz
Merge branch 'bb-10.0-vicentiu' into 10.0mariadb-10.0.29
Extra merge commit due to intermediate commits pushed to 10.0 while merge was done.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 31f61301c37..5b5fa27ac7e 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -3516,7 +3516,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field->pack_length= dup_field->pack_length;
sql_field->key_length= dup_field->key_length;
sql_field->decimals= dup_field->decimals;
- sql_field->create_length_to_internal_length();
sql_field->unireg_check= dup_field->unireg_check;
/*
We're making one field from two, the result field will have
@@ -3526,6 +3525,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (!(sql_field->flags & NOT_NULL_FLAG))
null_fields--;
sql_field->flags= dup_field->flags;
+ sql_field->create_length_to_internal_length();
sql_field->interval= dup_field->interval;
sql_field->vcol_info= dup_field->vcol_info;
sql_field->stored_in_db= dup_field->stored_in_db;
@@ -3652,12 +3652,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
my_error(ER_TOO_MANY_KEY_PARTS,MYF(0),tmp);
DBUG_RETURN(TRUE);
}
- if (check_string_char_length(&key->name, "", NAME_CHAR_LEN,
- system_charset_info, 1))
- {
- my_error(ER_TOO_LONG_IDENT, MYF(0), key->name.str);
+ if (check_ident_length(&key->name))
DBUG_RETURN(TRUE);
- }
key_iterator2.rewind ();
if (key->type != Key::FOREIGN_KEY)
{