summaryrefslogtreecommitdiff
path: root/sql/opt_range.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-05-25 23:14:18 -0700
committerIgor Babaev <igor@askmonty.org>2010-05-25 23:14:18 -0700
commitd120c5b562629dda782e3c9a66cfeaa48cbb01d1 (patch)
tree6da6a69adc00f657dc62d863a334d57f7a0f1907 /sql/opt_range.h
parentd6c97c913e4e0084f01b7551c5c2f06e10c2fdc7 (diff)
downloadmariadb-git-d120c5b562629dda782e3c9a66cfeaa48cbb01d1.tar.gz
Changed the fixes for the following bugs:
Bug #39022: completed Bug #39653: reverted as invalid Bug #45640: ameliorated, simplified, optimized Bug #48483: completed Bug #49324: improved Bug #51242/52336: reverted, applied a real fix.
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r--sql/opt_range.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h
index ad2eddba4f0..7b91074dbe1 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -718,7 +718,19 @@ class SQL_SELECT :public Sql_alloc {
tmp.set_all();
return test_quick_select(thd, tmp, 0, limit, force_quick_range) < 0;
}
- inline bool skip_record() { return cond ? cond->val_int() == 0 : 0; }
+ /*
+ RETURN
+ 0 if record must be skipped <-> (cond && cond->val_int() == 0)
+ -1 if error
+ 1 otherwise
+ */
+ inline int skip_record(THD *thd)
+ {
+ int rc= test(!cond || cond->val_int());
+ if (thd->is_error())
+ rc= -1;
+ return rc;
+ }
int test_quick_select(THD *thd, key_map keys, table_map prev_tables,
ha_rows limit, bool force_quick_range);
};