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.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 32624bb3305..7fe966c7542 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7781,9 +7781,8 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
new_field= item->make_string_field(table);
break;
case DECIMAL_RESULT:
- new_field= new Field_new_decimal(item->max_length - (item->decimals?1:0),
- maybe_null,
- item->name, table, item->decimals);
+ new_field= new Field_new_decimal(item->max_length, maybe_null, item->name,
+ table, item->decimals, item->unsigned_flag);
break;
case ROW_RESULT:
default: