mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-30651: Assertion `sel->quick' in make_range_rowid_filters
(Variant for 10.6: return error code from SQL_SELECT::test_quick_select) The optimizer deals with Rowid Filters this way: 1. First, range optimizer is invoked. It saves information about all potential range accesses. 2. A query plan is chosen. Suppose, it uses a Rowid Filter on index $IDX. 3. JOIN::make_range_rowid_filters() calls the range optimizer again to create a quick select on index $IDX which will be used to populate the rowid filter. The problem: KILL command catches the query in step #3. Quick Select is not created which causes a crash. Fixed by checking if query was killed.
This commit is contained in:
@@ -1987,6 +1987,7 @@ bool JOIN::make_range_rowid_filters()
|
||||
tab->table->force_index= force_index_save;
|
||||
if (rc == SQL_SELECT::ERROR || thd->is_error())
|
||||
{
|
||||
delete sel;
|
||||
DBUG_RETURN(true); /* Fatal error */
|
||||
}
|
||||
/*
|
||||
@@ -2012,8 +2013,6 @@ bool JOIN::make_range_rowid_filters()
|
||||
continue;
|
||||
}
|
||||
no_filter:
|
||||
if (sel->quick)
|
||||
delete sel->quick;
|
||||
delete sel;
|
||||
}
|
||||
|
||||
@@ -2031,7 +2030,9 @@ bool JOIN::make_range_rowid_filters()
|
||||
rowid container employed by the filter. On success it lets the table engine
|
||||
know that what rowid filter will be used when accessing the table rows.
|
||||
|
||||
@retval false always
|
||||
@retval
|
||||
false OK
|
||||
true Error, query should abort
|
||||
*/
|
||||
|
||||
bool
|
||||
|
Reference in New Issue
Block a user