Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.3(EOL) , 10.4(EOL) , 10.5 , 10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL) , 10.11
CREATE TABLE t ( f INT AS ( 1 IN ( 2 NOT BETWEEN 3 AND 4 ) ) );
CREATE TABLE t ( f INT , CHECK ( 1 IN ( 2 NOT BETWEEN 3 AND 4 ) ) );
Both of the above fail with a syntax error:
10.3 7baf24a0f8e
MariaDB [test]> CREATE TABLE t ( f INT , CHECK ( 1 IN ( 2 NOT BETWEEN 3 AND 4 ) ) );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not between 3 and 4' at line 1
MariaDB [test]> show warnings;
+ -------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+ -------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1064 | You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not between 3 and 4' at line 1 |
| Error | 1033 | Incorrect information in file: './test/t.frm' |
+ -------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.000 sec)
A view gets created, but fails afterwards:
MariaDB [test]> CREATE VIEW v AS SELECT 1 IN ( 2 NOT BETWEEN 3 AND 4 );
Query OK, 0 rows affected (0.015 sec)
MariaDB [test]> show create view v;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not between 3 and 4 AS `1 IN ( 2 NOT BETWEEN 3 AND 4 )`' at line 1
The .frm contains
query= select 1 = 2 not between 3 and 4 AS `1 IN ( 2 NOT BETWEEN 3 AND 4 )`
source= SELECT 1 IN ( 2 NOT BETWEEN 3 AND 4 )
view_body_utf8= select 1 = 2 not between 3 and 4 AS `1 IN ( 2 NOT BETWEEN 3 AND 4 )`
SELECT itself works:
MariaDB [test]> SELECT 1 IN ( 2 NOT BETWEEN 3 AND 4 );
+ --------------------------------+
| 1 IN ( 2 NOT BETWEEN 3 AND 4 ) |
+ --------------------------------+
| 1 |
+ --------------------------------+
1 row in set (0.000 sec)
MariaDB [test]> SELECT 1 IN ( 2 NOT BETWEEN 2 AND 4 );
+ --------------------------------+
| 1 IN ( 2 NOT BETWEEN 2 AND 4 ) |
+ --------------------------------+
| 0 |
+ --------------------------------+
1 row in set (0.000 sec)
The errors started happening after this commit in 10.2.35:
commit 05a878c139963d4859ef8f2c974fee5dae56ee51
Author: Sergei Golubchik
Date: Mon Oct 5 12:50:51 2020 +0200
precedence bugfixing
{"report":{"fcp":721.9000000953674,"ttfb":193.20000004768372,"pageVisibility":"visible","entityId":117415,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"837aa865-e215-4bfd-9754-fa271e5fee23","navigationType":0,"readyForUser":847.1000001430511,"redirectCount":0,"resourceLoadedEnd":480.2000000476837,"resourceLoadedStart":201.80000019073486,"resourceTiming":[{"duration":5.099999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":201.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":206.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":5.099999904632568,"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":202.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":202.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":207.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":135.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":202.20000004768372,"connectEnd":202.20000004768372,"connectStart":202.20000004768372,"domainLookupEnd":202.20000004768372,"domainLookupStart":202.20000004768372,"fetchStart":202.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":212.30000019073486,"responseEnd":337.90000009536743,"responseStart":225.70000004768372,"secureConnectionStart":202.20000004768372},{"duration":257.60000014305115,"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":202.70000004768372,"connectEnd":202.70000004768372,"connectStart":202.70000004768372,"domainLookupEnd":202.70000004768372,"domainLookupStart":202.70000004768372,"fetchStart":202.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":212.60000014305115,"responseEnd":460.30000019073486,"responseStart":228.5,"secureConnectionStart":202.70000004768372},{"duration":29.399999856948853,"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":202.80000019073486,"connectEnd":202.80000019073486,"connectStart":202.80000019073486,"domainLookupEnd":202.80000019073486,"domainLookupStart":202.80000019073486,"fetchStart":202.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":213.30000019073486,"responseEnd":232.20000004768372,"responseStart":230.70000004768372,"secureConnectionStart":202.80000019073486},{"duration":32,"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":202.80000019073486,"connectEnd":202.80000019073486,"connectStart":202.80000019073486,"domainLookupEnd":202.80000019073486,"domainLookupStart":202.80000019073486,"fetchStart":202.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":215,"responseEnd":234.80000019073486,"responseStart":232.5,"secureConnectionStart":202.80000019073486},{"duration":32.10000014305115,"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":203,"connectEnd":203,"connectStart":203,"domainLookupEnd":203,"domainLookupStart":203,"fetchStart":203,"redirectEnd":0,"redirectStart":0,"requestStart":215.90000009536743,"responseEnd":235.10000014305115,"responseStart":233.20000004768372,"secureConnectionStart":203},{"duration":9.099999904632568,"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":203.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":203.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":212.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":34.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":203.10000014305115,"connectEnd":203.10000014305115,"connectStart":203.10000014305115,"domainLookupEnd":203.10000014305115,"domainLookupStart":203.10000014305115,"fetchStart":203.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":217.70000004768372,"responseEnd":237.70000004768372,"responseStart":235.30000019073486,"secureConnectionStart":203.10000014305115},{"duration":11.700000047683716,"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":203.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":203.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":214.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":36.09999990463257,"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":203.40000009536743,"connectEnd":203.40000009536743,"connectStart":203.40000009536743,"domainLookupEnd":203.40000009536743,"domainLookupStart":203.40000009536743,"fetchStart":203.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":220.60000014305115,"responseEnd":239.5,"responseStart":238.10000014305115,"secureConnectionStart":203.40000009536743},{"duration":266.40000009536743,"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":213.5,"connectEnd":213.5,"connectStart":213.5,"domainLookupEnd":213.5,"domainLookupStart":213.5,"fetchStart":213.5,"redirectEnd":0,"redirectStart":0,"requestStart":225.30000019073486,"responseEnd":479.90000009536743,"responseStart":473.90000009536743,"secureConnectionStart":213.5},{"duration":260.39999985694885,"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":219.80000019073486,"connectEnd":219.80000019073486,"connectStart":219.80000019073486,"domainLookupEnd":219.80000019073486,"domainLookupStart":219.80000019073486,"fetchStart":219.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":227.10000014305115,"responseEnd":480.2000000476837,"responseStart":474.40000009536743,"secureConnectionStart":219.80000019073486},{"duration":76.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":481.90000009536743,"connectEnd":481.90000009536743,"connectStart":481.90000009536743,"domainLookupEnd":481.90000009536743,"domainLookupStart":481.90000009536743,"fetchStart":481.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":529.1000001430511,"responseEnd":558.2000000476837,"responseStart":557.7000000476837,"secureConnectionStart":481.90000009536743},{"duration":138.20000004768372,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":714.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":714.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":852.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":167.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":721.7000000476837,"connectEnd":721.7000000476837,"connectStart":721.7000000476837,"domainLookupEnd":721.7000000476837,"domainLookupStart":721.7000000476837,"fetchStart":721.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":857.2000000476837,"responseEnd":889.6000001430511,"responseStart":888.8000001907349,"secureConnectionStart":721.7000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":45,"responseStart":193,"responseEnd":219,"domLoading":196,"domInteractive":919,"domContentLoadedEventStart":919,"domContentLoadedEventEnd":968,"domComplete":1179,"loadEventStart":1179,"loadEventEnd":1180,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":894.5},{"name":"bigPipe.sidebar-id.end","time":895.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":895.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":897.1000001430511},{"name":"activityTabFullyLoaded","time":987.4000000953674}],"measures":[],"correlationId":"1a01170f75cf5e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":83,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
this fails too: