Commit 54652004 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string

Adding 10.2 specific tests only. No code changes.

The problem was earlier fixed by MDEV-21580 and MDEV-22715.
parent 189bf300
......@@ -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
......@@ -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
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