#At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:ole.john.aske@stripped
3390 Ole John Aske 2010-12-07
SPJ-scan-scan: Updated cherry picked fix for bug 58490 to latest fix being reviewed
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2010-12-07 11:56:10 +0000
+++ b/sql/sql_select.cc 2010-12-07 15:05:03 +0000
@@ -11661,6 +11661,16 @@ evaluate_join_record(JOIN *join, JOIN_TA
+ Setting NESTED_LOOP_NO_MORE_ROWS (if not_exists_optimize)
+ also implies a 'not found' condition. However we could not
+ set this inside the loop above as it would prematurely
+ have terminated the 'first_unmatched' / 'first_unmatched->found'
+ calculations above.
+ if (rc == NESTED_LOOP_NO_MORE_ROWS)
+ found= false;
It was not just a return to lower loop level when one
of the newly activated predicates is evaluated as false
(See above join->return_tab= tab).
@@ -11673,7 +11683,6 @@ evaluate_join_record(JOIN *join, JOIN_TA
DBUG_PRINT("info", (" found match"));
/* A match from join_tab is found for the current partial join. */
rc= (*join_tab->next_select)(join, join_tab+1, 0);
if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS)
Attachment: [text/bzr-bundle] firstname.lastname@example.org
|• bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3390) ||Ole John Aske||7 Dec|