summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authormskold@mysql.com <>2005-02-16 14:18:32 +0100
committermskold@mysql.com <>2005-02-16 14:18:32 +0100
commit59a986d94794ba28ea2f3f40922a6a37457911fd (patch)
treebd04afd7cca17deae9917571e7ce968f7bf35b12 /sql/handler.h
parent5d23cdb591fbbf3ca227db0da52b674d3c76e53c (diff)
downloadmariadb-git-59a986d94794ba28ea2f3f40922a6a37457911fd.tar.gz
Small fixes and added comments to condition pushdown to ndbcluster, after code review
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 6fc2552290d..7561d1ea0bf 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -268,7 +268,7 @@ typedef struct st_table TABLE;
struct st_foreign_key_info;
typedef struct st_foreign_key_info FOREIGN_KEY_INFO;
-/* Forward declaration for Condition Pushdown to Handler (CPDH) */
+/* Forward declaration for condition pushdown to storage engine */
typedef struct Item COND;
typedef struct st_ha_check_opt
@@ -625,7 +625,24 @@ public:
/*
Condition pushdown to storage engines
*/
+
+/*
+ Push a condition to storage engine for evaluation during table
+ and index scans. The conditions should be stored on a stack
+ for possibly storing several conditions. The stack can be popped
+ by calling cond_pop, handler::extra(HA_EXTRA_RESET) (handler::reset())
+ should clear the stack.
+ The condition can be traversed using Item::traverse_cond
+ RETURN
+ NULL The condition was supported by the handler and will be evaluated
+ for each row found during the scan
+ cond The condition was not supported and all rows will be returned from
+ the scan for evaluation (and thus not saved on stack)
+*/
virtual const COND *cond_push(const COND *cond) { return cond; };
+/*
+ Pop the top condition from the condition stack of the handler instance.
+*/
virtual void cond_pop() { return; };
};