List:Internals« Previous MessageNext Message »
From:jani Date:May 12 2005 4:37pm
Subject:bk commit into 5.0 tree (jani:1.1942)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jani. When jani 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.1942 05/05/12 17:37:38 jani@stripped +3 -0
  Fixed bug 10465.

  sql/field.cc
    1.259 05/05/12 17:36:29 jani@stripped +6 -1
    Fixed bug 10465.

  mysql-test/t/type_newdecimal.test
    1.11 05/05/12 17:36:29 jani@stripped +10 -0
    Fixed bug 10465.

  mysql-test/r/type_newdecimal.result
    1.12 05/05/12 17:36:29 jani@stripped +9 -0
    Fixed bug 10465.

# 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:	jani
# Host:	a193-229-222-105.elisa-laajakaista.fi
# Root:	/home/my/bk/mysql-5.0

--- 1.258/sql/field.cc	Thu May  5 18:05:56 2005
+++ 1.259/sql/field.cc	Thu May 12 17:36:29 2005
@@ -8060,7 +8060,12 @@
     }
     break;
   case MYSQL_TYPE_NEWDECIMAL:
-    key_length= pack_length= my_decimal_get_binary_size(length, decimals);
+    key_length= pack_length=
+      my_decimal_get_binary_size(my_decimal_length_to_precision(length,
+								decimals,
+								flags &
+								UNSIGNED_FLAG),
+				 decimals);
     break;
   default:
     key_length= pack_length= calc_pack_length(sql_type, length);

--- 1.11/mysql-test/r/type_newdecimal.result	Tue May 10 09:25:22 2005
+++ 1.12/mysql-test/r/type_newdecimal.result	Thu May 12 17:36:29 2005
@@ -876,3 +876,12 @@
 f1	f2
 9999999999999999999999999999999999.00000000000000000000	0.00
 DROP TABLE t1;
+CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
+INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
+SELECT GRADE  FROM t1 WHERE GRADE > 160 AND GRADE < 300;
+GRADE
+252
+SELECT GRADE  FROM t1 WHERE GRADE= 151;
+GRADE
+151
+DROP TABLE t1;

--- 1.10/mysql-test/t/type_newdecimal.test	Tue May 10 09:25:22 2005
+++ 1.11/mysql-test/t/type_newdecimal.test	Thu May 12 17:36:29 2005
@@ -906,3 +906,13 @@
 INSERT INTO t1 VALUES (9999999999999999999999999999999999, 0);
 SELECT * FROM t1;
 DROP TABLE t1;
+
+#
+# Bug #10465
+#
+
+CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
+INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
+SELECT GRADE  FROM t1 WHERE GRADE > 160 AND GRADE < 300;
+SELECT GRADE  FROM t1 WHERE GRADE= 151;
+DROP TABLE t1;
Thread
bk commit into 5.0 tree (jani:1.1942)jani13 May