mysql-gem icon indicating copy to clipboard operation
mysql-gem copied to clipboard

Add `charsetnr` to Mysql::Result

Open peterkovacs opened this issue 11 years ago • 2 comments

charsetnr is (appears to be?) the only way to tell the difference between two fields like this:

field_a VARCHAR(255) COLLATE utf8_bin,
field_b VARBINARY(255)

Having charsetnr makes determining the difference between these two field types to be quite trivial.

peterkovacs avatar Nov 20 '13 19:11 peterkovacs

Hello @peterkovacs, can you add a test that verifies this?

Thank you.

luislavena avatar Nov 20 '13 22:11 luislavena

Hi @luislavena --

I'm not sure how fixed the constants are going to be across various installations of mysql. This test passes in my environment with mysql 5.5.33.

The mysql API doesn't seem to export these constants, but they are documented here: http://dev.mysql.com/doc/internals/en/charsets.html

Should they be enumerated in the gem?

peterkovacs avatar Nov 21 '13 04:11 peterkovacs