1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."

avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space 
required for field_X in the new table.
This commit is contained in:
sergefp@mysql.com
2005-10-26 00:56:17 +04:00
parent 7510c45423
commit 2219ada7f6
5 changed files with 41 additions and 2 deletions

View File

@@ -643,8 +643,8 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field->charset= (dup_field->charset ?
dup_field->charset :
create_info->default_table_charset);
sql_field->length= dup_field->length;
sql_field->pack_length= dup_field->pack_length;
sql_field->length= dup_field->chars_length;
sql_field->pack_length= dup_field->pack_length;
sql_field->create_length_to_internal_length();
sql_field->decimals= dup_field->decimals;
sql_field->flags= dup_field->flags;