summaryrefslogtreecommitdiff
path: root/sql/ha_berkeley.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r--sql/ha_berkeley.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index 00df84e3797..b4f07073afa 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -357,9 +357,11 @@ ulong ha_berkeley::index_flags(uint idx, uint part, bool all_parts) const
case HA_KEYTYPE_VARTEXT:
/*
As BDB stores only one copy of equal strings, we can't use key read
- on these
+ on these. Binary collations do support key read though.
*/
- flags&= ~HA_KEYREAD_ONLY;
+ if (!(table->key_info[idx].key_part[i].field->charset()->state
+ & MY_CS_BINSORT))
+ flags&= ~HA_KEYREAD_ONLY;
break;
default: // Keep compiler happy
break;