diff options
author | unknown <ramil@mysql.com> | 2005-09-21 14:32:19 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-09-21 14:32:19 +0500 |
commit | ecbc0dcb9086c4dd6581f8418002548d9fbc90e6 (patch) | |
tree | f824a5e5b4454dcc84597a2412aedd6c130ccc61 /mysql-test/r | |
parent | 12a960fae0d31877f8a494c14685001ebc612e66 (diff) | |
download | mariadb-git-ecbc0dcb9086c4dd6581f8418002548d9fbc90e6.tar.gz |
a fix (bug #7589: Decimal types are ignored when updating data from another column).
mysql-test/r/union.result:
a fix (bug #7589: Decimal types are ignored when updating data from another column).
removed wrong test result (see #13372)
mysql-test/t/union.test:
a fix (bug #7589: Decimal types are ignored when updating data from another column).
removed wrong test result (see #13372)
sql/field_conv.cc:
a fix (bug #7589: Decimal types are ignored when updating data from another column).
use memcpy() only for identical decimals.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/type_decimal.result | 9 | ||||
-rw-r--r-- | mysql-test/r/union.result | 15 |
2 files changed, 9 insertions, 15 deletions
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index a9dcabd121e..c3b2d5090ef 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -646,3 +646,12 @@ a 9999.999 0000.000 drop table t1; +create table t1(a decimal(10,5), b decimal(10,1)); +insert into t1 values(123.12345, 123.12345); +update t1 set b=a; +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +select * from t1; +a b +123.12345 123.1 +drop table t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 1b5fa69d713..a3dd2c5c291 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -780,21 +780,6 @@ t1 CREATE TABLE `t1` ( `b` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2; -create table t1 (d decimal(10,1)); -create table t2 (d decimal(10,9)); -insert into t1 values ("100000000.0"); -insert into t2 values ("1.23456780"); -create table t3 select * from t2 union select * from t1; -select * from t3; -d -1.234567800 -100000000.0 -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `d` decimal(10,9) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1,t2,t3; create table t1 select 1 union select -1; select * from t1; 1 |