Commit 2564650f authored by Alexander Barkov's avatar Alexander Barkov

MDEV-9662 Assertion `precision || !scale' failed in...

MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)

The patch for MDEV-9745 earlier fixed the problem reported in MDEV-9662 as well.
Only adding tests.
parent 9a987142
......@@ -1794,6 +1794,12 @@ SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY
DROP FUNCTION f1;
DROP TABLE t1;
--echo #
--echo # MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
--echo #
SELECT @@collation_connection;
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
--echo #
--echo # MDEV-5702 Incorrect results are returned with NULLIF()
--echo #
......
......@@ -2849,6 +2849,15 @@ f1()
DROP FUNCTION f1;
DROP TABLE t1;
#
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
#
SELECT @@collation_connection;
@@collation_connection
binary
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
CASE 1 WHEN 2 THEN ( - '3' ) END
NULL
#
# MDEV-5702 Incorrect results are returned with NULLIF()
#
CREATE TABLE t1 (d DATE);
......
......@@ -3241,6 +3241,15 @@ f1()
DROP FUNCTION f1;
DROP TABLE t1;
#
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
#
SELECT @@collation_connection;
@@collation_connection
cp1251_general_ci
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
CASE 1 WHEN 2 THEN ( - '3' ) END
NULL
#
# MDEV-5702 Incorrect results are returned with NULLIF()
#
CREATE TABLE t1 (d DATE);
......
......@@ -3423,6 +3423,15 @@ f1()
DROP FUNCTION f1;
DROP TABLE t1;
#
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
#
SELECT @@collation_connection;
@@collation_connection
latin1_swedish_ci
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
CASE 1 WHEN 2 THEN ( - '3' ) END
NULL
#
# MDEV-5702 Incorrect results are returned with NULLIF()
#
CREATE TABLE t1 (d DATE);
......
......@@ -4239,6 +4239,15 @@ f1()
DROP FUNCTION f1;
DROP TABLE t1;
#
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
#
SELECT @@collation_connection;
@@collation_connection
ucs2_general_ci
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
CASE 1 WHEN 2 THEN ( - '3' ) END
NULL
#
# MDEV-5702 Incorrect results are returned with NULLIF()
#
CREATE TABLE t1 (d DATE);
......
......@@ -5060,6 +5060,15 @@ f1()
DROP FUNCTION f1;
DROP TABLE t1;
#
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
#
SELECT @@collation_connection;
@@collation_connection
utf8_general_ci
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
CASE 1 WHEN 2 THEN ( - '3' ) END
NULL
#
# MDEV-5702 Incorrect results are returned with NULLIF()
#
CREATE TABLE t1 (d DATE);
......
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