[MDEV-5241] Collation incompatibilities with MySQL-5.6 Created: 2013-11-05 Updated: 2019-07-08 Resolved: 2013-11-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4, 5.5.33a |
| Fix Version/s: | 10.0.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
There are incompatibilities between some MariaDB and MySQL collations Problems1.The utf8_croatian_ci and ucs2_croatian_ci collations appeared in MariaDB-5.1 in the end of 2009, based on Alexander Barkov's patch from: http://collation-charts.org/articles/croatian.htm Later, the Croatian collations were added into MySQL-5.6. Still, MariaDB Croatian collation uses the latest version of the rules from http://unicode.org/cldr/trac/browser/trunk/common/collation/hr.xml while MySQL implements the older version. The difference is in 3 letters only. But it's enough to make the indexes incompatible. As a effect:
2.Later, MySQL-5.5 added support for utf8mb4, utf16, utf32. When merging the new character sets (MySQL-5.5 -> MariaDB-5.5) the MariaDB team added the following corresponding collations, for symmetry with utf8 and ucs2:
But when the collations with the same names finally appeared in MySQL-5.6, they were given different IDs. So the IDs 215, 215, 245 are assigned in MySQL-5.6 to something else. This is what we have in MariaDB:
This is what we have in MySQL-5.6:
SolutionCollation changes
Detect attempts to open tables with the old MariaDB collations.Bar fixes TABLE_SHARE::init_from_binary_frm_image() and adds an error message for a table created by any MariaDB version prior to 10.0.5 that have indexes using collation IDs 213, 149, 245, 215, 214:
ER_TABLE_NEEDS_UPGRADE looks suitable for this purposes:
mysql_upgradeMonty will try to fix REPAIR to solve the conflicting IDs problem. quick REPAIRIn long terms we can add a quick REPAIR to replace collation IDs in table definitions in FRM files and in engine-specific structure definitions (e.g. in MYI files for MyISAM) without having to do the full repair for the table. |
| Comments |
| Comment by Alexander Barkov [ 2013-11-14 ] |
|
Pushed into MariaDB-10.0.6 |