Bug #84571 | Assert `!table->has_null_row()' failed in join_read_key on multi-table join | ||
---|---|---|---|
Submitted: | 19 Jan 2017 22:22 | Modified: | 24 Jan 2017 17:59 |
Reporter: | John Embretsen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[19 Jan 2017 22:22]
John Embretsen
[22 Jan 2017 21:08]
John Embretsen
Posted by developer: The following SQL (works as an MTR test) seems to reproduce the issue reliably: CREATE TABLE E ( pk INT NOT NULL AUTO_INCREMENT, col_int_key INT DEFAULT NULL, col_varchar_10_latin1_key VARCHAR(10) DEFAULT NULL, col_varchar_255_utf8 VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL, col_int INT DEFAULT NULL, col_datetime_key datetime DEFAULT NULL, col_varchar_255_latin1_key VARCHAR(255) DEFAULT NULL, col_date_key date DEFAULT NULL, col_datetime datetime DEFAULT NULL, PRIMARY KEY (pk), KEY col_date_key (col_date_key) ) ENGINE=MyISAM; INSERT INTO E VALUES ( 8,9,'h','FDUMQ',-1356726272, '2007-09-02 05:48:23','she','2002-04-02','2002-12-20 17:54:07'); CREATE TABLE G ( pk INT NOT NULL AUTO_INCREMENT, col_int INT DEFAULT NULL, col_int_key INT DEFAULT NULL, PRIMARY KEY (pk) ) ENGINE=MyISAM; CREATE TABLE L ( col_int INT DEFAULT NULL, col_int_key INT DEFAULT NULL, pk INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (pk), KEY test_idx (col_int_key,pk,col_int) ) ENGINE=InnoDB; INSERT INTO L VALUES (NULL,9, 41); INSERT INTO L VALUES (NULL,-1596719104, 48); INSERT INTO L VALUES (-1068105728,9, 49); CREATE TABLE M ( col_varchar_255_latin1_key VARCHAR(255) DEFAULT NULL, pk INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (pk) ) ENGINE=MyISAM; INSERT INTO M VALUES ('RUXDY',8); SELECT alias1 . pk AS field5 FROM L AS alias1 LEFT JOIN M AS alias2 LEFT JOIN M AS alias3 LEFT JOIN E AS alias4 LEFT JOIN G AS alias5 ON alias4 . pk = alias5 . col_int_key ON alias3 . pk = alias5 . col_int ON alias2 . col_varchar_255_latin1_key = alias4 . col_varchar_10_latin1_key RIGHT JOIN E AS alias6 ON alias4 . pk = alias6 . pk RIGHT JOIN M AS alias7 ON alias6 . pk = alias7 . pk ON alias1 . col_int_key = alias6 . col_int_key WHERE alias1 . col_int > 5 OR alias5 . col_int > 5 ; --- There may be simpler ways to reproduce. This scenario was picked randomly among a larger number of crashes based on randomly generated queries and data with two different test tools (RQG + Gator), and then simplified. It is perhaps noteworthy that some columns of table E seem to need to be present although they are not used in the query itself. This example seems to require some use of MyISAM, but the same issue is likely observed in tests using InnoDB only as well.
[24 Jan 2017 17:59]
Paul DuBois
Posted by developer: Fixed in 8.0.1. Bug affects no released version. No changelog entry needed.