summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index ea78e126d9c..8de3e041bfc 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -9133,8 +9133,7 @@ Field *create_tmp_field_for_schema(THD *thd, Item *item, TABLE *table)
if (item->field_type() == MYSQL_TYPE_VARCHAR)
{
Field *field;
- if (item->max_length > MAX_FIELD_VARCHARLENGTH /
- item->collation.collation->mbmaxlen)
+ if (item->max_length > MAX_FIELD_VARCHARLENGTH)
field= new Field_blob(item->max_length, item->maybe_null,
item->name, item->collation.collation);
else