-
Chaithra Gopalareddy authored
Problem: read_set for the field is not set because its not part of the query. As a result, server exits trying to read the data from the buffer. Analysis: For the query in the bugpage, as field "b" is not part of the query, optimizer does not set the bit for the field in read_set. This results in innodb not fetching the data for field "b". But "b" is part of the primary key. So optimizer tries to read the key and fails. Solution: prepare_for_position() called from make_join_read_info() marks the fields in read_set, which are part of primary key, if primary key is needed to find the row. We now call prepare_for_position() if window functions are present.
Chaithra Gopalareddy authoredProblem: read_set for the field is not set because its not part of the query. As a result, server exits trying to read the data from the buffer. Analysis: For the query in the bugpage, as field "b" is not part of the query, optimizer does not set the bit for the field in read_set. This results in innodb not fetching the data for field "b". But "b" is part of the primary key. So optimizer tries to read the key and fails. Solution: prepare_for_position() called from make_join_read_info() marks the fields in read_set, which are part of primary key, if primary key is needed to find the row. We now call prepare_for_position() if window functions are present.
Loading