List:Commits« Previous MessageNext Message »
From:gluh Date:July 6 2006 11:21am
Subject:bk commit into 5.1 tree (gluh:1.2247) BUG#16172
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh 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.2247 06/07/06 16:21:13 gluh@stripped +3 -0
  Bug#16172 DECIMAL data type processed incorrectly(partial fix)
  do not increase decimal part on 2(according to manual)

  sql/item_create.cc
    1.63 06/07/06 16:19:00 gluh@stripped +1 -1
    Bug#16172 DECIMAL data type processed incorrectly(partial fix)
    do not increase decimal part on 2(according to manual)

  mysql-test/r/view.result
    1.167 06/07/06 16:19:00 gluh@stripped +1 -1
    Bug#16172 DECIMAL data type processed incorrectly(partial fix)
    result fix

  mysql-test/r/cast.result
    1.44 06/07/06 16:19:00 gluh@stripped +2 -2
    Bug#16172 DECIMAL data type processed incorrectly(partial fix)
    result fix

# 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:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Bugs/5.1.16172

--- 1.62/sql/item_create.cc	Sun Apr 23 05:00:03 2006
+++ 1.63/sql/item_create.cc	Thu Jul  6 16:19:00 2006
@@ -467,7 +467,7 @@ Item *create_func_cast(Item *a, Cast_tar
   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 : 

--- 1.166/mysql-test/r/view.result	Fri Jun 16 03:49:44 2006
+++ 1.167/mysql-test/r/view.result	Thu Jul  6 16:19:00 2006
@@ -1787,7 +1787,7 @@ drop table t1;
 create view v1 as select cast(1 as decimal);
 select * from v1;
 cast(1 as decimal)
-1.00
+1
 drop view v1;
 create table t1(f1 int);
 create table t2(f2 int);

--- 1.43/mysql-test/r/cast.result	Sun Jun 18 15:20:26 2006
+++ 1.44/mysql-test/r/cast.result	Thu Jul  6 16:19:00 2006
@@ -103,7 +103,7 @@ Warnings:
 Warning	1292	Truncated incorrect DOUBLE value: 'a'
 select 10.0+cast('a' as decimal);
 10.0+cast('a' as decimal)
-10.00
+10.0
 Warnings:
 Warning	1292	Truncated incorrect DECIMAL value: 'a'
 select 10E+0+'a';
@@ -376,7 +376,7 @@ INSERT INTO t1 VALUES ('1.01', '2.02', '
 SELECT CAST(v AS DECIMAL), CAST(tt AS DECIMAL), CAST(t AS DECIMAL),
 CAST(mt AS DECIMAL), CAST(lt AS DECIMAL) from t1;
 CAST(v AS DECIMAL)	CAST(tt AS DECIMAL)	CAST(t AS DECIMAL)	CAST(mt AS DECIMAL)	CAST(lt AS DECIMAL)
-1.01	2.02	3.03	4.04	5.05
+1	2	3	4	5
 DROP TABLE t1;
 select cast(NULL as decimal(6)) as t1;
 t1
Thread
bk commit into 5.1 tree (gluh:1.2247) BUG#16172gluh6 Jul