Skip to content

Commit

Permalink
MDEV-14389: MyRocks and NOPAD collations
Browse files Browse the repository at this point in the history
Part #2: Take into accont the fact that three binary collations that
we handle are technically NOPAD collations
  • Loading branch information
spetrunia committed Dec 12, 2017
1 parent e12f77a commit 86c6926
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5971,6 +5971,15 @@ rdb_field_uses_nopad_collation(const my_core::Field *const field) {
/* Handle [VAR](CHAR|BINARY) or TEXT|BLOB */
if (type == MYSQL_TYPE_VARCHAR || type == MYSQL_TYPE_STRING ||
type == MYSQL_TYPE_BLOB) {

/*
This is technically a NOPAD collation but it's a binary collation
that we can handle.
*/
if (RDB_INDEX_COLLATIONS.find(field->charset()->number) !=
RDB_INDEX_COLLATIONS.end())
return false;

return (field->charset()->state & MY_CS_NOPAD);
}
return false;
Expand Down

0 comments on commit 86c6926

Please sign in to comment.