1
0
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:
Sergey Petrunya
2014-10-14 15:11:06 +04:00
parent b2d71434ed
commit b261ec393a
3 changed files with 28 additions and 0 deletions

View File

@@ -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);
}