summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-18 16:46:57 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-18 16:46:57 +0200
commit5f6380adde2dac3f32b40339b9b702c0135eb7d6 (patch)
tree31068acc0b39c208d35d524688a5985831af0447 /sql/handler.h
parent8a23ae088dc38f591efeab9eccdef5eb9094add9 (diff)
parent97e640b9ae83e07b444fceede6b0524256c7a3cc (diff)
downloadmariadb-git-5f6380adde2dac3f32b40339b9b702c0135eb7d6.tar.gz
10.0-base merge
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 99d75816c68..9f8290ee176 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -370,9 +370,9 @@ enum legacy_db_type
DB_TYPE_PARTITION_DB=20,
DB_TYPE_BINLOG=21,
DB_TYPE_PBXT=23,
- DB_TYPE_MARIA=27,
DB_TYPE_PERFORMANCE_SCHEMA=28,
- DB_TYPE_FIRST_DYNAMIC=42,
+ DB_TYPE_ARIA=42,
+ DB_TYPE_FIRST_DYNAMIC=43,
DB_TYPE_DEFAULT=127 // Must be last
};
/*
@@ -1227,6 +1227,11 @@ static inline LEX_STRING *hton_name(const handlerton *hton)
return &(hton2plugin[hton->slot]->name);
}
+static inline handlerton *plugin_hton(plugin_ref plugin)
+{
+ return plugin_data(plugin, handlerton *);
+}
+
static inline sys_var *find_hton_sysvar(handlerton *hton, st_mysql_sys_var *var)
{
return find_plugin_sysvar(hton2plugin[hton->slot], var);
@@ -2859,7 +2864,33 @@ public:
Pops the top if condition stack, if stack is not empty.
*/
virtual void cond_pop() { return; };
+
+ /**
+ Push down an index condition to the handler.
+
+ The server will use this method to push down a condition it wants
+ the handler to evaluate when retrieving records using a specified
+ index. The pushed index condition will only refer to fields from
+ this handler that is contained in the index (but it may also refer
+ to fields in other handlers). Before the handler evaluates the
+ condition it must read the content of the index entry into the
+ record buffer.
+
+ The handler is free to decide if and how much of the condition it
+ will take responsibility for evaluating. Based on this evaluation
+ it should return the part of the condition it will not evaluate.
+ If it decides to evaluate the entire condition it should return
+ NULL. If it decides not to evaluate any part of the condition it
+ should return a pointer to the same condition as given as argument.
+
+ @param keyno the index number to evaluate the condition on
+ @param idx_cond the condition to be evaluated by the handler
+
+ @return The part of the pushed condition that the handler decides
+ not to evaluate
+ */
virtual Item *idx_cond_push(uint keyno, Item* idx_cond) { return idx_cond; }
+
/** Reset information about pushed index conditions */
virtual void cancel_pushed_idx_cond()
{
@@ -3238,7 +3269,7 @@ public:
int ha_discover_table(THD *thd, TABLE_SHARE *share);
int ha_discover_table_names(THD *thd, LEX_STRING *db, MY_DIR *dirp,
- Discovered_table_list *result);
+ Discovered_table_list *result, bool reusable);
bool ha_table_exists(THD *thd, const char *db, const char *table_name,
handlerton **hton= 0);
#endif