Commit 13c6b0d5 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-10309 COALESCE(12345678900) makes a column of a wrong type and truncates the data

Previous fixes in Type_handler
(see the patch for MDEV-12875, MDEV-12886, MDEV-12916)
fixed this problem as well. Adding only the test from the report.
parent 9d834c76
......@@ -3557,5 +3557,19 @@ COALESCE(a) int(11) YES NULL
DROP VIEW v1;
DROP TABLE t1;
#
# MDEV-10309 COALESCE(12345678900) makes a column of a wrong type and truncates the data
#
CREATE TABLE t1 AS SELECT 12345678900 AS c1, COALESCE(12345678900) AS c2;
SELECT * FROM t1;
c1 c2
12345678900 12345678900
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(11) NOT NULL,
`c2` bigint(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# End of 10.3 tests
#
......@@ -544,6 +544,15 @@ DESCRIBE v1;
DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # MDEV-10309 COALESCE(12345678900) makes a column of a wrong type and truncates the data
--echo #
CREATE TABLE t1 AS SELECT 12345678900 AS c1, COALESCE(12345678900) AS c2;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment