summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/parts/t/print_error.test
blob: 79da0d87f4b4fc4327fafd7623beaf2ba0308235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# MDEV-15336 Server crashes in handler::print_error / ha_partition::print_error upon query timeout
#
--source include/have_innodb.inc
--source include/not_embedded.inc
--source include/have_partition.inc

CREATE TABLE t1 (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
XA START 'xid';
INSERT INTO t1 VALUES (1),(2),(3),(4);

--connect (con1,localhost,root,,test)
--send CREATE TABLE t2 SELECT * FROM t1;

--connect (con2,localhost,root,,test)
SET max_statement_time= 1;
--error ER_STATEMENT_TIMEOUT
DELETE FROM t1 PARTITION (p1) ORDER BY i LIMIT 2;

# Cleanup
--disconnect con2
--connection default
XA END 'xid';
XA ROLLBACK 'xid';
--connection con1
--reap
--disconnect con1
--connection default
call mtr.add_suppression('Sort aborted');
DROP TABLE IF EXISTS t2, t1;