diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-30 16:13:13 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-30 16:13:13 +0200 |
commit | 5bba20bb6ab1c4b78ee88ff7f06819c0a31cb587 (patch) | |
tree | 6a00ee58df5b3a92ba529b59849170a93e96accc /sql/sql_select.cc | |
parent | 1e7fb592726637af319e7b2d8eb4c7ab7b206031 (diff) | |
parent | 9d96cd6dcb3f171cbbe93c0f7061ce132a9087a7 (diff) | |
download | mariadb-git-5bba20bb6ab1c4b78ee88ff7f06819c0a31cb587.tar.gz |
merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 17e167b6265..09e71216763 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11204,6 +11204,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, bool not_used_in_distinct=join_tab->not_used_in_distinct; ha_rows found_records=join->found_records; COND *select_cond= join_tab->select_cond; + bool select_cond_result= TRUE; if (error > 0 || (join->thd->is_error())) // Fatal error return NESTED_LOOP_ERROR; @@ -11215,7 +11216,17 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, return NESTED_LOOP_KILLED; /* purecov: inspected */ } DBUG_PRINT("info", ("select cond 0x%lx", (ulong)select_cond)); - if (!select_cond || select_cond->val_int()) + + if (select_cond) + { + select_cond_result= test(select_cond->val_int()); + + /* check for errors evaluating the condition */ + if (join->thd->is_error()) + return NESTED_LOOP_ERROR; + } + + if (!select_cond || select_cond_result) { /* There is no select condition or the attached pushed down |