Skip to content

Instantly share code, notes, and snippets.

@paperdarwin
Created February 7, 2014 18:39
Show Gist options
  • Save paperdarwin/8868949 to your computer and use it in GitHub Desktop.
Save paperdarwin/8868949 to your computer and use it in GitHub Desktop.
nats username field is not case sensitive
SELECT * FROM member WHERE username = 'williaml'
@paperdarwin
Copy link
Author

this matches both "Williaml" and "william1"

the problem is, if both user is owned by two different people from two different sites, and the other one is inactive already, the active user is being unintentionally flagged as inactive.

though this is a known issue in VARCHAR type of MySQL
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html

i think NATS should make the username field to have BINARY, VARBINARY, BLOB
to make it case-sensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment