1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Merge mysql.com:/opt/local/work/mysql-4.1-13134

into  mysql.com:/opt/local/work/mysql-5.0-runtime
This commit is contained in:
konstantin@mysql.com
2006-02-24 00:00:15 +03:00
5 changed files with 34 additions and 6 deletions

View File

@@ -688,6 +688,12 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
{
CHARSET_INFO *save_cs;
/*
Initialize length from its original value (number of characters),
which was set in the parser. This is necessary if we're
executing a prepared statement for the second time.
*/
sql_field->length= sql_field->char_length;
if (!sql_field->charset)
sql_field->charset= create_info->default_table_charset;
/*
@@ -872,7 +878,7 @@ static 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->chars_length;
sql_field->length= dup_field->char_length;
sql_field->pack_length= dup_field->pack_length;
sql_field->key_length= dup_field->key_length;
sql_field->create_length_to_internal_length();