diff options
author | unknown <timour@askmonty.org> | 2010-12-02 14:39:37 +0200 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2010-12-02 14:39:37 +0200 |
commit | 1b3336dc30cf97283cca6071f089df992c425eb2 (patch) | |
tree | 2b10bd64d7bbe9e9567e7557f0655b1f240ce462 /sql/sql_class.cc | |
parent | 6dfca7d346d484c1e9114de76a205b694a1891a9 (diff) | |
download | mariadb-git-1b3336dc30cf97283cca6071f089df992c425eb2.tar.gz |
Fix LP BUG#680943
Analysis:
The problem lies in filesort.cc:find_all_keys().
When find_all_keys() is called for the outer query, it resets all
of the tree sets of fields - [read,write,vcol]_set and recomputes
them with respect to sorting.
However, in the loop for each current record the procedure calls
select->skip_record(thd), which evaluates the where clause, which
in turns evaluates the subquery. The JOIN evaluation of the
subquery eventually calls Field_long::val_int to evaluate the field
alias1.f1. The assertion condition
"bitmap_is_set(table->read_set, field_index)"
fails, because the outer query changed the read_set of table "alias1".
Solution:
Restore the original read_set of the table before calling
SQL_SELECT::skip_record, then revert back to the read_set used in
find_all_keys.
Diffstat (limited to 'sql/sql_class.cc')
0 files changed, 0 insertions, 0 deletions