1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for bug #13667 (Inconsistency for decimal(m,d) specification.

mysql-test/r/type_newdecimal.result:
  result fixed
mysql-test/t/type_newdecimal.test:
  testcase added
sql/sql_parse.cc:
  we should check if 'decimals' is not null
This commit is contained in:
unknown
2005-10-11 21:18:04 +05:00
parent d471e9de7d
commit d30081732a
3 changed files with 9 additions and 1 deletions

View File

@ -5748,7 +5748,7 @@ new_create_field(THD *thd, char *field_name, enum_field_types type,
case FIELD_TYPE_NULL:
break;
case FIELD_TYPE_NEWDECIMAL:
if (!length)
if (!length && !new_field->decimals)
new_field->length= 10;
if (new_field->length > DECIMAL_MAX_PRECISION)
{