diff options
author | Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> | 2012-12-24 06:39:54 +0530 |
---|---|---|
committer | Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> | 2012-12-24 06:39:54 +0530 |
commit | 259a5a301cc3cbc14a9d70b837e7ab2b39d50288 (patch) | |
tree | 4432c61f7c9c062ad956e23b8c0c3e47dcf6af77 /BUILD | |
parent | 4a35c6d44b7c400e8b89cdff99a628cc2a903ebd (diff) | |
download | mariadb-git-259a5a301cc3cbc14a9d70b837e7ab2b39d50288.tar.gz |
Bug#11757005: UNION CONVERTS UNSIGNED MEDIUMINT AND BIGINT
TO SIGNED
Problem:
When we are joining types (of fields) in case of a union, we usually
upgrade the datatypes to the largest present in the query.
In case of mediumint, it is not happening.
Analysis:
When joined with types LONG and LONGLONG, mediumint should get
upgraded to LONG and LONGLONG respectively.
W.r.t the given query, constant '1' will be created as a LONGLONG
internally and SIGNED flag is enabled. As a result, while combining
types for the field, LONGLONG along with MEDIUMINT gets converted
to LONG first. LONG with MEDIUMINT(of the third select) gets converted
to MEDIUMINT. SIGNED FLAG would be that of the first field's.
As a result, the final result would be SIGNED MEDIUMINT.
Fix:
While joining types, MEDIUMINT with LONGLONG and MEDIUMINT with LONG
is converted to LONGLONG and LONG respectively. Also, made some
changes for FLOAT and DOUBLE.
sql/field.cc:
Changed merge types for MEDIUMINT.
Diffstat (limited to 'BUILD')
0 files changed, 0 insertions, 0 deletions