diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-05-31 18:52:32 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-05-31 18:52:32 +0400 |
commit | ffe83e8e7bef32eb2a80aad2d382f0b023dd3a44 (patch) | |
tree | 065bfa8c2afb2dcb2096e40d18c2e56a61eae47f /mysql-test/main/gis.result | |
parent | 3ceb4a54a178d3e92529b4be16e866e18fd15218 (diff) | |
download | mariadb-git-ffe83e8e7bef32eb2a80aad2d382f0b023dd3a44.tar.gz |
MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
Now the boolean data type is preserved in hybrid functions and MIN/MAX,
so COALESCE(bool_expr,bool_expr) and MAX(bool_expr) are correctly
detected by JSON_OBJECT() as being boolean rather than numeric expressions.
Diffstat (limited to 'mysql-test/main/gis.result')
-rw-r--r-- | mysql-test/main/gis.result | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result index 3f2e6d39db8..1cc4e45629b 100644 --- a/mysql-test/main/gis.result +++ b/mysql-test/main/gis.result @@ -4920,3 +4920,25 @@ ERROR HY000: Illegal parameter data type geometry for operation 'is_used_lock' # # End of 10.3 tests # +# +# Start of 10.4 tests +# +# +# MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers +# +SELECT ST_SRID(TRUE); +ERROR HY000: Illegal parameter data type boolean for operation 'srid' +SELECT ST_SRID(COALESCE(TRUE,TRUE)); +ERROR HY000: Illegal parameter data type boolean for operation 'srid' +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT ST_SRID((SELECT MAX(a)>3 FROM t1)); +ERROR HY000: Illegal parameter data type boolean for operation 'srid' +SELECT ST_SRID(MAX(a>3)) FROM t1; +ERROR HY000: Illegal parameter data type boolean for operation 'srid' +SELECT ST_SRID((SELECT MAX(a>3) FROM t1)); +ERROR HY000: Illegal parameter data type boolean for operation 'srid' +DROP TABLE t1; +# +# End of 10.4 tests +# |