Bug #13372 wrong result field type of decimal union

Submitted: 21 Sep 2005 9:31 Modified: 13 Oct 2005 2:43
Reporter: Ramil Kalimullin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:
Assigned to: Alexey Botchkov CPU Architecture:Any

[21 Sep 2005 9:31] Ramil Kalimullin
Description:
Union of two decimal fields is of wrong type.

How to repeat:
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;
show create table t3;

-- here we get decimal(10,9)
[27 Sep 2005 10:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30368
[27 Sep 2005 10:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30370
[27 Sep 2005 11:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30372
[13 Oct 2005 2:43] Mike Hillyer
Documented in 4.1.15 changelog:

 <listitem>
        <para>
          UNION of two DECIMAL columns returned wrong field type. (Bug
          #13372)
        </para>
      </listitem>

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.