CanaryModTeam / CanaryLib

The CanaryMod API Library
http://canarymod.net
28 stars 22 forks source link

Incorrect collation used in player sql table #41

Closed slowriot closed 9 years ago

slowriot commented 9 years ago

When the default tables are created, their collation defaults to latin1_swedish_ci. The player table needs to contain prefixes, which hold the simoleon § colour code character, but inserting into this table with the default collation sees them converted to § incorrectly.

You can see the existing collation with SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'canary' LIMIT 1;

You can update to the correct collation with ALTER TABLE player COLLATE utf8_general_ci;.

(Original issue reported at https://bitbucket.org/minecraftonline/scripts/issue/144/setprefix-appears-to-be-escaping-simoleons)

darkdiplomat commented 9 years ago

This issue is not one we will fix fully from within Canary as we are unable to determine if an End User has provided a SQL User with accesses to read the schema or if there is an instance where data may get corrupted with a change in character sets. We have however taken steps to define a the collation and character set of newly created tables.