diff options
author | unknown <igor@rurik.mysql.com> | 2006-04-20 00:42:12 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-04-20 00:42:12 -0700 |
commit | b30d80e826cfe4925e381ab79e7342e0a5486e94 (patch) | |
tree | a71191d4453a2d4235cc3a616d5e9556bc54acd0 /sql/sql_select.cc | |
parent | 0775a7122250c8cf9d8e61dcd24ea0a17921a387 (diff) | |
download | mariadb-git-b30d80e826cfe4925e381ab79e7342e0a5486e94.tar.gz |
Post merge fix
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5b796aeb4c1..0211539e784 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -8245,20 +8245,13 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table, if ((type= item->field_type()) == MYSQL_TYPE_DATETIME || type == MYSQL_TYPE_TIME || type == MYSQL_TYPE_DATE) new_field= item->tmp_table_field_from_field_type(table); - else if (item->max_length/item->collation.collation->mbmaxlen > - CONVERT_IF_BIGGER_TO_BLOB) - { - if (convert_blob_length) - new_field= new Field_varstring(convert_blob_length, maybe_null, - item->name, table, - item->collation.collation); - else - new_field= new Field_blob(item->max_length, maybe_null, item->name, - table, item->collation.collation); - } + else if (item->max_length/item->collation.collation->mbmaxlen > 255 && + convert_blob_length) + new_field= new Field_varstring(convert_blob_length, maybe_null, + item->name, table, + item->collation.collation); else - new_field= new Field_string(item->max_length, maybe_null, item->name, - table, item->collation.collation); + new_field= item->make_string_field(table); break; case DECIMAL_RESULT: new_field= new Field_new_decimal(item->max_length, maybe_null, item->name, |