-
Bug
-
-
Major
-
Resolution:
Fixed
-
5.1.67, 5.2.14, 5.3.12, 5.5(EOL), 10.0(EOL)
-
-
-
-
12.04.5 LTS (GNU/Linux 3.13.0-40-generic x86_64) - replacement of MySQL 5.6
14.04.1 LTS (GNU/Linux 3.13.0-40-generic x86_64) - clean install
Error occurs when using backticks in HAVING clause with function (e.g. UPPER, CONCAT, DATE_FORMAT, etc...).
Views are afected by this behavior - forcing backticks.
How to simulate
CREATE TABLE `articles` (
|
`id` int(11) NOT NULL,
|
`title` varchar(45) DEFAULT NULL,
|
PRIMARY KEY (`id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
INSERT INTO `articles` VALUES ('1', 'Judge delays Oscar Pistorius ruling');
|
INSERT INTO `articles` VALUES ('2', 'Warner dedicates century to Hughes');
|
INSERT INTO `articles` VALUES ('3', 'Torture report: Battle lines being drawn');
|
SELECT `id`, SHA1(`title`) AS `column_1`
|
FROM `articles`
|
HAVING `column_1` LIKE '5%';
|
|
-- 1 row(s) returned
|
SELECT `id`, SHA1(`title`) AS `column_1`
|
FROM `articles`
|
HAVING UPPER(column_1) LIKE '5%';
|
|
-- 1 row(s) returned
|
SELECT `id`, SHA1(`title`) AS `column_1`
|
FROM `articles`
|
HAVING UPPER(`column_1`) LIKE '5%';
|
|
-- Error Code: 1054. Unknown column 'column_1' in 'having clause'
|
Works well on:
- MySQL 5.5 - clean install,
- MySQL 5.6 - upgrade from MySQL 5.5
- MySQL 5.6 - clean install (sql_mode=NO_ENGINE_SUBSTITUTION)
Throws an error code with unknown column:
- MariaDB 10.0.15 - clean install
- MariaDB 10.0.15 - replacement of MySQL 5.6 (sql_mode=NO_ENGINE_SUBSTITUTION)
{"report":{"fcp":1212.4000005722046,"ttfb":341.69999980926514,"pageVisibility":"visible","entityId":49322,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ad9c8e52-44de-4f1c-b524-d1f7c0cce528","navigationType":0,"readyForUser":1313,"redirectCount":0,"resourceLoadedEnd":1644.5,"resourceLoadedStart":354.9000005722046,"resourceTiming":[{"duration":275.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":354.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":354.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":630.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":275.80000019073486,"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":355.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":355.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":630.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":285.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":355.30000019073486,"connectEnd":355.30000019073486,"connectStart":355.30000019073486,"domainLookupEnd":355.30000019073486,"domainLookupStart":355.30000019073486,"fetchStart":355.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":355.30000019073486,"responseEnd":640.5,"responseStart":640.5,"secureConnectionStart":355.30000019073486},{"duration":381.9000005722046,"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":355.5,"connectEnd":355.5,"connectStart":355.5,"domainLookupEnd":355.5,"domainLookupStart":355.5,"fetchStart":355.5,"redirectEnd":0,"redirectStart":0,"requestStart":355.5,"responseEnd":737.4000005722046,"responseStart":737.4000005722046,"secureConnectionStart":355.5},{"duration":386,"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":355.80000019073486,"connectEnd":355.80000019073486,"connectStart":355.80000019073486,"domainLookupEnd":355.80000019073486,"domainLookupStart":355.80000019073486,"fetchStart":355.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":355.80000019073486,"responseEnd":741.8000001907349,"responseStart":741.8000001907349,"secureConnectionStart":355.80000019073486},{"duration":386.19999980926514,"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":356,"connectEnd":356,"connectStart":356,"domainLookupEnd":356,"domainLookupStart":356,"fetchStart":356,"redirectEnd":0,"redirectStart":0,"requestStart":356,"responseEnd":742.1999998092651,"responseStart":742.1999998092651,"secureConnectionStart":356},{"duration":386.5,"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":356.1000003814697,"connectEnd":356.1000003814697,"connectStart":356.1000003814697,"domainLookupEnd":356.1000003814697,"domainLookupStart":356.1000003814697,"fetchStart":356.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":356.1000003814697,"responseEnd":742.6000003814697,"responseStart":742.6000003814697,"secureConnectionStart":356.1000003814697},{"duration":450.30000019073486,"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":356.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":356.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":806.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":386.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":356.5,"connectEnd":356.5,"connectStart":356.5,"domainLookupEnd":356.5,"domainLookupStart":356.5,"fetchStart":356.5,"redirectEnd":0,"redirectStart":0,"requestStart":356.5,"responseEnd":743.1000003814697,"responseStart":743.1000003814697,"secureConnectionStart":356.5},{"duration":450.5,"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":356.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":356.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":807.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":386.79999923706055,"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":356.9000005722046,"connectEnd":356.9000005722046,"connectStart":356.9000005722046,"domainLookupEnd":356.9000005722046,"domainLookupStart":356.9000005722046,"fetchStart":356.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":356.9000005722046,"responseEnd":743.6999998092651,"responseStart":743.6999998092651,"secureConnectionStart":356.9000005722046},{"duration":574.6999998092651,"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":359.30000019073486,"connectEnd":359.30000019073486,"connectStart":359.30000019073486,"domainLookupEnd":359.30000019073486,"domainLookupStart":359.30000019073486,"fetchStart":359.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":359.30000019073486,"responseEnd":934,"responseStart":934,"secureConnectionStart":359.30000019073486},{"duration":1285.1999998092651,"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":359.30000019073486,"connectEnd":359.30000019073486,"connectStart":359.30000019073486,"domainLookupEnd":359.30000019073486,"domainLookupStart":359.30000019073486,"fetchStart":359.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":359.30000019073486,"responseEnd":1644.5,"responseStart":1644.5,"secureConnectionStart":359.30000019073486},{"duration":91.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":843.3000001907349,"connectEnd":843.3000001907349,"connectStart":843.3000001907349,"domainLookupEnd":843.3000001907349,"domainLookupStart":843.3000001907349,"fetchStart":843.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":843.3000001907349,"responseEnd":934.6000003814697,"responseStart":934.6000003814697,"secureConnectionStart":843.3000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":170,"responseStart":342,"responseEnd":349,"domLoading":351,"domInteractive":1667,"domContentLoadedEventStart":1667,"domContentLoadedEventEnd":1714,"domComplete":3386,"loadEventStart":3387,"loadEventEnd":3387,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1646.5},{"name":"bigPipe.sidebar-id.end","time":1647.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.start","time":1647.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1649},{"name":"activityTabFullyLoaded","time":1728.6999998092651}],"measures":[],"correlationId":"a13de213303dd9","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":109,"dbReadsTimeInMs":20,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}