diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-12-29 23:04:13 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2021-12-29 23:04:13 +0400 |
commit | 546520042f91e1b8ddc0af04a24629b3ceffbc87 (patch) | |
tree | aff40b34dcbe2609fda1a5d00bd2e9a8c6b16240 | |
parent | 189bf300cae5bbf147b780d6191f7fef6ad58678 (diff) | |
download | mariadb-git-546520042f91e1b8ddc0af04a24629b3ceffbc87.tar.gz |
MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_stringbb-10.2-bar-MDEV-22256
Adding 10.2 specific tests only. No code changes.
The problem was earlier fixed by MDEV-21580 and MDEV-22715.
-rw-r--r-- | mysql-test/r/order_by.result | 23 | ||||
-rw-r--r-- | mysql-test/t/order_by.test | 23 |
2 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 39b4e25d670..d1f2d067643 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -3485,4 +3485,27 @@ b a 40 1 30 4 drop table t1,t2; +# +# 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 TABLE t1 (c TIMESTAMP(1)); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; +SET sql_mode=''; +SET @@SESSION.max_sort_length=1; +Warnings: +Warning 1292 Truncated incorrect max_sort_length value: '1' +CREATE TEMPORARY TABLE t1 (c DATETIME); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; # End of 10.2 tests diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 4e50fc5b3c6..7cb24b7d03b 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -2309,4 +2309,27 @@ explain (select b,a from t2 order by a limit 3) order by b desc; drop table t1,t2; +--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 TABLE t1 (c TIMESTAMP(1)); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; + +SET sql_mode=''; +SET @@SESSION.max_sort_length=1; +CREATE TEMPORARY TABLE t1 (c DATETIME); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; + + --echo # End of 10.2 tests |