[MDEV-29958] Creation of table with too large definition does not obey KILL/max_statement_time Created: 2022-11-06  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Create Table
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File mdev29958.test    

 Description   

The test case only consists of one CREATE attempt and a thread demonstrating processlist, nothing complicated, but it has to be attached because it doesn't fit into JIRA description. The table definition in the test case has a very long list of ENUM values – while within the theoretical limits, obviously exceeding the real ones.

The attempt to create the table or alter an existing table with such a change eventually adds with ER_TOO_MANY_FIELDS (Table definition is too large), which is probably all right. The problem is that the attempt proceeds to the end even if the query is interrupted in the process, either by KILL or by exceeded max_statement_time.

Note how the status changes to Killed after max_statement_time, but the query remains in the processlist and ends with its own error, not with the interruption.

10.3 92be8d20

show processlist;
Id	User	Host	db	Command	Time	State	Info	Progress
4	root	localhost	test	Query	0	Init	show processlist	0.000
5	root	localhost	test	Query	0	Init	CREATE TABLE t (a ENUM('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','	0.000
...
show processlist;
Id	User	Host	db	Command	Time	State	Info	Progress
4	root	localhost	test	Query	0	Init	show processlist	0.000
5	root	localhost	test	Query	3	Creating table	CREATE TABLE t (a ENUM('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','	0.000
show processlist;
Id	User	Host	db	Command	Time	State	Info	Progress
4	root	localhost	test	Query	0	Init	show processlist	0.000
5	root	localhost	test	Killed	4	Creating table	CREATE TABLE t (a ENUM('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','	0.000
...
show processlist;
Id	User	Host	db	Command	Time	State	Info	Progress
4	root	localhost	test	Query	0	Init	show processlist	0.000
5	root	localhost	test	Killed	25	Creating table	CREATE TABLE t (a ENUM('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','	0.000
connection con1;
ERROR HY000: Table definition is too large

Reproducible on all of 10.3-10.11. Non-debug builds naturally run faster, but are affected as well.


Generated at Thu Feb 08 10:12:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.