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). mysql-test/r/ps.result: Test results fixed (Bug#13134) mysql-test/t/ps.test: A test case for Bug#13134 "Length of VARCHAR() utf8 column is increasing when table is recreated with PS/SP" sql/field.cc: Move initialization of create_field::char_length to the constructor of create_field. sql/field.h: Rename chars_length to char_length (to be consistent with how this term is used throughout the rest of the code). sql/sql_parse.cc: Initialize char_length in add_field_to_list. This function effectively works as another create_field constructor. sql/sql_table.cc: Reinit length from char_length for every field in mysql_prepare_table. This is not needed if we're executing a statement for the first time, however, at subsequent executions length contains the number of bytes, not characters (as it's expected to).
Showing
Please register or sign in to comment