mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql mysql-test/r/olap.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/sp.test: Auto merged sql/field.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/analyse.result: Manual merge mysql-test/r/sp.result: Manual merge sql/item_timefunc.cc: Manual merge
This commit is contained in:
@ -9090,8 +9090,13 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
|
||||
item->name, item->decimals, TRUE);
|
||||
break;
|
||||
case INT_RESULT:
|
||||
/* Select an integer type with the minimal fit precision */
|
||||
if (item->max_length > MY_INT32_NUM_DECIMAL_DIGITS)
|
||||
/*
|
||||
Select an integer type with the minimal fit precision.
|
||||
MY_INT32_NUM_DECIMAL_DIGITS is sign inclusive, don't consider the sign.
|
||||
Values with MY_INT32_NUM_DECIMAL_DIGITS digits may or may not fit into
|
||||
Field_long : make them Field_longlong.
|
||||
*/
|
||||
if (item->max_length >= (MY_INT32_NUM_DECIMAL_DIGITS - 1))
|
||||
new_field=new Field_longlong(item->max_length, maybe_null,
|
||||
item->name, item->unsigned_flag);
|
||||
else
|
||||
|
Reference in New Issue
Block a user