diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-12-29 22:50:10 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2021-12-29 22:58:52 +0400 |
commit | 756568f26c6a23c537f4d93ff00f485c6291c92e (patch) | |
tree | 83a2e8561c46f76eca37978f24041257300774cc | |
parent | c9fcea14e9e1f34a97451706eac51276c85bbea7 (diff) | |
download | mariadb-git-bb-10.8-bar-MDEV-22256.tar.gz |
MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_stringbb-10.8-bar-MDEV-22256
Adding 10.5 specific tests only. No code change.
The patches for MDEV-21580 and MDEV-22715 fixed this problem.
-rw-r--r-- | plugin/type_inet/mysql-test/type_inet/type_inet6.result | 33 | ||||
-rw-r--r-- | plugin/type_inet/mysql-test/type_inet/type_inet6.test | 21 |
2 files changed, 54 insertions, 0 deletions
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.result b/plugin/type_inet/mysql-test/type_inet/type_inet6.result index 0ac5f666b86..6e05d589695 100644 --- a/plugin/type_inet/mysql-test/type_inet/type_inet6.result +++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.result @@ -2194,3 +2194,36 @@ SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != '::1'; f :: DROP TABLE t1; +# +# MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string +# +SET sql_mode=''; +SET @@SESSION.max_sort_length=4; +Warnings: +Warning 1292 Truncated incorrect max_sort_length value: '4' +CREATE TEMPORARY TABLE t1(c INET6,d DATE); +INSERT INTO t1 VALUES(0,0); +Warnings: +Warning 1292 Incorrect inet6 value: '0' for column `test`.`t1`.`c` at row 1 +SELECT c FROM t1 ORDER BY c; +c +:: +DROP TABLE t1; +SET max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; +CREATE TABLE t1 (a INET6); +INSERT INTO t1 VALUES ('::'),('f::f'); +SET SESSION max_sort_length= 8; +Warnings: +Warning 1292 Truncated incorrect max_sort_length value: '8' +SELECT CASE 1 WHEN 0 THEN 'foo' ELSE a END AS f FROM t1 GROUP BY f WITH ROLLUP; +f +:: +f::f +NULL +SELECT CASE 1 WHEN 0 THEN 'foo' ELSE a END AS f FROM t1 GROUP BY f; +f +:: +f::f +DROP TABLE t1; +SET max_sort_length=DEFAULT; diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.test b/plugin/type_inet/mysql-test/type_inet/type_inet6.test index 6a5db1ad43f..09f7e235cd8 100644 --- a/plugin/type_inet/mysql-test/type_inet/type_inet6.test +++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.test @@ -1612,3 +1612,24 @@ SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != ''; SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != '::'; SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != '::1'; DROP TABLE t1; + +--echo # +--echo # MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string +--echo # + +SET sql_mode=''; +SET @@SESSION.max_sort_length=4; +CREATE TEMPORARY TABLE t1(c INET6,d DATE); +INSERT INTO t1 VALUES(0,0); +SELECT c FROM t1 ORDER BY c; +DROP TABLE t1; +SET max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; + +CREATE TABLE t1 (a INET6); +INSERT INTO t1 VALUES ('::'),('f::f'); +SET SESSION max_sort_length= 8; +SELECT CASE 1 WHEN 0 THEN 'foo' ELSE a END AS f FROM t1 GROUP BY f WITH ROLLUP; +SELECT CASE 1 WHEN 0 THEN 'foo' ELSE a END AS f FROM t1 GROUP BY f; +DROP TABLE t1; +SET max_sort_length=DEFAULT; |