explain format=json select * from t where c like'b\\%_c%'
we get
query 'explain format=json select * from t where c like 'b\\%_c%'' failed: ER_CANT_AGGREGATE_2COLLATIONS (1267): Illegal mix of collations (swe7_swedish_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
This is caused by a conversion failure caused by a call to my_wc_mb_8bit with a backslash character, see the MDEV-34911 comment linked above, and comments surrounding that comment.
The code point of the ASCII backslash \ is reserved for the character Ö in this 7-bit character set. The lower-case ö is |. Is this really a bug?
Marko Mäkelä
added a comment - The code point of the ASCII backslash \ is reserved for the character Ö in this 7-bit character set. The lower-case ö is |. Is this really a bug?
I realize that if the intention is to pass a literal % to the query string (instead of letting it to be treated as a wild card), this can be considered a bug. Typically, the national 7-bit variants of ASCII only replaced some code points between 0x5b and 0x5f as well as between 0x7b and 0x7f. Coincidentally, the underscore (0x5f) might have been replaced with É. If that is the case, searching for a literal underscore instead of letting it to be treated as a LIKE wildcard might rightly fail.
Marko Mäkelä
added a comment - I realize that if the intention is to pass a literal % to the query string (instead of letting it to be treated as a wild card), this can be considered a bug. Typically, the national 7-bit variants of ASCII only replaced some code points between 0x5b and 0x5f as well as between 0x7b and 0x7f. Coincidentally, the underscore (0x5f) might have been replaced with É. If that is the case, searching for a literal underscore instead of letting it to be treated as a LIKE wildcard might rightly fail.
For MDEV-34911, we could use some other character as escape character, but it's not worth the effort. If there is anybody still using swe7, they certainly can do without new optimizations.
Sergei Petrunia
added a comment - - edited Closing as not a bug.
For MDEV-34911 , we could use some other character as escape character, but it's not worth the effort. If there is anybody still using swe7, they certainly can do without new optimizations.
People
Alexander Barkov
Yuchen Pei
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":1924.7999997138977,"ttfb":854,"pageVisibility":"visible","entityId":131899,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e6a18c0a-ed6f-4d3a-a0c1-d27c749a29c0","navigationType":0,"readyForUser":2053.2999997138977,"redirectCount":0,"resourceLoadedEnd":2818.199999809265,"resourceLoadedStart":859,"resourceTiming":[{"duration":509.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":859,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":859,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1368.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":509.90000009536743,"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":859.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":859.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1369.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":518.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":859.4000000953674,"connectEnd":859.4000000953674,"connectStart":859.4000000953674,"domainLookupEnd":859.4000000953674,"domainLookupStart":859.4000000953674,"fetchStart":859.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":859.4000000953674,"responseEnd":1378.2999997138977,"responseStart":1378.2999997138977,"secureConnectionStart":859.4000000953674},{"duration":566.0999999046326,"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":859.5999999046326,"connectEnd":859.5999999046326,"connectStart":859.5999999046326,"domainLookupEnd":859.5999999046326,"domainLookupStart":859.5999999046326,"fetchStart":859.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":859.5999999046326,"responseEnd":1425.6999998092651,"responseStart":1425.6999998092651,"secureConnectionStart":859.5999999046326},{"duration":571.3000001907349,"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":859.7999997138977,"connectEnd":859.7999997138977,"connectStart":859.7999997138977,"domainLookupEnd":859.7999997138977,"domainLookupStart":859.7999997138977,"fetchStart":859.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":859.7999997138977,"responseEnd":1431.0999999046326,"responseStart":1431.0999999046326,"secureConnectionStart":859.7999997138977},{"duration":571.5999999046326,"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":860,"connectEnd":860,"connectStart":860,"domainLookupEnd":860,"domainLookupStart":860,"fetchStart":860,"redirectEnd":0,"redirectStart":0,"requestStart":860,"responseEnd":1431.5999999046326,"responseStart":1431.5,"secureConnectionStart":860},{"duration":571.9000000953674,"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":860.0999999046326,"connectEnd":860.0999999046326,"connectStart":860.0999999046326,"domainLookupEnd":860.0999999046326,"domainLookupStart":860.0999999046326,"fetchStart":860.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":860.0999999046326,"responseEnd":1432,"responseStart":1432,"secureConnectionStart":860.0999999046326},{"duration":668.1000003814697,"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":860.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":860.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1528.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":572.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":860.4000000953674,"connectEnd":860.4000000953674,"connectStart":860.4000000953674,"domainLookupEnd":860.4000000953674,"domainLookupStart":860.4000000953674,"fetchStart":860.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":860.4000000953674,"responseEnd":1432.5,"responseStart":1432.5,"secureConnectionStart":860.4000000953674},{"duration":668,"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":860.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":860.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1528.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":572.1999998092651,"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":860.9000000953674,"connectEnd":860.9000000953674,"connectStart":860.9000000953674,"domainLookupEnd":860.9000000953674,"domainLookupStart":860.9000000953674,"fetchStart":860.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":860.9000000953674,"responseEnd":1433.0999999046326,"responseStart":1433.0999999046326,"secureConnectionStart":860.9000000953674},{"duration":962,"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":879,"connectEnd":879,"connectStart":879,"domainLookupEnd":879,"domainLookupStart":879,"fetchStart":879,"redirectEnd":0,"redirectStart":0,"requestStart":879,"responseEnd":1841,"responseStart":1841,"secureConnectionStart":879},{"duration":1938,"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":880.1999998092651,"connectEnd":880.1999998092651,"connectStart":880.1999998092651,"domainLookupEnd":880.1999998092651,"domainLookupStart":880.1999998092651,"fetchStart":880.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":880.1999998092651,"responseEnd":2818.199999809265,"responseStart":2818.199999809265,"secureConnectionStart":880.1999998092651},{"duration":302.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1540.6999998092651,"connectEnd":1540.6999998092651,"connectStart":1540.6999998092651,"domainLookupEnd":1540.6999998092651,"domainLookupStart":1540.6999998092651,"fetchStart":1540.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1540.6999998092651,"responseEnd":1842.7999997138977,"responseStart":1842.7999997138977,"secureConnectionStart":1540.6999998092651},{"duration":994.1000003814697,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1914.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1914.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2908.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":973.8000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1929.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1929.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2903.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":947.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1930.7999997138977,"connectEnd":1930.7999997138977,"connectStart":1930.7999997138977,"domainLookupEnd":1930.7999997138977,"domainLookupStart":1930.7999997138977,"fetchStart":1930.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1930.7999997138977,"responseEnd":2878.2999997138977,"responseStart":2878.2999997138977,"secureConnectionStart":1930.7999997138977},{"duration":953.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1931.6999998092651,"connectEnd":1931.6999998092651,"connectStart":1931.6999998092651,"domainLookupEnd":1931.6999998092651,"domainLookupStart":1931.6999998092651,"fetchStart":1931.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1931.6999998092651,"responseEnd":2885.199999809265,"responseStart":2885.199999809265,"secureConnectionStart":1931.6999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":675,"responseStart":854,"responseEnd":881,"domLoading":858,"domInteractive":2849,"domContentLoadedEventStart":2849,"domContentLoadedEventEnd":2903,"domComplete":3853,"loadEventStart":3853,"loadEventEnd":3854,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2820.5},{"name":"bigPipe.sidebar-id.end","time":2822.2999997138977},{"name":"bigPipe.activity-panel-pipe-id.start","time":2822.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":2823.7999997138977},{"name":"activityTabFullyLoaded","time":2923}],"measures":[],"correlationId":"52f5d0ac1bbf85","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":117,"dbReadsTimeInMs":14,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The code point of the ASCII backslash \ is reserved for the character Ö in this 7-bit character set. The lower-case ö is |. Is this really a bug?