Commit 79c4b4e4 authored by Sergey Petrunya's avatar Sergey Petrunya

Merge 5.3->5.5

parents 33e961c1 7e6bec87
...@@ -1008,6 +1008,28 @@ const char *ha_maria::index_type(uint key_number) ...@@ -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() double ha_maria::scan_time()
{ {
if (file->s->data_file_type == BLOCK_RECORD) if (file->s->data_file_type == BLOCK_RECORD)
......
...@@ -65,12 +65,7 @@ public: ...@@ -65,12 +65,7 @@ public:
const char **bas_ext() const; const char **bas_ext() const;
ulonglong table_flags() const ulonglong table_flags() const
{ return int_table_flags; } { return int_table_flags; }
ulong index_flags(uint inx, uint part, bool all_parts) const 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);
}
uint max_supported_keys() const uint max_supported_keys() const
{ return MARIA_MAX_KEY; } { return MARIA_MAX_KEY; }
uint max_supported_key_length() const; uint max_supported_key_length() const;
......
...@@ -689,6 +689,28 @@ const char *ha_myisam::index_type(uint key_number) ...@@ -689,6 +689,28 @@ const char *ha_myisam::index_type(uint key_number)
} }
ulong ha_myisam::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;
}
/* Name is here without an extension */ /* Name is here without an extension */
int ha_myisam::open(const char *name, int mode, uint test_if_locked) int ha_myisam::open(const char *name, int mode, uint test_if_locked)
{ {
......
...@@ -64,12 +64,7 @@ class ha_myisam: public handler ...@@ -64,12 +64,7 @@ class ha_myisam: public handler
int index_end(); int index_end();
int rnd_end(); int rnd_end();
ulong index_flags(uint inx, uint part, bool all_parts) const 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);
}
uint max_supported_keys() const { return MI_MAX_KEY; } uint max_supported_keys() const { return MI_MAX_KEY; }
uint max_supported_key_parts() const { return HA_MAX_KEY_SEG; } uint max_supported_key_parts() const { return HA_MAX_KEY_SEG; }
uint max_supported_key_length() const { return HA_MAX_KEY_LENGTH; } uint max_supported_key_length() const { return HA_MAX_KEY_LENGTH; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment