how to get index keys from mysql index?
i have an innodb mysql table with a varchar(100) field called 'word'.
i created a btree index on an that field.
if i do a quer开发者_开发问答y like select * from table where word = 'non-linear', i get all variations of that word. so results would include (Non-linear, Non-Linear, non-Linear, etc...).
it seems to me that that index doesnt care about the capitalization.
does this mean that the index has 1 record for this word?
if so, is there a way to get a list of all the keys in the index so that i would essentially have a list of unique terms?
String comparisons are not case-sensitive for non-binary data types like varchar, char, text. For binary strings (BINARY, VARBINARY, BLOB), comparisons use the numeric values of the bytes in the operands; this means that for alphabetic characters, comparisons will be case sensitive.
More information available at Mysql Docs.
精彩评论