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' |
|
+---------+------+--------------------------------------------------------------------------------------------+
|
There are no comments yet on this issue.
{"report":{"fcp":3655.300000190735,"ttfb":1334.2000002861023,"pageVisibility":"visible","entityId":130084,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a0cca35e-eced-4199-a466-4423ec223ba8","navigationType":0,"readyForUser":3194.2000002861023,"redirectCount":0,"resourceLoadedEnd":4533.60000038147,"resourceLoadedStart":1347.6000003814697,"resourceTiming":[{"duration":1083.6999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1347.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1347.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2431.300000190735,"responseStart":0,"secureConnectionStart":0},{"duration":1126.7000002861023,"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":1347.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1347.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2474.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":1136.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1348.1000003814697,"connectEnd":1348.1000003814697,"connectStart":1348.1000003814697,"domainLookupEnd":1348.1000003814697,"domainLookupStart":1348.1000003814697,"fetchStart":1348.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1348.1000003814697,"responseEnd":2484.4000000953674,"responseStart":2484.4000000953674,"secureConnectionStart":1348.1000003814697},{"duration":1208.4000000953674,"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":1348.2000002861023,"connectEnd":1348.2000002861023,"connectStart":1348.2000002861023,"domainLookupEnd":1348.2000002861023,"domainLookupStart":1348.2000002861023,"fetchStart":1348.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1348.2000002861023,"responseEnd":2556.6000003814697,"responseStart":2556.6000003814697,"secureConnectionStart":1348.2000002861023},{"duration":1246.8000001907349,"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":1348.4000000953674,"connectEnd":1348.4000000953674,"connectStart":1348.4000000953674,"domainLookupEnd":1348.4000000953674,"domainLookupStart":1348.4000000953674,"fetchStart":1348.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1348.4000000953674,"responseEnd":2595.2000002861023,"responseStart":2595.2000002861023,"secureConnectionStart":1348.4000000953674},{"duration":1259,"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":1348.6000003814697,"connectEnd":1348.6000003814697,"connectStart":1348.6000003814697,"domainLookupEnd":1348.6000003814697,"domainLookupStart":1348.6000003814697,"fetchStart":1348.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1348.6000003814697,"responseEnd":2607.6000003814697,"responseStart":2607.6000003814697,"secureConnectionStart":1348.6000003814697},{"duration":1333.9000000953674,"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":1348.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1348.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2682.800000190735,"responseStart":0,"secureConnectionStart":0},{"duration":1285.5999999046326,"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":1348.9000000953674,"connectEnd":1348.9000000953674,"connectStart":1348.9000000953674,"domainLookupEnd":1348.9000000953674,"domainLookupStart":1348.9000000953674,"fetchStart":1348.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1348.9000000953674,"responseEnd":2634.5,"responseStart":2634.4000000953674,"secureConnectionStart":1348.9000000953674},{"duration":1330.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1349.2000002861023,"connectEnd":1349.2000002861023,"connectStart":1349.2000002861023,"domainLookupEnd":1349.2000002861023,"domainLookupStart":1349.2000002861023,"fetchStart":1349.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1349.2000002861023,"responseEnd":2680.1000003814697,"responseStart":2680.1000003814697,"secureConnectionStart":1349.2000002861023},{"duration":1339.0999999046326,"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":1349.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1349.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2688.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":1338.6000003814697,"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":1349.5,"connectEnd":1349.5,"connectStart":1349.5,"domainLookupEnd":1349.5,"domainLookupStart":1349.5,"fetchStart":1349.5,"redirectEnd":0,"redirectStart":0,"requestStart":1349.5,"responseEnd":2688.1000003814697,"responseStart":2688.1000003814697,"secureConnectionStart":1349.5},{"duration":3172.0999999046326,"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":1361.1000003814697,"connectEnd":1361.1000003814697,"connectStart":1361.1000003814697,"domainLookupEnd":1361.1000003814697,"domainLookupStart":1361.1000003814697,"fetchStart":1361.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1361.1000003814697,"responseEnd":4533.200000286102,"responseStart":4533.200000286102,"secureConnectionStart":1361.1000003814697},{"duration":3163,"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":1370.6000003814697,"connectEnd":1370.6000003814697,"connectStart":1370.6000003814697,"domainLookupEnd":1370.6000003814697,"domainLookupStart":1370.6000003814697,"fetchStart":1370.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1370.6000003814697,"responseEnd":4533.60000038147,"responseStart":4533.60000038147,"secureConnectionStart":1370.6000003814697},{"duration":1765.4000000953674,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2695.4000000953674,"connectEnd":2695.4000000953674,"connectStart":2695.4000000953674,"domainLookupEnd":2695.4000000953674,"domainLookupStart":2695.4000000953674,"fetchStart":2695.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":2695.4000000953674,"responseEnd":4460.800000190735,"responseStart":4460.800000190735,"secureConnectionStart":2695.4000000953674},{"duration":1440.6999998092651,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":3097.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":3097.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4538.300000190735,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":962,"responseStart":1335,"responseEnd":1371,"domLoading":1344,"domInteractive":4581,"domContentLoadedEventStart":4581,"domContentLoadedEventEnd":4721,"domComplete":5456,"loadEventStart":5457,"loadEventEnd":5457,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":4541.800000190735},{"name":"bigPipe.sidebar-id.end","time":4542.60000038147},{"name":"bigPipe.activity-panel-pipe-id.start","time":4542.800000190735},{"name":"bigPipe.activity-panel-pipe-id.end","time":4543.300000190735},{"name":"activityTabFullyLoaded","time":4972.200000286102}],"measures":[],"correlationId":"cf4b7be2c9a58d","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":109,"dbReadsTimeInMs":14,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}