mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge with 4.1
This commit is contained in:
@ -340,6 +340,35 @@ const char **ha_berkeley::bas_ext() const
|
||||
{ static const char *ext[]= { ha_berkeley_ext, NullS }; return ext; }
|
||||
|
||||
|
||||
ulong ha_berkeley::index_flags(uint idx, uint part, bool all_parts) const
|
||||
{
|
||||
ulong flags= (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_KEYREAD_ONLY
|
||||
| HA_READ_RANGE);
|
||||
for (uint i= all_parts ? 0 : part ; i <= part ; i++)
|
||||
{
|
||||
if (table->key_info[idx].key_part[i].field->type() == FIELD_TYPE_BLOB)
|
||||
{
|
||||
/* We can't use BLOBS to shortcut sorts */
|
||||
flags&= ~(HA_READ_ORDER | HA_KEYREAD_ONLY | HA_READ_RANGE);
|
||||
break;
|
||||
}
|
||||
switch (table->key_info[idx].key_part[i].field->key_type()) {
|
||||
case HA_KEYTYPE_TEXT:
|
||||
case HA_KEYTYPE_VARTEXT:
|
||||
/*
|
||||
As BDB stores only one copy of equal strings, we can't use key read
|
||||
on these
|
||||
*/
|
||||
flags&= ~HA_KEYREAD_ONLY;
|
||||
break;
|
||||
default: // Keep compiler happy
|
||||
break;
|
||||
}
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
berkeley_cmp_hidden_key(DB* file, const DBT *new_key, const DBT *saved_key)
|
||||
{
|
||||
|
Reference in New Issue
Block a user