Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
12.3.1
-
None
-
ubuntu22.04
mariadb12.3.1
-
Not for Release Notes
Description
Summary
Server aborts on assertion in `do_varstring1_no_truncation()` (`sql/field_conv.cc:564`) when selecting from a table with an indexed virtual `VARBINARY` column using `GROUP BY ... HAVING ... ORDER BY`.
Product / Version
- MariaDB Server `12.3.1-MariaDB-asan-debug`
- Source revision: `21a0714a118614982d20bfa504763d7247800091`
Environment
- OS: ubuntu22.04
- Reproduced via CLI over local socket (server terminates; client sees disconnect)
Steps to Reproduce
```sql
DROP DATABASE IF EXISTS vcolhunt_new;
CREATE DATABASE vcolhunt_new;
USE vcolhunt_new;
DROP TABLE IF EXISTS t;
CREATE TABLE t (
c VARBINARY(255),
vc VARBINARY(255) AS (c) VIRTUAL,
KEY (vc(8))
);
INSERT INTO t (c) VALUES ('0123456789'),('1234567890');
SELECT c, vc, COUNT( * ) cnt
FROM t
GROUP BY c, vc
HAVING cnt > 1
ORDER BY vc;
```
Actual Result
ERROR 2026 (HY000): TLS/SSL error: unexpected eof while reading
Backtrace (from server error log)
```text
sql/field_conv.cc:565(do_varstring1_no_truncation(Copy_field const*))
sql/field_conv.cc:250(do_copy_null(Copy_field const*))
sql/sql_select.cc:29705(copy_fields(TMP_TABLE_PARAM*))
sql/sql_select.cc:26284(end_update(JOIN*, st_join_table*, bool))
sql/sql_select.cc:33711(AGGR_OP::put_record(bool))
sql/sql_select.cc:24259(sub_select_postjoin_aggr(JOIN*, st_join_table*, bool))
sql/sql_select.cc:24808(evaluate_join_record(JOIN*, st_join_table*, int))
sql/sql_select.cc:24575(sub_select(JOIN*, st_join_table*, bool))
sql/sql_select.cc:24086(do_select(JOIN*, Procedure*))
sql/sql_select.cc:5125(JOIN::exec_inner())
sql/sql_select.cc:4913(JOIN::exec())
sql/sql_select.cc:5439(mysql_select(...))
sql/sql_select.cc:636(handle_select(...))
sql/sql_parse.cc:6212(execute_sqlcom_select(...))
sql/sql_parse.cc:3987(mysql_execute_command(...))
sql/sql_parse.cc:7940(mysql_parse(...))
sql/sql_parse.cc:1898(dispatch_command(...))
sql/sql_parse.cc:1432(do_command(...))
sql/sql_connect.cc:1503(do_handle_one_connection(...))
sql/sql_connect.cc:1417(handle_one_connection)
perfschema/pfs.cc:2200(pfs_spawn_thread)
```
Attachments
Issue Links
- duplicates
-
MDEV-38685 Table corruption, Assertion `length <= copy->to_length - 2', ASAN errors with GROUP BY and indexed virtual columns
-
- Open
-