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.1821 05/04/13 16:22:43 hf@deer.(none) +15 -0
Merging
sql/sql_show.cc
1.237 05/04/13 16:22:30 hf@deer.(none) +1 -1
merging fix
sql/my_decimal.h
1.9 05/04/13 16:22:30 hf@deer.(none) +7 -1
Modifications to make decimal's checkings more correct
sql/item.cc
1.110 05/04/13 16:22:30 hf@deer.(none) +8 -12
Mergign
mysql-test/r/view_grant.result
1.2 05/04/13 16:22:30 hf@deer.(none) +4 -4
test result fixed
mysql-test/r/variables.result
1.62 05/04/13 16:22:30 hf@deer.(none) +1 -1
test result fixed
mysql-test/r/union.result
1.72 05/04/13 16:22:30 hf@deer.(none) +2 -2
test result fixed
mysql-test/r/type_newdecimal.result
1.7 05/04/13 16:22:30 hf@deer.(none) +4 -4
test result fixed
mysql-test/r/sum_distinct.result
1.6 05/04/13 16:22:30 hf@deer.(none) +0 -106
test result fixed
mysql-test/r/subselect.result
1.110 05/04/13 16:22:30 hf@deer.(none) +6 -6
test result fixed
mysql-test/r/ps_6bdb.result
1.27 05/04/13 16:22:30 hf@deer.(none) +21 -21
test result fixed
mysql-test/r/ps_5merge.result
1.26 05/04/13 16:22:29 hf@deer.(none) +42 -42
test result fixed
mysql-test/r/ps_4heap.result
1.25 05/04/13 16:22:29 hf@deer.(none) +21 -21
test result fixed
mysql-test/r/ps_3innodb.result
1.29 05/04/13 16:22:29 hf@deer.(none) +21 -21
test result fixed
mysql-test/r/ps_2myisam.result
1.26 05/04/13 16:22:29 hf@deer.(none) +21 -21
test result fixed
mysql-test/r/metadata.result
1.12 05/04/13 16:22:29 hf@deer.(none) +3 -3
test 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.8425
--- 1.109/sql/item.cc Wed Apr 13 12:34:58 2005
+++ 1.110/sql/item.cc Wed Apr 13 16:22:30 2005
@@ -4955,18 +4955,14 @@
}
if (Field::result_merge_type(fld_type) == DECIMAL_RESULT)
{
- int item_length= display_length(item);
- int intp1= item_length - min(item->decimals, NOT_FIXED_DEC - 1);
- int intp2= max_length - min(decimals, NOT_FIXED_DEC - 1);
- /* can't be overflow because it work only for decimals (no strings) */
- int dec_length= max(intp1, intp2) + decimals;
- max_length= max(max_length, (uint) max(item_length, dec_length));
- /*
- we can't allow decimals to be NOT_FIXED_DEC, to prevent creation
- decimal with max precision (see Field_new_decimal constcuctor)
- */
- if (decimals >= NOT_FIXED_DEC)
- decimals= NOT_FIXED_DEC - 1;
+ int item_precision= my_decimal_length2precision(display_length(item),
+ item->decimals);
+ int intp1= my_decimal_int_part(item_precision, item->decimals);
+ int intp2= my_decimal_int_part(precision, decimals);
+
+ decimals= min(max(decimals, item->decimals), DECIMAL_MAX_SCALE);
+ precision= min(max(intp1, intp2) + decimals, DECIMAL_MAX_PRECISION);
+ max_length= my_decimal_precision2length(precision, decimals);
}
else
max_length= max(max_length, display_length(item));
--- 1.236/sql/sql_show.cc Wed Apr 13 12:34:58 2005
+++ 1.237/sql/sql_show.cc Wed Apr 13 16:22:30 2005
@@ -2363,7 +2363,7 @@
table->field[8]->store((longlong) field->field_length/
field->charset()->mbmaxlen);
table->field[8]->set_notnull();
- table->field[9]->store((longlong) field->representation_length());
+ table->field[9]->store((longlong) field->field_length);
table->field[9]->set_notnull();
}
--- 1.71/mysql-test/r/union.result Wed Apr 13 12:34:58 2005
+++ 1.72/mysql-test/r/union.result Wed Apr 13 16:22:30 2005
@@ -589,7 +589,7 @@
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `it2` int(11) NOT NULL default '0'
+ `it2` int(4) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT i from t2 UNION select f from t2;
@@ -803,7 +803,7 @@
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `1` bigint(20) NOT NULL default '0'
+ `1` bigint(1) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select _latin1"test" union select _latin2"testt" ;
--- 1.109/mysql-test/r/subselect.result Fri Apr 1 17:06:31 2005
+++ 1.110/mysql-test/r/subselect.result Wed Apr 13 16:22:30 2005
@@ -1087,24 +1087,24 @@
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` bigint(20) NOT NULL default '0',
- `(SELECT 1)` bigint(20) NOT NULL default '0'
+ `a` bigint(1) NOT NULL default '0',
+ `(SELECT 1)` bigint(1) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` bigint(20) NOT NULL default '0',
- `(SELECT a)` bigint(20) NOT NULL default '0'
+ `a` bigint(1) NOT NULL default '0',
+ `(SELECT a)` bigint(0) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` bigint(20) NOT NULL default '0',
- `(SELECT a+0)` bigint(20) NOT NULL default '0'
+ `a` bigint(1) NOT NULL default '0',
+ `(SELECT a+0)` bigint(2) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
--- 1.25/mysql-test/r/ps_2myisam.result Wed Apr 13 12:06:49 2005
+++ 1.26/mysql-test/r/ps_2myisam.result Wed Apr 13 16:22:29 2005
@@ -1777,7 +1777,7 @@
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) NOT NULL default '0.0',
- `param02` decimal(65,31) default NULL,
+ `param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
@@ -1798,7 +1798,7 @@
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
- `param13` decimal(65,31) default NULL,
+ `param13` decimal(65,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1807,7 +1807,7 @@
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 33 Y 0 31 63
+def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1828,13 +1828,13 @@
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 31 63
+def test t5 t5 param13 param13 246 67 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.0000000000000000000000000000000
+param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1926,8 +1926,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1973,8 +1973,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2023,8 +2023,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2063,8 +2063,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2111,8 +2111,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2155,8 +2155,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2201,8 +2201,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2239,8 +2239,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
--- 1.28/mysql-test/r/ps_3innodb.result Wed Apr 13 12:06:49 2005
+++ 1.29/mysql-test/r/ps_3innodb.result Wed Apr 13 16:22:29 2005
@@ -1760,7 +1760,7 @@
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) NOT NULL default '0.0',
- `param02` decimal(65,31) default NULL,
+ `param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
@@ -1781,7 +1781,7 @@
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
- `param13` decimal(65,31) default NULL,
+ `param13` decimal(65,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1790,7 +1790,7 @@
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 33 Y 0 31 63
+def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1811,13 +1811,13 @@
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 31 63
+def test t5 t5 param13 param13 246 67 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.0000000000000000000000000000000
+param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1909,8 +1909,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1956,8 +1956,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2006,8 +2006,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2046,8 +2046,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2094,8 +2094,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2138,8 +2138,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2184,8 +2184,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2222,8 +2222,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
--- 1.24/mysql-test/r/ps_4heap.result Wed Apr 13 12:06:49 2005
+++ 1.25/mysql-test/r/ps_4heap.result Wed Apr 13 16:22:29 2005
@@ -1761,7 +1761,7 @@
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) NOT NULL default '0.0',
- `param02` decimal(65,31) default NULL,
+ `param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
@@ -1782,7 +1782,7 @@
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
- `param13` decimal(65,31) default NULL,
+ `param13` decimal(65,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1791,7 +1791,7 @@
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 33 Y 0 31 63
+def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1812,13 +1812,13 @@
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 31 63
+def test t5 t5 param13 param13 246 67 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.0000000000000000000000000000000
+param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1910,8 +1910,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1957,8 +1957,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2007,8 +2007,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2047,8 +2047,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2095,8 +2095,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2139,8 +2139,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2185,8 +2185,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2223,8 +2223,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
--- 1.25/mysql-test/r/ps_5merge.result Wed Apr 13 12:06:49 2005
+++ 1.26/mysql-test/r/ps_5merge.result Wed Apr 13 16:22:29 2005
@@ -1697,7 +1697,7 @@
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) NOT NULL default '0.0',
- `param02` decimal(65,31) default NULL,
+ `param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
@@ -1718,7 +1718,7 @@
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
- `param13` decimal(65,31) default NULL,
+ `param13` decimal(65,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1727,7 +1727,7 @@
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 33 Y 0 31 63
+def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1748,13 +1748,13 @@
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 31 63
+def test t5 t5 param13 param13 246 67 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.0000000000000000000000000000000
+param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1846,8 +1846,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1893,8 +1893,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1943,8 +1943,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1983,8 +1983,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2031,8 +2031,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2075,8 +2075,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2121,8 +2121,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2159,8 +2159,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4710,7 +4710,7 @@
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) NOT NULL default '0.0',
- `param02` decimal(65,31) default NULL,
+ `param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
@@ -4731,7 +4731,7 @@
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
- `param13` decimal(65,31) default NULL,
+ `param13` decimal(65,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -4740,7 +4740,7 @@
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 33 Y 0 31 63
+def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -4761,13 +4761,13 @@
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 31 63
+def test t5 t5 param13 param13 246 67 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.0000000000000000000000000000000
+param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -4859,8 +4859,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4906,8 +4906,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4956,8 +4956,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -4996,8 +4996,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5044,8 +5044,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5088,8 +5088,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5134,8 +5134,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -5172,8 +5172,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
--- 1.26/mysql-test/r/ps_6bdb.result Wed Apr 13 12:06:49 2005
+++ 1.27/mysql-test/r/ps_6bdb.result Wed Apr 13 16:22:30 2005
@@ -1760,7 +1760,7 @@
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` decimal(2,1) NOT NULL default '0.0',
- `param02` decimal(65,31) default NULL,
+ `param02` decimal(65,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
@@ -1781,7 +1781,7 @@
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
- `param13` decimal(65,31) default NULL,
+ `param13` decimal(65,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1790,7 +1790,7 @@
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 33 Y 0 31 63
+def test t5 t5 param02 param02 246 67 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1811,13 +1811,13 @@
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 31 63
+def test t5 t5 param13 param13 246 67 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.0000000000000000000000000000000
+param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1909,8 +1909,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -1956,8 +1956,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2006,8 +2006,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2046,8 +2046,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2094,8 +2094,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2138,8 +2138,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2184,8 +2184,8 @@
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
-def @arg11 253 67 6 Y 128 31 63
-def @arg12 253 67 6 Y 128 31 63
+def @arg11 253 67 6 Y 128 30 63
+def @arg12 253 67 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
@@ -2222,8 +2222,8 @@
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
-def @arg11 253 67 0 Y 128 31 63
-def @arg12 253 67 0 Y 128 31 63
+def @arg11 253 67 0 Y 128 30 63
+def @arg12 253 67 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
--- 1.6/mysql-test/r/type_newdecimal.result Wed Apr 13 12:06:49 2005
+++ 1.7/mysql-test/r/type_newdecimal.result Wed Apr 13 16:22:30 2005
@@ -712,7 +712,7 @@
1000000000000000000;
.7777777777777777777777777777777777777 *
1000000000000000000
-777777777777777777.7777777777777777777000000000000
+777777777777777777.777777777777777777700000000000
select .7777777777777777777777777777777777777 - 0.1;
.7777777777777777777777777777777777777 - 0.1
0.6777777777777777777777777777777777777
@@ -772,10 +772,10 @@
-99999999999999999.999
select truncate(99999999999999999999999999999999999999,31);
truncate(99999999999999999999999999999999999999,31)
-99999999999999999999999999999999999999.0000000000000000000000000000000
+99999999999999999999999999999999999999.000000000000000000000000000000
select truncate(99.999999999999999999999999999999999999,31);
truncate(99.999999999999999999999999999999999999,31)
-99.9999999999999999999999999999999
+100.000000000000000000000000000000
select truncate(99999999999999999999999999999999999999,-31);
truncate(99999999999999999999999999999999999999,-31)
99999990000000000000000000000000000000
@@ -841,4 +841,4 @@
drop table Sow6_2f;
select 10.3330000000000/12.34500000;
10.3330000000000/12.34500000
-0.8370190360469825840421223160000
+0.83701903604698258
--- 1.8/sql/my_decimal.h Wed Apr 13 10:38:23 2005
+++ 1.9/sql/my_decimal.h Wed Apr 13 16:22:30 2005
@@ -44,7 +44,7 @@
point on the border of our big digits))
*/
#define DECIMAL_MAX_PRECISION ((DECIMAL_BUFF_LENGTH * 9) - 8*2)
-#define DECIMAL_MAX_SCALE 31
+#define DECIMAL_MAX_SCALE 30
/*
maximum length of string representation (number of maximum decimal
@@ -64,6 +64,12 @@
where it want
*/
return decimal_size(precision, scale) + 1;
+}
+
+
+inline int my_decimal_int_part(uint precision, uint decimals)
+{
+ return precision - ((decimals == 31) ? 0 : decimals);
}
--- 1.1/mysql-test/r/view_grant.result Tue Apr 5 00:43:55 2005
+++ 1.2/mysql-test/r/view_grant.result Wed Apr 13 16:22:30 2005
@@ -72,12 +72,12 @@
c
show columns from mysqltest.v1;
Field Type Null Key Default Extra
-c bigint(20) YES NULL
-d bigint(20) YES NULL
+c bigint(12) YES NULL
+d bigint(12) YES NULL
show columns from mysqltest.v2;
Field Type Null Key Default Extra
-c bigint(20) YES NULL
-d bigint(20) YES NULL
+c bigint(12) YES NULL
+d bigint(12) YES NULL
explain select c from mysqltest.v1;
ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
show create view mysqltest.v1;
--- 1.5/mysql-test/r/sum_distinct.result Wed Apr 13 12:34:58 2005
+++ 1.6/mysql-test/r/sum_distinct.result Wed Apr 13 16:22:30 2005
@@ -95,109 +95,3 @@
SUM(DISTINCT id % 11)
55
DROP TABLE t1;
-CREATE TABLE t1 (id INTEGER);
-CREATE TABLE t2 (id INTEGER);
-INSERT INTO t1 (id) VALUES (1), (1), (1),(1);
-INSERT INTO t1 (id) SELECT id FROM t1;
-/* 8 */
-INSERT INTO t1 (id) SELECT id FROM t1;
-/* 12 */
-INSERT INTO t1 (id) SELECT id FROM t1;
-/* 16 */
-INSERT INTO t1 (id) SELECT id FROM t1;
-/* 20 */
-INSERT INTO t1 (id) SELECT id FROM t1;
-/* 24 */
-INSERT INTO t1 SELECT id+1 FROM t1;
-INSERT INTO t1 SELECT id+2 FROM t1;
-INSERT INTO t1 SELECT id+4 FROM t1;
-INSERT INTO t1 SELECT id+8 FROM t1;
-INSERT INTO t1 SELECT id+16 FROM t1;
-INSERT INTO t1 SELECT id+32 FROM t1;
-INSERT INTO t1 SELECT id+64 FROM t1;
-INSERT INTO t1 SELECT id+128 FROM t1;
-INSERT INTO t1 SELECT id+256 FROM t1;
-INSERT INTO t1 SELECT id+512 FROM t1;
-SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13;
-AVG(DISTINCT id)
-513.5000
-508.0000
-509.0000
-510.0000
-511.0000
-512.0000
-513.0000
-514.0000
-515.0000
-516.0000
-517.0000
-511.5000
-512.5000
-SELECT SUM(DISTINCT id)/COUNT(DISTINCT id) FROM t1 GROUP BY id % 13;
-SUM(DISTINCT id)/COUNT(DISTINCT id)
-513.5000
-508.0000
-509.0000
-510.0000
-511.0000
-512.0000
-513.0000
-514.0000
-515.0000
-516.0000
-517.0000
-511.5000
-512.5000
-INSERT INTO t1 SELECT id+1024 FROM t1;
-INSERT INTO t1 SELECT id+2048 FROM t1;
-INSERT INTO t1 SELECT id+4096 FROM t1;
-INSERT INTO t1 SELECT id+8192 FROM t1;
-INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand();
-SELECT SUM(DISTINCT id) sm FROM t1;
-sm
-134225920
-SELECT SUM(DISTINCT id) sm FROM t2;
-sm
-134225920
-SELECT SUM(DISTINCT id) sm FROM t1 group by id % 13;
-sm
-10327590
-10328851
-10330112
-10331373
-10332634
-10317510
-10318770
-10320030
-10321290
-10322550
-10323810
-10325070
-10326330
-SET max_heap_table_size=16384;
-SHOW variables LIKE 'max_heap_table_size';
-Variable_name Value
-max_heap_table_size 16384
-SELECT SUM(DISTINCT id) sm FROM t1;
-sm
-134225920
-SELECT SUM(DISTINCT id) sm FROM t2;
-sm
-134225920
-SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13;
-sm
-10327590
-10328851
-10330112
-10331373
-10332634
-10317510
-10318770
-10320030
-10321290
-10322550
-10323810
-10325070
-10326330
-DROP TABLE t1;
-DROP TABLE t2;
--- 1.61/mysql-test/r/variables.result Wed Apr 13 12:06:49 2005
+++ 1.62/mysql-test/r/variables.result Wed Apr 13 16:22:30 2005
@@ -504,7 +504,7 @@
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) default NULL,
- `c2` decimal(65,31) default NULL,
+ `c2` decimal(65,30) default NULL,
`c3` longtext,
`c4` double default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
--- 1.11/mysql-test/r/metadata.result Wed Apr 13 12:06:48 2005
+++ 1.12/mysql-test/r/metadata.result Wed Apr 13 16:22:29 2005
@@ -55,7 +55,7 @@
2 female no
select t1.id from t1 union select t2.id from t2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def id id 1 4 1 Y 32768 0 63
+def id id 1 3 1 Y 32768 0 63
id
1
2
@@ -76,12 +76,12 @@
1
select 1 union select 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def 1 1 8 20 1 N 32769 0 63
+def 1 1 8 1 1 N 32769 0 63
1
1
select * from (select 1 union select 1) aaa;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def aaa 1 1 8 20 1 N 32769 0 63
+def aaa 1 1 8 1 1 N 32769 0 63
1
1
drop table t1;
| Thread |
|---|
| • bk commit into 5.0 tree (hf:1.1821) | holyfoot | 13 Apr |