1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

A fix and a test case for Bug#13134 "Length of VARCHAR() utf8

column is increasing when table is recreated with PS/SP":
make use of create_field::char_length more consistent in the code.
Reinit create_field::length from create_field::char_length
for every execution of a prepared statement (actually fixes the 
bug).
This commit is contained in:
konstantin@mysql.com
2006-02-21 19:52:20 +03:00
parent 736faf4730
commit 442c2ba8af
6 changed files with 52 additions and 6 deletions

View File

@ -4480,6 +4480,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
NOT_FIXED_DEC-1) : 0;
new_field->sql_type=type;
new_field->length=0;
new_field->char_length= 0;
new_field->change=change;
new_field->interval=0;
new_field->pack_length=0;
@ -4750,6 +4751,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
FIELD_TYPE_STRING :
new_field->sql_type,
new_field->length);
new_field->char_length= new_field->length;
lex->create_list.push_back(new_field);
lex->last_field=new_field;
DBUG_RETURN(0);