List:Internals« Previous MessageNext Message »
From:holyfoot Date:October 11 2005 4:18pm
Subject:bk commit into 5.0 tree (hf:1.2034) BUG#13667
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2034 05/10/11 21:18:04 hf@deer.(none) +3 -0
  Fix for bug #13667 (Inconsistency for decimal(m,d) specification.

  sql/sql_parse.cc
    1.505 05/10/11 21:16:46 hf@deer.(none) +1 -1
    we should check if 'decimals' is not null

  mysql-test/t/type_newdecimal.test
    1.30 05/10/11 21:16:46 hf@deer.(none) +6 -0
    testcase added

  mysql-test/r/type_newdecimal.result
    1.32 05/10/11 21:16:46 hf@deer.(none) +2 -0
    result fixed

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	hf
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-5.0.13667

--- 1.504/sql/sql_parse.cc	Tue Oct 11 00:41:50 2005
+++ 1.505/sql/sql_parse.cc	Tue Oct 11 21:16:46 2005
@@ -5748,7 +5748,7 @@
   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)
     {

--- 1.31/mysql-test/r/type_newdecimal.result	Fri Sep 30 15:01:26 2005
+++ 1.32/mysql-test/r/type_newdecimal.result	Tue Oct 11 21:16:46 2005
@@ -1019,3 +1019,5 @@
 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').

--- 1.29/mysql-test/t/type_newdecimal.test	Wed Sep 14 08:25:21 2005
+++ 1.30/mysql-test/t/type_newdecimal.test	Tue Oct 11 21:16:46 2005
@@ -1044,3 +1044,9 @@
 #
 
 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));
Thread
bk commit into 5.0 tree (hf:1.2034) BUG#13667holyfoot11 Oct