-
unknown authored
Item::tmp_table_field_from_field_type() and create_tmp_field_from_item() was converting string field to blob depending on byte-wise length instead of character length, which results in converting valid varchar string with length == 86 to longtext. Made that functions above take into account max width of character when converting string fields to blobs. sql/item.cc: Fix bug #12537 UNION produces longtext instead of varchar Item::tmp_table_field_from_field_type() now taking into account max char width when creating tmp field for string fields. sql/sql_select.cc: Fix bug #12537 UNION produces longtext instead of varchar create_tmp_field_from_item()now taking into account max char width when creating tmp field for string fields. mysql-test/r/create.result: Test case for bug #12537 UNION produces longtext instead of varchar mysql-test/t/create.test: Test case for bug #12537 UNION produces longtext instead of varchar
f118f3eb