SET @@note_verbosity='all';
|
CREATE OR REPLACE TABLE t1 (f char(8), KEY(f));
|
INSERT INTO t1 VALUES (''),('');
|
SELECT * FROM t1 WHERE f BETWEEN 'a' AND 3;
|
SHOW WARNINGS;
|
+---------+------+----------------------------------------------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------------------------------------------------------------------------+
|
| Note | 1105 | Cannot use key `f` part[0] for lookup: `test`.`t1`.`f` of collation `utf8mb4_uca1400_ai_ci` >= "'a'" of collation `binary` |
|
| Warning | 1292 | Truncated incorrect DECIMAL value: '' |
|
| Warning | 1292 | Truncated incorrect DECIMAL value: 'a' |
|
| Warning | 1292 | Truncated incorrect DECIMAL value: '' |
|
| Warning | 1292 | Truncated incorrect DECIMAL value: 'a' |
|
+---------+------+----------------------------------------------------------------------------------------------------------------------------+
|
Notice, the warning about the unusable key is incorrect. It should report a wrong data type instead, because the comparison is done using the DECIMAL data type.
If I change the order of the BETNEEN values, it correctly reports the data type problem:
SELECT * FROM t1 WHERE f BETWEEN 3 AND 'a';
|
SHOW WARNINGS;
|
+---------+------+--------------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+--------------------------------------------------------------------------------------------+
|
| Note | 1105 | Cannot use key `f` part[0] for lookup: `test`.`t1`.`f` of type `char` >= "3" of type `int` |
|
| Warning | 1292 | Truncated incorrect DOUBLE value: '' |
|
| Warning | 1292 | Truncated incorrect DOUBLE value: 'a' |
|
| Warning | 1292 | Truncated incorrect DOUBLE value: '' |
|
| Warning | 1292 | Truncated incorrect DOUBLE value: 'a' |
|
+---------+------+--------------------------------------------------------------------------------------------+
|
{"report":{"fcp":973.5999999046326,"ttfb":165.90000009536743,"pageVisibility":"visible","entityId":130084,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"8f708e79-8217-4318-a05c-a16383f44e61","navigationType":0,"readyForUser":1036.7000000476837,"redirectCount":0,"resourceLoadedEnd":1527,"resourceLoadedStart":181.20000004768372,"resourceTiming":[{"duration":349.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":181.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":530.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":348.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":181.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":530.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":358,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":181.59999990463257,"connectEnd":181.59999990463257,"connectStart":181.59999990463257,"domainLookupEnd":181.59999990463257,"domainLookupStart":181.59999990463257,"fetchStart":181.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":181.59999990463257,"responseEnd":539.5999999046326,"responseStart":539.5999999046326,"secureConnectionStart":181.59999990463257},{"duration":383.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":181.70000004768372,"connectEnd":181.70000004768372,"connectStart":181.70000004768372,"domainLookupEnd":181.70000004768372,"domainLookupStart":181.70000004768372,"fetchStart":181.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":181.70000004768372,"responseEnd":564.7999999523163,"responseStart":564.7999999523163,"secureConnectionStart":181.70000004768372},{"duration":386.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":181.90000009536743,"connectEnd":181.90000009536743,"connectStart":181.90000009536743,"domainLookupEnd":181.90000009536743,"domainLookupStart":181.90000009536743,"fetchStart":181.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":181.90000009536743,"responseEnd":568.5,"responseStart":568.5,"secureConnectionStart":181.90000009536743},{"duration":387.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":181.90000009536743,"connectEnd":181.90000009536743,"connectStart":181.90000009536743,"domainLookupEnd":181.90000009536743,"domainLookupStart":181.90000009536743,"fetchStart":181.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":181.90000009536743,"responseEnd":569.2999999523163,"responseStart":569.2999999523163,"secureConnectionStart":181.90000009536743},{"duration":387.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":182.09999990463257,"connectEnd":182.09999990463257,"connectStart":182.09999990463257,"domainLookupEnd":182.09999990463257,"domainLookupStart":182.09999990463257,"fetchStart":182.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":182.09999990463257,"responseEnd":570,"responseStart":570,"secureConnectionStart":182.09999990463257},{"duration":388.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":182.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":570.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":389.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":182.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":571.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":388.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":182.29999995231628,"connectEnd":182.29999995231628,"connectStart":182.29999995231628,"domainLookupEnd":182.29999995231628,"domainLookupStart":182.29999995231628,"fetchStart":182.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":182.29999995231628,"responseEnd":570.7999999523163,"responseStart":570.7999999523163,"secureConnectionStart":182.29999995231628},{"duration":389,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":182.59999990463257,"connectEnd":182.59999990463257,"connectStart":182.59999990463257,"domainLookupEnd":182.59999990463257,"domainLookupStart":182.59999990463257,"fetchStart":182.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":182.59999990463257,"responseEnd":571.5999999046326,"responseStart":571.5999999046326,"secureConnectionStart":182.59999990463257},{"duration":690.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":183.5,"connectEnd":183.5,"connectStart":183.5,"domainLookupEnd":183.5,"domainLookupStart":183.5,"fetchStart":183.5,"redirectEnd":0,"redirectStart":0,"requestStart":183.5,"responseEnd":873.9000000953674,"responseStart":873.9000000953674,"secureConnectionStart":183.5},{"duration":1343.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":183.5,"connectEnd":183.5,"connectStart":183.5,"domainLookupEnd":183.5,"domainLookupStart":183.5,"fetchStart":183.5,"redirectEnd":0,"redirectStart":0,"requestStart":183.5,"responseEnd":1527,"responseStart":1527,"secureConnectionStart":183.5},{"duration":646.8999998569489,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":769.9000000953674,"connectEnd":769.9000000953674,"connectStart":769.9000000953674,"domainLookupEnd":769.9000000953674,"domainLookupStart":769.9000000953674,"fetchStart":769.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":769.9000000953674,"responseEnd":1416.7999999523163,"responseStart":1416.7999999523163,"secureConnectionStart":769.9000000953674},{"duration":612.4000000953674,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":952,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":952,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1564.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":35,"responseStart":166,"responseEnd":169,"domLoading":179,"domInteractive":1549,"domContentLoadedEventStart":1549,"domContentLoadedEventEnd":1586,"domComplete":2372,"loadEventStart":2372,"loadEventEnd":2374,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1528.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1529.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1529.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1532.2999999523163},{"name":"activityTabFullyLoaded","time":1592.5999999046326}],"measures":[],"correlationId":"485432967b2d80","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":76,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}