mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-6484: Assertion `tab->ref.use_count' failed on query with joins, constant table, multi-part key
- test_if_skip_sort_order()/create_ref_for_key() may change table access from EQ_REF(index1) to REF(index2). - Doing so doesn't make much sense from optimization POV, but since they are doing it, they should update tab->read_record.unlock_row accordingly.
This commit is contained in:
@@ -8178,6 +8178,9 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j,
|
||||
}
|
||||
else
|
||||
j->type=JT_EQ_REF;
|
||||
|
||||
j->read_record.unlock_row= (j->type == JT_EQ_REF)?
|
||||
join_read_key_unlock_row : rr_unlock_row;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user