Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-22187: SIGSEGV in ha_innobase::cmp_ref on DELETE
Added a new test file for tests with delete using INNODB.
- Loading branch information
Varun Gupta
committed
Jun 22, 2020
1 parent
9160e4a
commit 545a619
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Tests for delete with INNODB | ||
# | ||
# MDEV-22187: SIGSEGV in ha_innobase::cmp_ref on DELETE | ||
# | ||
SET @save_sort_buffer_size= @@sort_buffer_size; | ||
SET sort_buffer_size=1024; | ||
CREATE TABLE t1(c1 CHAR(255) PRIMARY KEY) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES (0), ('a'), ('b'); | ||
ANALYZE TABLE T1 PERSISTENT FOR ALL; | ||
Table Op Msg_type Msg_text | ||
test.t1 analyze status Engine-independent statistics collected | ||
test.t1 analyze status OK | ||
SELECT * FROM t1; | ||
c1 | ||
0 | ||
a | ||
b | ||
EXPLAIN DELETE b FROM t1 AS a JOIN t1 AS b; | ||
id select_type table type possible_keys key key_len ref rows Extra | ||
1 SIMPLE a index NULL PRIMARY 255 NULL 3 Using index | ||
1 SIMPLE b ALL NULL NULL NULL NULL 3 | ||
DELETE b FROM t1 AS a JOIN t1 AS b; | ||
SELECT * FROM t1; | ||
c1 | ||
SET sort_buffer_size=@save_sort_buffer_size; | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--source include/have_innodb.inc | ||
--source include/have_sequence.inc | ||
|
||
--echo # Tests for delete with INNODB | ||
|
||
--echo # | ||
--echo # MDEV-22187: SIGSEGV in ha_innobase::cmp_ref on DELETE | ||
--echo # | ||
|
||
SET @save_sort_buffer_size= @@sort_buffer_size; | ||
SET sort_buffer_size=1024; | ||
CREATE TABLE t1(c1 CHAR(255) PRIMARY KEY) ENGINE=InnoDB; | ||
|
||
INSERT INTO t1 VALUES (0), ('a'), ('b'); | ||
ANALYZE TABLE T1 PERSISTENT FOR ALL; | ||
SELECT * FROM t1; | ||
EXPLAIN DELETE b FROM t1 AS a JOIN t1 AS b; | ||
DELETE b FROM t1 AS a JOIN t1 AS b; | ||
SELECT * FROM t1; | ||
|
||
SET sort_buffer_size=@save_sort_buffer_size; | ||
DROP TABLE t1; |