Primary Key issue in MemSQL doesn’t support case sensitive

case sensitivememsqlprimary-key

Creating table in MemSQL and creating composite primary key.
Lets create simple table with following structure:

Table User Data
Name userid

Primary Key (userid)

And assume application support case sensitive userid. So that following user id considered to be different: abc ABC

Insert following data:
1) JOHN ABC
b) ALEX abc

Insert fails in MemSQL as it consider 'ABC' same as 'abc'.

Please help me to understand if case sensitive primary key possible in MemSQL table or not.

Best Answer

In order to make primary key to support case sensitive, binary character set helps in this.

To set binary character set at database level, following command can be used: SET collation_connection = 'utf8_bin';

To set at column level, following command can be used: create table CaseSensitive ( name varchar(5) binary, age int, primary key(name));