Hello Tor,
Tor Didriksen a écrit, Le 07.04.2011 13:56:
> #At file:///export/home/didrik/repo/5.1-foo/ based on
> revid:georgi.kodinov@stripped
>
> 3648 Tor Didriksen 2011-04-07
> Bug#11765713 58705: OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES CREATED
> BY OPT_SUM_QU
> @ mysql-test/r/subselect.result
> New test case.
> @ mysql-test/t/subselect.test
> New test case.
> @ sql/opt_sum.cc
> Add thd to opt_sum_query/matching_cond/find_key_for_maxmin,
> enabling them to test for errors.
> Return with error code if thd->is_error() rather than continuing to read
> the index.
> @ sql/sql_select.cc
> Add thd to opt_sum_query, enabling it to test for errors.
> @ sql/sql_select.h
> Add thd to opt_sum_query, enabling it to test for errors.
>
Can you explain what the bug's plot was, without the code patch: what
function evaluated which subquery (there are several subqueries) and
what function set the error flag; what function failed to notice the
error flag and used a result which should not have been used, and did
what should not have been done...
I'm surprised that we need to add tests of thd->is_error() to more than
one place, hence my questions.
Thanks!