summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-07-18 22:40:15 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-07-18 22:40:15 +0400
commit79c4b4e44008a3ba1ba9a5c947a0ffea6a6b54a2 (patch)
tree4c662dad4bebdd7a56ad550009af5bb05924f5fe /storage/maria
parent33e961c1abbf7d401a6f3ae5c04ff312b433ca3a (diff)
parent7e6bec87c18c13f2f3d2d1405828236a728316ce (diff)
downloadmariadb-git-79c4b4e44008a3ba1ba9a5c947a0ffea6a6b54a2.tar.gz
Merge 5.3->5.5
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ha_maria.cc22
-rw-r--r--storage/maria/ha_maria.h7
2 files changed, 23 insertions, 6 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 2b67f29f9f8..e763b7e7a37 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -1008,6 +1008,28 @@ const char *ha_maria::index_type(uint key_number)
}
+ulong ha_maria::index_flags(uint inx, uint part, bool all_parts) const
+{
+ ulong flags;
+ if (table_share->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT)
+ flags= 0;
+ else
+ if ((table_share->key_info[inx].flags & HA_SPATIAL ||
+ table_share->key_info[inx].algorithm == HA_KEY_ALG_RTREE))
+ {
+ /* All GIS scans are non-ROR scans. We also disable IndexConditionPushdown */
+ flags= HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
+ HA_READ_ORDER | HA_KEYREAD_ONLY | HA_KEY_SCAN_NOT_ROR;
+ }
+ else
+ {
+ flags= HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
+ HA_READ_ORDER | HA_KEYREAD_ONLY | HA_DO_INDEX_COND_PUSHDOWN;
+ }
+ return flags;
+}
+
+
double ha_maria::scan_time()
{
if (file->s->data_file_type == BLOCK_RECORD)
diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h
index 35c98cc52d7..545daca12fe 100644
--- a/storage/maria/ha_maria.h
+++ b/storage/maria/ha_maria.h
@@ -65,12 +65,7 @@ public:
const char **bas_ext() const;
ulonglong table_flags() const
{ return int_table_flags; }
- ulong index_flags(uint inx, uint part, bool all_parts) const
- {
- return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT) ?
- 0 : HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
- HA_READ_ORDER | HA_KEYREAD_ONLY | HA_DO_INDEX_COND_PUSHDOWN);
- }
+ ulong index_flags(uint inx, uint part, bool all_parts) const;
uint max_supported_keys() const
{ return MARIA_MAX_KEY; }
uint max_supported_key_length() const;