Bug #88256 | Assertion `max_length >= length' failed. | ||
---|---|---|---|
Submitted: | 27 Oct 2017 21:58 | Modified: | 23 Sep 2018 23:49 |
Reporter: | Roel Van de Paar | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S6 (Debug Builds) |
Version: | 8.0.3 RC | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | debug |
[27 Oct 2017 21:58]
Roel Van de Paar
[27 Oct 2017 21:58]
Roel Van de Paar
This bug is all over the runs. Will add few more testcases.
[27 Oct 2017 22:32]
Roel Van de Paar
More testcases # mysqld options required for replay: --sql_mode= CREATE DATABASE test; USE test; SET @@session.max_sort_length=20; CREATE TEMPORARY TABLE t1(a int,b int,primary key (a)) engine=none; SET NAMES utf8; insert into t1 values(-999.999,-999.999); SELECT hex(a)ha,hex(lower(a)) hl,hex(upper(a)) hu,a,lower(a) l,upper(a) u FROM t1 order by ha; # mysqld options required for replay: --sql_mode= --server-id=1 CREATE DATABASE test; USE test; xa start0; create temporary TABLE t1(a int)engine=none; INSERT INTO t1 VALUES("hoho"); SET @@session.max_sort_length=5; delete from t1 order by(inet_ntoa(a)) desc; # mysqld options required for replay: --sql_mode= --server-id=1 CREATE DATABASE test; USE test; CREATE TABLE t1(a VARCHAR(334)CHARACTER SET utf16le KEY) engine=none; SET @@session.max_sort_length=20; INSERT INTO t1 VALUES('-11:22:33.999'); select * FROM t1 order by(oct(a)); # mysqld options required for replay: --sql_mode= --server-id=1 CREATE DATABASE test; USE test; CREATE TABLE t1(a CHAR (1)CHARACTER SET ucs2); SET @@session.max_sort_length=5; insert INTO t1 values(0x110000); delete FROM t1 order by(inet_ntoa(a)) desc; # mysqld options required for replay: --sql_mode= --server-id=1 CREATE DATABASE test; USE test; CREATE TABLE t1(a CHAR (255)default'',KEY a (a)) ENGINE=none DEFAULT CHARSET=utf8 COLLATE utf8_general_ci; SET @@session.max_sort_length=20; insert INTO t1 values(-99999999999999),(-1),('+1'),(''),('+00000000000001'),('+1234567890'),(99999999999999); select * FROM t1 order by(oct(a)); # mysqld options required for replay: --sql_mode= CREATE DATABASE test; USE test; SET @@session.character_set_connection=utf8; create TABLE t1(a CHAR (1),key a(a)) collate utf8_czech_ci; INSERT INTO t1 VALUES('2007-08-01 12:22:59'); SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a); CREATE DATABASE test; USE test; SET max_sort_length=4; create temporary TABLE t1 as SELECT 1 a; delete from t1 order by(inet_ntoa(a)) desc; CREATE DATABASE test; USE test; SET NAMES 'utf8'; create temporary TABLE t1(a int)ENGINE=InnoDB; INSERT INTO t1 VALUES(1); SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
[27 Oct 2017 23:17]
MySQL Verification Team
Thank you for the bug report.
[14 Nov 2017 18:22]
Paul DuBois
Posted by developer: Noted in 8.0.4, 9.0.0. Length calculations for string-valued user-defined variables could be incorrect if the collation was changed.
[23 Sep 2018 23:48]
Roel Van de Paar
See also bug 92537
[23 Sep 2018 23:49]
Roel Van de Paar
See also bug 88278