Commit 57982bcc authored by unknown's avatar unknown

Merge deer.(none):/home/hf/work/mysql-5.0.13667

into deer.(none):/home/hf/work/mysql-5.0.12267


sql/sql_parse.cc:
  Auto merged
parents 821107cf d3008173
......@@ -1019,3 +1019,5 @@ drop procedure wg2;
select cast(@non_existing_user_var/2 as DECIMAL);
cast(@non_existing_user_var/2 as DECIMAL)
NULL
create table t (d decimal(0,10));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'd').
......@@ -1044,3 +1044,9 @@ drop procedure wg2;
#
select cast(@non_existing_user_var/2 as DECIMAL);
#
# Bug #13667 (Inconsistency for decimal(m,d) specification
#
--error 1427
create table t (d decimal(0,10));
......@@ -5791,7 +5791,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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment