MariaDB has a number of unnecessarily reserved keywords that are not reserved neither in the SQL standard nor in the other databases. This makes migration to MariaDB harder, as the DBA has to rename tables, columns and other objects.
LOCALTIMESTAMP is an example.
This query:
CREATETABLE localtimestamp (a INT);
works without problems in Oracle, but returns an error in MariaDB:
ERROR 1064 (42000): You have an error in your SQL syntax...near 'localtimestamp ...
Under terms of this tasks, we'll find all keywords that are reserved in MariaDB but not reserved in the other databases and try to "unreserve" those that do not really have to be reserved.
Daniel Black
added a comment - Seems at least REF_SYSTEM_ID is missing from https://mariadb.com/kb/en/mariadb/reserved-words/ (and the rest of the GIS documentation)
Jérôme Brauge
added a comment - This is scripts to test all keyword used as
variable name : keywords_var_mdb.sql and keywords_var_ora.sql
table alias name : keywords_alias_mdb.sql and keywords_alias_ora.sql
block/goto label : keywords_label_mdb.sql and keywords_label_ora.sql
Results are aggregate in an excel file: keywords.xlsx.
"TODO" in cells of this excel means : works fine in Oracle (as a variable, or a label, or a table alias), but does not work in sql_mode=ORACLE
keywords.xlsx keywords_alias_mdb.sql keywords_alias_ora.sql keywords_label_mdb.sql keywords_label_ora.sql keywords_var_mdb.sql keywords_var_ora.sql
People
Unassigned
Alexander Barkov
Votes:
3Vote for this issue
Watchers:
5Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":6068.5,"ttfb":1150.1999998092651,"pageVisibility":"visible","entityId":57556,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0,"journeyId":"f6df1f40-d05b-4b6f-9dfd-c4047c1691ca","navigationType":0,"readyForUser":5321.39999961853,"redirectCount":0,"resourceLoadedEnd":4809.599999904633,"resourceLoadedStart":1268.3999996185303,"resourceTiming":[{"duration":329.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1268.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1268.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1597.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":329.19999980926514,"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":1268.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1268.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1597.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":3005.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1268.8999996185303,"connectEnd":1268.8999996185303,"connectStart":1268.8999996185303,"domainLookupEnd":1268.8999996185303,"domainLookupStart":1268.8999996185303,"fetchStart":1268.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1601.5,"responseEnd":4274.39999961853,"responseStart":2473,"secureConnectionStart":1268.8999996185303},{"duration":3540.5,"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":1269.0999999046326,"connectEnd":1269.0999999046326,"connectStart":1269.0999999046326,"domainLookupEnd":1269.0999999046326,"domainLookupStart":1269.0999999046326,"fetchStart":1269.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1604.5,"responseEnd":4809.599999904633,"responseStart":2558,"secureConnectionStart":1269.0999999046326},{"duration":1502.6999998092651,"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":1269.1999998092651,"connectEnd":1269.1999998092651,"connectStart":1269.1999998092651,"domainLookupEnd":1269.1999998092651,"domainLookupStart":1269.1999998092651,"fetchStart":1269.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1614.0999999046326,"responseEnd":2771.8999996185303,"responseStart":2580.7999997138977,"secureConnectionStart":1269.1999998092651},{"duration":1502.8000001907349,"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":1269.3999996185303,"connectEnd":1269.3999996185303,"connectStart":1269.3999996185303,"domainLookupEnd":1269.3999996185303,"domainLookupStart":1269.3999996185303,"fetchStart":1269.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1617.3999996185303,"responseEnd":2772.199999809265,"responseStart":2642,"secureConnectionStart":1269.3999996185303},{"duration":1502.7999997138977,"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":1269.5999999046326,"connectEnd":1269.5999999046326,"connectStart":1269.5999999046326,"domainLookupEnd":1269.5999999046326,"domainLookupStart":1269.5999999046326,"fetchStart":1269.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1617.6999998092651,"responseEnd":2772.3999996185303,"responseStart":2642.8999996185303,"secureConnectionStart":1269.5999999046326},{"duration":328.5,"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":1269.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1269.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1598.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":1499.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1273.3999996185303,"connectEnd":1273.3999996185303,"connectStart":1273.3999996185303,"domainLookupEnd":1273.3999996185303,"domainLookupStart":1273.3999996185303,"fetchStart":1273.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1620.2999997138977,"responseEnd":2772.5,"responseStart":2659.7999997138977,"secureConnectionStart":1273.3999996185303},{"duration":326.09999990463257,"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":1273.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1273.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1599.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":1652.0999999046326,"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":1273.7999997138977,"connectEnd":1273.7999997138977,"connectStart":1273.7999997138977,"domainLookupEnd":1273.7999997138977,"domainLookupStart":1273.7999997138977,"fetchStart":1273.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1620.5999999046326,"responseEnd":2925.8999996185303,"responseStart":2722.8999996185303,"secureConnectionStart":1273.7999997138977},{"duration":3528.5,"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":1275.1999998092651,"connectEnd":1275.1999998092651,"connectStart":1275.1999998092651,"domainLookupEnd":1275.1999998092651,"domainLookupStart":1275.1999998092651,"fetchStart":1275.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":2260.199999809265,"responseEnd":4803.699999809265,"responseStart":4460.89999961853,"secureConnectionStart":1275.1999998092651},{"duration":1875.4000000953674,"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":2929.2999997138977,"connectEnd":2929.2999997138977,"connectStart":2929.2999997138977,"domainLookupEnd":2929.2999997138977,"domainLookupStart":2929.2999997138977,"fetchStart":2929.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":3234.2999997138977,"responseEnd":4804.699999809265,"responseStart":4604.5,"secureConnectionStart":2929.2999997138977},{"duration":498.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":4457.099999904633,"connectEnd":4457.099999904633,"connectStart":4457.099999904633,"domainLookupEnd":4457.099999904633,"domainLookupStart":4457.099999904633,"fetchStart":4457.099999904633,"redirectEnd":0,"redirectStart":0,"requestStart":4807.599999904633,"responseEnd":4955.5,"responseStart":4889.799999713898,"secureConnectionStart":4457.099999904633}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":513,"responseStart":1151,"responseEnd":2927,"domLoading":1155,"domInteractive":5437,"domContentLoadedEventStart":5437,"domContentLoadedEventEnd":5505,"domComplete":7160,"loadEventStart":7160,"loadEventEnd":7160,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":5393.799999713898},{"name":"bigPipe.sidebar-id.end","time":5394.599999904633},{"name":"bigPipe.activity-panel-pipe-id.start","time":5394.799999713898},{"name":"bigPipe.activity-panel-pipe-id.end","time":5403.099999904633},{"name":"activityTabFullyLoaded","time":5520.39999961853}],"measures":[],"correlationId":"a9836d2a2f86a5","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":119,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The list of MariaDB reserved keywords that are not reserved in SQL-2011:
+-------------------------------+-------------------+
| keyword | type |
+-------------------------------+-------------------+
| ACCESSIBLE | |
| ADD | |
| ANALYZE | VerbClause |
| ASC | |
| BEFORE | |
| CASCADE | |
| CHANGE | |
| CONTINUE | |
| DATABASE | |
| DATABASES | |
| DAY_HOUR | TermporalInterval |
| DAY_MICROSECOND | TermporalInterval |
| DAY_MINUTE | TermporalInterval |
| DAY_SECOND | TermporalInterval |
| DELAYED | |
| DESC | |
| DISTINCTROW | |
| DIV | Operator |
| DO_DOMAIN_IDS | |
| DUAL | |
| ELSEIF | |
| ENCLOSED | |
| ESCAPED | |
| EXCLUDE | |
| EXIT | |
| EXPLAIN | VerbClause |
| FLOAT4 | DataType |
| FLOAT8 | DataType |
| FOLLOWING | |
| FORCE | |
| FULLTEXT | |
| HIGH_PRIORITY | QueryOption |
| HOUR_MICROSECOND | TermporalInterval |
| HOUR_MINUTE | TermporalInterval |
| HOUR_SECOND | TermporalInterval |
| IGNORE | |
| IGNORE_DOMAIN_IDS | |
| INDEX | |
| INFILE | |
| INT1 | DataType |
| INT2 | DataType |
| INT3 | DataType |
| INT4 | DataType |
| INT8 | DataType |
| ITERATE | |
| KEY | |
| KEYS | |
| KILL | VerbClause |
| LEAVE | |
| LIMIT | |
| LINEAR | |
| LINES | |
| LOAD | VerbClause |
| LOCK | VerbClause |
| LONG | |
| LONGBLOB | DataType |
| LONGTEXT | DataType |
| LOOP | |
| LOW_PRIORITY | |
| MASTER_SSL_VERIFY_SERVER_CERT | |
| MAXVALUE | |
| MEDIUMBLOB | DataType |
| MEDIUMINT | DataType |
| MEDIUMTEXT | DataType |
| MIDDLEINT | DataType |
| MINUTE_MICROSECOND | TermporalInterval |
| MINUTE_SECOND | TermporalInterval |
| NO_WRITE_TO_BINLOG | |
| OPTIMIZE | VerbClause |
| OPTIONALLY | |
| OTHERS | |
| OUTFILE | |
| PAGE_CHECKSUM | |
| PARSE_VCOL_EXPR | |
| PRECEDING | |
| PURGE | VerbClause |
| READ | |
| READ_WRITE | |
| REF_SYSTEM_ID | |
| REGEXP | Operator |
| RENAME | VerbClause |
| REPEAT | |
| REPLACE | VerbClause |
| REQUIRE | |
| RESIGNAL | VerbClause |
| RESTRICT | |
| RETURNING | |
| RLIKE | Operator |
| SCHEMA | |
| SCHEMAS | |
| SECOND_MICROSECOND | TermporalInterval |
| SEPARATOR | |
| SHOW | VerbClause |
| SIGNAL | VerbClause |
| SPATIAL | |
| SQL_BIG_RESULT | QueryOption |
| SQL_CALC_FOUND_ROWS | QueryOption |
| SQL_SMALL_RESULT | QueryOption |
| SSL | |
| STARTING | |
| STATS_AUTO_RECALC | |
| STATS_PERSISTENT | |
| STATS_SAMPLE_PAGES | |
| STRAIGHT_JOIN | QueryOption |
| TERMINATED | |
| TIES | |
| TINYBLOB | DataType |
| TINYINT | DataType |
| TINYTEXT | DataType |
| UNBOUNDED | |
| UNDO | |
| UNLOCK | VerbClause |
| UNSIGNED | |
| USAGE | |
| USE | VerbClause |
| UTC_DATE | Function |
| UTC_TIME | Function |
| UTC_TIMESTAMP | Function |
| VARCHARACTER | DataType |
| WHILE | |
| WRITE | |
| XOR | Operator |
| YEAR_MONTH | TermporalInterval |
| ZEROFILL | |
+-------------------------------+-------------------+