One can not use TRIM() function with ColumnStore 1.2.x while sql_mode=oracle. Test case is simple:
openxs@ao756:/usr/local/mariadb/columnstore/bin$ mcsmysql -uroot test
|
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 10
|
Server version: 10.3.11-MariaDB-log Columnstore 1.2.2-1
|
|
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [test]> create table tf(file_name varchar(100), c1 int) engine=columnstore;
|
Query OK, 0 rows affected (3,410 sec)
|
|
MariaDB [test]> insert into tf values('file.txt ', 1), ('file2.sql ', 2);
|
Query OK, 2 rows affected (1,062 sec)
|
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> select * from tf where trim(file_name) = 'file.txt';
|
+-------------+------+
|
| file_name | c1 |
|
+-------------+------+
|
| file.txt | 1 |
|
+-------------+------+
|
1 row in set (0,178 sec)
|
|
MariaDB [test]> select @@sql_mode;
|
+-----------------------------------------------------------------------+
|
| @@sql_mode |
|
+-----------------------------------------------------------------------+
|
| ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
|
+-----------------------------------------------------------------------+
|
1 row in set (0,002 sec)
|
|
MariaDB [test]> set session sql_mode=oracle;
|
Query OK, 0 rows affected (0,000 sec)
|
|
MariaDB [test]> select @@sql_mode;
|
+----------------------------------------------------------------------------------------------------------------------------------------------+
|
| @@sql_mode |
|
+----------------------------------------------------------------------------------------------------------------------------------------------+
|
| PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT |
|
+----------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0,002 sec)
|
|
MariaDB [test]> select * from tf where trim(file_name) = 'file.txt';
|
ERROR 1815 (HY000): Internal error: IDB-1001: Function 'trim_oracle' can only be used in the outermost select or order by clause and cannot be used in conjunction with an aggregate function.
|
MariaDB [test]> select * from tf where file_name like 'file.txt%';
|
+-------------+------+
|
| file_name | c1 |
|
+-------------+------+
|
| file.txt | 1 |
|
+-------------+------+
|
1 row in set (0,029 sec)
|
There was no problem like this with ColumnStore 1.1.x., so it's regression of a kind.
- relates to
-
MCOL-2124
substr functions fails with an aggregate function or with GROUP BY cluase with set oracle sql_mode
-
-
Closed
{"report":{"fcp":2197.199999809265,"ttfb":507.5,"pageVisibility":"visible","entityId":72191,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"3ec53e46-9352-43ed-adb0-53297e80b5fb","navigationType":0,"readyForUser":2771.8999996185303,"redirectCount":0,"resourceLoadedEnd":3390,"resourceLoadedStart":522.5,"resourceTiming":[{"duration":570,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":522.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":522.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1092.5,"responseStart":0,"secureConnectionStart":0},{"duration":570.3999996185303,"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":522.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":522.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1093.2999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":739.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":523.0999994277954,"connectEnd":523.0999994277954,"connectStart":523.0999994277954,"domainLookupEnd":523.0999994277954,"domainLookupStart":523.0999994277954,"fetchStart":523.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":523.0999994277954,"responseEnd":1262.5999994277954,"responseStart":1262.5999994277954,"secureConnectionStart":523.0999994277954},{"duration":958.6000003814697,"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":523.2999992370605,"connectEnd":523.2999992370605,"connectStart":523.2999992370605,"domainLookupEnd":523.2999992370605,"domainLookupStart":523.2999992370605,"fetchStart":523.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":523.2999992370605,"responseEnd":1481.8999996185303,"responseStart":1481.8999996185303,"secureConnectionStart":523.2999992370605},{"duration":962.8999996185303,"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":523.5,"connectEnd":523.5,"connectStart":523.5,"domainLookupEnd":523.5,"domainLookupStart":523.5,"fetchStart":523.5,"redirectEnd":0,"redirectStart":0,"requestStart":523.5,"responseEnd":1486.3999996185303,"responseStart":1486.3999996185303,"secureConnectionStart":523.5},{"duration":963.9000005722046,"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":523.5999994277954,"connectEnd":523.5999994277954,"connectStart":523.5999994277954,"domainLookupEnd":523.5999994277954,"domainLookupStart":523.5999994277954,"fetchStart":523.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":523.5999994277954,"responseEnd":1487.5,"responseStart":1487.5,"secureConnectionStart":523.5999994277954},{"duration":964.9000005722046,"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":523.7999992370605,"connectEnd":523.7999992370605,"connectStart":523.7999992370605,"domainLookupEnd":523.7999992370605,"domainLookupStart":523.7999992370605,"fetchStart":523.7999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":523.7999992370605,"responseEnd":1488.6999998092651,"responseStart":1488.6999998092651,"secureConnectionStart":523.7999992370605},{"duration":1164.6999998092651,"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":524,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":524,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1688.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":973.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":524.0999994277954,"connectEnd":524.0999994277954,"connectStart":524.0999994277954,"domainLookupEnd":524.0999994277954,"domainLookupStart":524.0999994277954,"fetchStart":524.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":524.0999994277954,"responseEnd":1498,"responseStart":1498,"secureConnectionStart":524.0999994277954},{"duration":1164.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":524.2999992370605,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":524.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1688.7999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":977.3000001907349,"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":524.3999996185303,"connectEnd":524.3999996185303,"connectStart":524.3999996185303,"domainLookupEnd":524.3999996185303,"domainLookupStart":524.3999996185303,"fetchStart":524.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":524.3999996185303,"responseEnd":1501.6999998092651,"responseStart":1501.6999998092651,"secureConnectionStart":524.3999996185303},{"duration":2846.7000007629395,"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":525.2999992370605,"connectEnd":525.2999992370605,"connectStart":525.2999992370605,"domainLookupEnd":525.2999992370605,"domainLookupStart":525.2999992370605,"fetchStart":525.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":525.2999992370605,"responseEnd":3372,"responseStart":3372,"secureConnectionStart":525.2999992370605},{"duration":2846.9000005722046,"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":525.2999992370605,"connectEnd":525.2999992370605,"connectStart":525.2999992370605,"domainLookupEnd":525.2999992370605,"domainLookupStart":525.2999992370605,"fetchStart":525.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":525.2999992370605,"responseEnd":3372.199999809265,"responseStart":3372.199999809265,"secureConnectionStart":525.2999992370605},{"duration":291.9000005722046,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1761.2999992370605,"connectEnd":1761.2999992370605,"connectStart":1761.2999992370605,"domainLookupEnd":1761.2999992370605,"domainLookupStart":1761.2999992370605,"fetchStart":1761.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":1761.2999992370605,"responseEnd":2053.199999809265,"responseStart":2053.199999809265,"secureConnectionStart":1761.2999992370605},{"duration":1262.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":2127.199999809265,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2127.199999809265,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3390,"responseStart":0,"secureConnectionStart":0},{"duration":1244.9000005722046,"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":2128.0999994277954,"connectEnd":2128.0999994277954,"connectStart":2128.0999994277954,"domainLookupEnd":2128.0999994277954,"domainLookupStart":2128.0999994277954,"fetchStart":2128.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":2128.0999994277954,"responseEnd":3373,"responseStart":3373,"secureConnectionStart":2128.0999994277954},{"duration":1252.5999994277954,"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":2128.5,"connectEnd":2128.5,"connectStart":2128.5,"domainLookupEnd":2128.5,"domainLookupStart":2128.5,"fetchStart":2128.5,"redirectEnd":0,"redirectStart":0,"requestStart":2128.5,"responseEnd":3381.0999994277954,"responseStart":3381.0999994277954,"secureConnectionStart":2128.5},{"duration":1344.6999998092651,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":2180.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2180.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3525.0999994277954,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":342,"responseStart":507,"responseEnd":513,"domLoading":520,"domInteractive":3619,"domContentLoadedEventStart":3619,"domContentLoadedEventEnd":3689,"domComplete":4753,"loadEventStart":4753,"loadEventEnd":4755,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3400},{"name":"bigPipe.sidebar-id.end","time":3400.7999992370605},{"name":"bigPipe.activity-panel-pipe-id.start","time":3401},{"name":"bigPipe.activity-panel-pipe-id.end","time":3412.2999992370605},{"name":"activityTabFullyLoaded","time":3714.3999996185303}],"measures":[],"correlationId":"b7cd1187802be8","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Unfortunately can't make this a straight alias as trim_oracle returns NULL on empty result. We might be able to modify the internal trim function to have an extra parameter for this. We do this in a few other functions.