1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug#16172 DECIMAL data type processed incorrectly

issue an 'overflow warning' if result value is bigger than max possible value
This commit is contained in:
gluh@mysql.com/gluh.(none)
2006-08-08 16:03:42 +05:00
parent 91c118e224
commit 7e07425b2b
9 changed files with 85 additions and 5 deletions

View File

@ -463,7 +463,7 @@ Item *create_func_cast(Item *a, Cast_target cast_type, int len, int dec,
case ITEM_CAST_TIME: res= new Item_time_typecast(a); break;
case ITEM_CAST_DATETIME: res= new Item_datetime_typecast(a); break;
case ITEM_CAST_DECIMAL:
res= new Item_decimal_typecast(a, (len>0) ? len : 10, dec ? dec : 2);
res= new Item_decimal_typecast(a, (len > 0) ? len : 10, dec);
break;
case ITEM_CAST_CHAR:
res= new Item_char_typecast(a, len, cs ? cs :