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":1194.5999999046326,"ttfb":240.80000019073486,"pageVisibility":"visible","entityId":57556,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6d312e9c-e266-4a27-a14c-4e7082e71f9a","navigationType":0,"readyForUser":1298.8000001907349,"redirectCount":0,"resourceLoadedEnd":870.0999999046326,"resourceLoadedStart":252.40000009536743,"resourceTiming":[{"duration":22.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":252.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":275.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":22.899999618530273,"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":252.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":275.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":445,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":252.90000009536743,"connectEnd":252.90000009536743,"connectStart":252.90000009536743,"domainLookupEnd":252.90000009536743,"domainLookupStart":252.90000009536743,"fetchStart":252.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":278.80000019073486,"responseEnd":697.9000000953674,"responseStart":337.40000009536743,"secureConnectionStart":252.90000009536743},{"duration":617,"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":253.09999990463257,"connectEnd":253.09999990463257,"connectStart":253.09999990463257,"domainLookupEnd":253.09999990463257,"domainLookupStart":253.09999990463257,"fetchStart":253.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":279.09999990463257,"responseEnd":870.0999999046326,"responseStart":368.30000019073486,"secureConnectionStart":253.09999990463257},{"duration":90.7999997138977,"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":253.2000002861023,"connectEnd":253.2000002861023,"connectStart":253.2000002861023,"domainLookupEnd":253.2000002861023,"domainLookupStart":253.2000002861023,"fetchStart":253.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":279.30000019073486,"responseEnd":344,"responseStart":339,"secureConnectionStart":253.2000002861023},{"duration":90.7000002861023,"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":253.5,"connectEnd":253.5,"connectStart":253.5,"domainLookupEnd":253.5,"domainLookupStart":253.5,"fetchStart":253.5,"redirectEnd":0,"redirectStart":0,"requestStart":280.59999990463257,"responseEnd":344.2000002861023,"responseStart":341,"secureConnectionStart":253.5},{"duration":89.89999961853027,"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":254.2000002861023,"connectEnd":254.2000002861023,"connectStart":254.2000002861023,"domainLookupEnd":254.2000002861023,"domainLookupStart":254.2000002861023,"fetchStart":254.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":280.7000002861023,"responseEnd":344.09999990463257,"responseStart":340,"secureConnectionStart":254.2000002861023},{"duration":23,"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":254.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":277.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":90.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":255.30000019073486,"connectEnd":255.30000019073486,"connectStart":255.30000019073486,"domainLookupEnd":255.30000019073486,"domainLookupStart":255.30000019073486,"fetchStart":255.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":299.80000019073486,"responseEnd":345.40000009536743,"responseStart":342.5,"secureConnectionStart":255.30000019073486},{"duration":24.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":255.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":255.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":280.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":89.2999997138977,"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":256.2000002861023,"connectEnd":256.2000002861023,"connectStart":256.2000002861023,"domainLookupEnd":256.2000002861023,"domainLookupStart":256.2000002861023,"fetchStart":256.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":299.90000009536743,"responseEnd":345.5,"responseStart":343.30000019073486,"secureConnectionStart":256.2000002861023},{"duration":597.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":257.90000009536743,"connectEnd":257.90000009536743,"connectStart":257.90000009536743,"domainLookupEnd":257.90000009536743,"domainLookupStart":257.90000009536743,"fetchStart":257.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":531.3000001907349,"responseEnd":855.4000000953674,"responseStart":849.4000000953674,"secureConnectionStart":257.90000009536743},{"duration":589.3999996185303,"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":266.2000002861023,"connectEnd":266.2000002861023,"connectStart":266.2000002861023,"domainLookupEnd":266.2000002861023,"domainLookupStart":266.2000002861023,"fetchStart":266.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":535.5999999046326,"responseEnd":855.5999999046326,"responseStart":851.0999999046326,"secureConnectionStart":266.2000002861023},{"duration":141.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":847.3000001907349,"connectEnd":847.3000001907349,"connectStart":847.3000001907349,"domainLookupEnd":847.3000001907349,"domainLookupStart":847.3000001907349,"fetchStart":847.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":956,"responseEnd":989.2000002861023,"responseStart":987.8000001907349,"secureConnectionStart":847.3000001907349},{"duration":368.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1124,"connectEnd":1124,"connectStart":1124,"domainLookupEnd":1124,"domainLookupStart":1124,"fetchStart":1124,"redirectEnd":0,"redirectStart":0,"requestStart":1452.3000001907349,"responseEnd":1492.5,"responseStart":1490.9000000953674,"secureConnectionStart":1124},{"duration":374.7000002861023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1171,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1171,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1545.7000002861023,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":30,"responseStart":241,"responseEnd":266,"domLoading":249,"domInteractive":1411,"domContentLoadedEventStart":1411,"domContentLoadedEventEnd":1498,"domComplete":1875,"loadEventStart":1875,"loadEventEnd":1876,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1346.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1347.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1347.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1358.0999999046326},{"name":"activityTabFullyLoaded","time":1560.8000001907349}],"measures":[],"correlationId":"f491d20aa42394","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":116,"dbReadsTimeInMs":18,"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 | |
+-------------------------------+-------------------+