Alexander Barkov
added a comment - Hello serg ,
Can you please review a patch:
https://github.com/MariaDB/server/commit/56fa1da9c676ebc480b5cb43627752150010cf4c
Thanks.
New utf8_general_mysql500_ci and ucs2_general_mysql500_ci collations have been added that preserve the behavior of utf8_general_ci and ucs2_general_ci from versions of MySQL previous to 5.1.24. [CHECK TABLE](https://dev.mysql.com/doc/refman/5.7/en/check-table.html) produces this error:
----- 2008-11-14 5.1.30
The CHECK TABLE ... FOR UPGRADE statement did not check for incompatible collation changes made in MySQL 5.1.24 (Bug #27877). This also affects mysqlcheck and mysql_upgrade, which cause that statement to be executed. See Checking Whether Tables or Indexes Must Be Rebuilt.
Prior to this fix, a binary upgrade (performed without dumping tables with mysqldump before the upgrade and reloading the dump file after the upgrade) would corrupt tables that have indexes that use the utf8_general_ci or ucs2_general_ci collation for columns that contain 'ß' LATIN SMALL LETTER SHARP S (German). After the fix, CHECK TABLE ... FOR UPGRADE properly detects the problem and warns about tables that need repair.
However, the fix is not backward compatible and can result in a downgrading problem under these circumstances:
Perform a binary upgrade to a version of MySQL that includes the fix.
Run CHECK TABLE ... FOR UPGRADE (or mysqlcheck or mysql_upgrade) to upgrade tables.
Perform a binary downgrade to a version of MySQL that does not include the fix.
The solution is to dump tables with mysqldump before the downgrade and reload the dump file after the downgrade. Alternatively, drop and recreate affected indexes. (Bug #40053)
Rick James
added a comment - @AlexanderBarkov - Many users experienced "duplicate key" in their PRIMARY KEY due to this incompatible change.
----- 2012-04-10 5.6.5 Milestone 8 & 2012-03-21 5.1.62 & 2012-02-17 5.5.21 – Functionality Added or Changed – -----
New utf8_general_mysql500_ci and ucs2_general_mysql500_ci collations have been added that preserve the behavior of utf8_general_ci and ucs2_general_ci from versions of MySQL previous to 5.1.24. [CHECK TABLE] ( https://dev.mysql.com/doc/refman/5.7/en/check-table.html ) produces this error:
----- 2008-11-14 5.1.30
The CHECK TABLE ... FOR UPGRADE statement did not check for incompatible collation changes made in MySQL 5.1.24 (Bug #27877). This also affects mysqlcheck and mysql_upgrade, which cause that statement to be executed. See Checking Whether Tables or Indexes Must Be Rebuilt.
Prior to this fix, a binary upgrade (performed without dumping tables with mysqldump before the upgrade and reloading the dump file after the upgrade) would corrupt tables that have indexes that use the utf8_general_ci or ucs2_general_ci collation for columns that contain 'ß' LATIN SMALL LETTER SHARP S (German). After the fix, CHECK TABLE ... FOR UPGRADE properly detects the problem and warns about tables that need repair.
However, the fix is not backward compatible and can result in a downgrading problem under these circumstances:
Perform a binary upgrade to a version of MySQL that includes the fix.
Run CHECK TABLE ... FOR UPGRADE (or mysqlcheck or mysql_upgrade) to upgrade tables.
Perform a binary downgrade to a version of MySQL that does not include the fix.
The solution is to dump tables with mysqldump before the downgrade and reload the dump file after the downgrade. Alternatively, drop and recreate affected indexes. (Bug #40053)
I'd still suggest to split the commit in two — a cleanup commit that introduces all functions in my_compare.h and replaces them as needed, but does not change the behavior (doesn't use ha_compare_char_fixed for HA_KEYTYPE_TEXT). And the second commit that fixes the bug.
Sergei Golubchik
added a comment - 99ffd7e3934 is ok to push.
I'd still suggest to split the commit in two — a cleanup commit that introduces all functions in my_compare.h and replaces them as needed, but does not change the behavior (doesn't use ha_compare_char_fixed for HA_KEYTYPE_TEXT). And the second commit that fixes the bug.
People
Alexander Barkov
Alexander Barkov
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1069.7000002861023,"ttfb":335.40000009536743,"pageVisibility":"visible","entityId":117030,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"47f98a35-f6ff-4687-8ca7-0815a5ee4ab5","navigationType":0,"readyForUser":1228.5,"redirectCount":0,"resourceLoadedEnd":777.8000001907349,"resourceLoadedStart":342.09999990463257,"resourceTiming":[{"duration":39.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":342.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":342.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":381.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":39.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":342.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":342.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":382,"responseStart":0,"secureConnectionStart":0},{"duration":228.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":342.5,"connectEnd":342.5,"connectStart":342.5,"domainLookupEnd":342.5,"domainLookupStart":342.5,"fetchStart":342.5,"redirectEnd":0,"redirectStart":0,"requestStart":383.90000009536743,"responseEnd":571.2000002861023,"responseStart":410,"secureConnectionStart":342.5},{"duration":435.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":342.7000002861023,"connectEnd":342.7000002861023,"connectStart":342.7000002861023,"domainLookupEnd":342.7000002861023,"domainLookupStart":342.7000002861023,"fetchStart":342.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":383.40000009536743,"responseEnd":777.8000001907349,"responseStart":398.2000002861023,"secureConnectionStart":342.7000002861023},{"duration":55,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":342.90000009536743,"connectEnd":342.90000009536743,"connectStart":342.90000009536743,"domainLookupEnd":342.90000009536743,"domainLookupStart":342.90000009536743,"fetchStart":342.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":384.40000009536743,"responseEnd":397.90000009536743,"responseStart":396.7000002861023,"secureConnectionStart":342.90000009536743},{"duration":71.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":343,"connectEnd":343,"connectStart":343,"domainLookupEnd":343,"domainLookupStart":343,"fetchStart":343,"redirectEnd":0,"redirectStart":0,"requestStart":386.80000019073486,"responseEnd":414.90000009536743,"responseStart":412.2000002861023,"secureConnectionStart":343},{"duration":72.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":343.2000002861023,"connectEnd":343.2000002861023,"connectStart":343.2000002861023,"domainLookupEnd":343.2000002861023,"domainLookupStart":343.2000002861023,"fetchStart":343.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":386.90000009536743,"responseEnd":415.30000019073486,"responseStart":413,"secureConnectionStart":343.2000002861023},{"duration":42.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":343.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":343.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":385.5,"responseStart":0,"secureConnectionStart":0},{"duration":106.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":345.40000009536743,"connectEnd":345.40000009536743,"connectStart":345.40000009536743,"domainLookupEnd":345.40000009536743,"domainLookupStart":345.40000009536743,"fetchStart":345.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":388.80000019073486,"responseEnd":452.09999990463257,"responseStart":450.59999990463257,"secureConnectionStart":345.40000009536743},{"duration":42.200000286102295,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":345.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":345.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":387.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":93.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":345.80000019073486,"connectEnd":345.80000019073486,"connectStart":345.80000019073486,"domainLookupEnd":345.80000019073486,"domainLookupStart":345.80000019073486,"fetchStart":345.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":392.30000019073486,"responseEnd":439.40000009536743,"responseStart":437.09999990463257,"secureConnectionStart":345.80000019073486},{"duration":417.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":352.5,"connectEnd":352.5,"connectStart":352.5,"domainLookupEnd":352.5,"domainLookupStart":352.5,"fetchStart":352.5,"redirectEnd":0,"redirectStart":0,"requestStart":424.80000019073486,"responseEnd":770.4000000953674,"responseStart":762.9000000953674,"secureConnectionStart":352.5},{"duration":418.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":352.7000002861023,"connectEnd":352.7000002861023,"connectStart":352.7000002861023,"domainLookupEnd":352.7000002861023,"domainLookupStart":352.7000002861023,"fetchStart":352.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":448.30000019073486,"responseEnd":770.9000000953674,"responseStart":764.2000002861023,"secureConnectionStart":352.7000002861023},{"duration":103.2999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":703.2000002861023,"connectEnd":703.2000002861023,"connectStart":703.2000002861023,"domainLookupEnd":703.2000002861023,"domainLookupStart":703.2000002861023,"fetchStart":703.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":770.0999999046326,"responseEnd":806.5,"responseStart":805.5,"secureConnectionStart":703.2000002861023},{"duration":230.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1017.8000001907349,"connectEnd":1017.8000001907349,"connectStart":1017.8000001907349,"domainLookupEnd":1017.8000001907349,"domainLookupStart":1017.8000001907349,"fetchStart":1017.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1214.9000000953674,"responseEnd":1248.2000002861023,"responseStart":1247.5,"secureConnectionStart":1017.8000001907349},{"duration":345.19999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1062.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1062.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1407.5999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":35,"domainLookupEnd":42,"connectStart":42,"connectEnd":65,"secureConnectionStart":53,"requestStart":66,"responseStart":336,"responseEnd":350,"domLoading":341,"domInteractive":1331,"domContentLoadedEventStart":1331,"domContentLoadedEventEnd":1402,"domComplete":1738,"loadEventStart":1738,"loadEventEnd":1739,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1304.0999999046326},{"name":"bigPipe.sidebar-id.end","time":1304.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1305.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1307.4000000953674},{"name":"activityTabFullyLoaded","time":1424.2000002861023}],"measures":[],"correlationId":"89e7a259df8fdd","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":20,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Heap works like InnoDB (this fact is now also noted in above description) :
Query OK, 2 rows affected (0.000 sec)
Records: 2 Duplicates: 0 Warnings: 0