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":1291.5,"ttfb":264.2999999523163,"pageVisibility":"visible","entityId":57556,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"9502c87f-e678-474b-b1ba-1d1b11ec8f4e","navigationType":0,"readyForUser":1384,"redirectCount":0,"resourceLoadedEnd":1634.7999999523163,"resourceLoadedStart":271,"resourceTiming":[{"duration":478.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":271,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":271,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":749.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":478.7000000476837,"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":271.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":271.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":750,"responseStart":0,"secureConnectionStart":0},{"duration":535.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":271.59999990463257,"connectEnd":271.59999990463257,"connectStart":271.59999990463257,"domainLookupEnd":271.59999990463257,"domainLookupStart":271.59999990463257,"fetchStart":271.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":271.59999990463257,"responseEnd":806.8999998569489,"responseStart":806.8999998569489,"secureConnectionStart":271.59999990463257},{"duration":569.3999998569489,"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":271.7000000476837,"connectEnd":271.7000000476837,"connectStart":271.7000000476837,"domainLookupEnd":271.7000000476837,"domainLookupStart":271.7000000476837,"fetchStart":271.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":271.7000000476837,"responseEnd":841.0999999046326,"responseStart":841.0999999046326,"secureConnectionStart":271.7000000476837},{"duration":573.5,"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":272,"connectEnd":272,"connectStart":272,"domainLookupEnd":272,"domainLookupStart":272,"fetchStart":272,"redirectEnd":0,"redirectStart":0,"requestStart":272,"responseEnd":845.5,"responseStart":845.5,"secureConnectionStart":272},{"duration":574.5,"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":272.2000000476837,"connectEnd":272.2000000476837,"connectStart":272.2000000476837,"domainLookupEnd":272.2000000476837,"domainLookupStart":272.2000000476837,"fetchStart":272.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":272.2000000476837,"responseEnd":846.7000000476837,"responseStart":846.7000000476837,"secureConnectionStart":272.2000000476837},{"duration":575.2000000476837,"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":272.39999985694885,"connectEnd":272.39999985694885,"connectStart":272.39999985694885,"domainLookupEnd":272.39999985694885,"domainLookupStart":272.39999985694885,"fetchStart":272.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":272.39999985694885,"responseEnd":847.5999999046326,"responseStart":847.5999999046326,"secureConnectionStart":272.39999985694885},{"duration":699,"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":272.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":272.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":971.5,"responseStart":0,"secureConnectionStart":0},{"duration":575.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":272.7000000476837,"connectEnd":272.7000000476837,"connectStart":272.7000000476837,"domainLookupEnd":272.7000000476837,"domainLookupStart":272.7000000476837,"fetchStart":272.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":272.7000000476837,"responseEnd":848.5,"responseStart":848.5,"secureConnectionStart":272.7000000476837},{"duration":698.8000001907349,"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":272.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":272.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":971.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":578,"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":273,"connectEnd":273,"connectStart":273,"domainLookupEnd":273,"domainLookupStart":273,"fetchStart":273,"redirectEnd":0,"redirectStart":0,"requestStart":273,"responseEnd":851,"responseStart":851,"secureConnectionStart":273},{"duration":1359.7999999523163,"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":274.5,"connectEnd":274.5,"connectStart":274.5,"domainLookupEnd":274.5,"domainLookupStart":274.5,"fetchStart":274.5,"redirectEnd":0,"redirectStart":0,"requestStart":274.5,"responseEnd":1634.2999999523163,"responseStart":1634.2999999523163,"secureConnectionStart":274.5},{"duration":1354.2999999523163,"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":280.5,"connectEnd":280.5,"connectStart":280.5,"domainLookupEnd":280.5,"domainLookupStart":280.5,"fetchStart":280.5,"redirectEnd":0,"redirectStart":0,"requestStart":280.5,"responseEnd":1634.7999999523163,"responseStart":1634.7999999523163,"secureConnectionStart":280.5},{"duration":543.2999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1045.5999999046326,"connectEnd":1045.5999999046326,"connectStart":1045.5999999046326,"domainLookupEnd":1045.5999999046326,"domainLookupStart":1045.5999999046326,"fetchStart":1045.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1045.5999999046326,"responseEnd":1588.8999998569489,"responseStart":1588.8999998569489,"secureConnectionStart":1045.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":65,"responseStart":265,"responseEnd":273,"domLoading":268,"domInteractive":1718,"domContentLoadedEventStart":1718,"domContentLoadedEventEnd":1781,"domComplete":2707,"loadEventStart":2708,"loadEventEnd":2708,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1665.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1666.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1666.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1674.5999999046326},{"name":"activityTabFullyLoaded","time":1800.7999999523163}],"measures":[],"correlationId":"e3b618cb9cc315","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":18,"dbConnsTimeInMs":28,"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 | |
+-------------------------------+-------------------+