Type:
Task
Priority:
Major
Resolution:
Fixed
DECLARE has different meanings in the default sql_mode and in sql_mode=ORACLE.
To unify sql_yacc.yy and sql_yacc_ora.yy easier, we'll add sql_mode specific tokens for this keyword and modify the grammar in sql_yacc.yy and sql_yacc_ora.yy accordingly.
Instead of DECLARE_SYM, we'll have separate DECLARE_MARIADB_SYM and DECLARE_ORACLE_SYM.
This will make possible for native and Oracle grammar rules to co-exists in the same *.yy files.
By default, Lex_input_stream::find_keyword() will return DECLARE_MARIADB_SYM, and translate it to DECLARE_ORACLE_SYM in Oracle compatibility mode:
if (m_thd->variables.sql_mode & MODE_ORACLE)
{
switch (symbol->tok) {
...
case DECLARE_MARIADB_SYM: return DECLARE_ORACLE_SYM;
...
}
}
blocks
MDEV-12518
Unify sql_yacc.yy and sql_yacc_ora.yy
Closed
{"report":{"fcp":1058,"ttfb":303.19999980926514,"pageVisibility":"visible","entityId":70721,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f9158079-43b9-43f9-b3c1-573f949b3301","navigationType":0,"readyForUser":1174.6000003814697,"redirectCount":0,"resourceLoadedEnd":1165.4000005722046,"resourceLoadedStart":370.1000003814697,"resourceTiming":[{"duration":27.399999618530273,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":370.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":370.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":397.5,"responseStart":0,"secureConnectionStart":0},{"duration":27.699999809265137,"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":370.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":370.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":82.90000057220459,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":370.5,"connectEnd":370.5,"connectStart":370.5,"domainLookupEnd":370.5,"domainLookupStart":370.5,"fetchStart":370.5,"redirectEnd":0,"redirectStart":0,"requestStart":370.5,"responseEnd":453.4000005722046,"responseStart":453.4000005722046,"secureConnectionStart":370.5},{"duration":176.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":370.69999980926514,"connectEnd":370.69999980926514,"connectStart":370.69999980926514,"domainLookupEnd":370.69999980926514,"domainLookupStart":370.69999980926514,"fetchStart":370.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":370.69999980926514,"responseEnd":547.1999998092651,"responseStart":547.1999998092651,"secureConnectionStart":370.69999980926514},{"duration":191.79999923706055,"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":370.9000005722046,"connectEnd":370.9000005722046,"connectStart":370.9000005722046,"domainLookupEnd":370.9000005722046,"domainLookupStart":370.9000005722046,"fetchStart":370.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":370.9000005722046,"responseEnd":562.6999998092651,"responseStart":562.6999998092651,"secureConnectionStart":370.9000005722046},{"duration":194.19999980926514,"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":371.1000003814697,"connectEnd":371.1000003814697,"connectStart":371.1000003814697,"domainLookupEnd":371.1000003814697,"domainLookupStart":371.1000003814697,"fetchStart":371.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":371.1000003814697,"responseEnd":565.3000001907349,"responseStart":565.3000001907349,"secureConnectionStart":371.1000003814697},{"duration":194.80000019073486,"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":371.30000019073486,"connectEnd":371.30000019073486,"connectStart":371.30000019073486,"domainLookupEnd":371.30000019073486,"domainLookupStart":371.30000019073486,"fetchStart":371.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":371.30000019073486,"responseEnd":566.1000003814697,"responseStart":566,"secureConnectionStart":371.30000019073486},{"duration":235,"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":371.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":371.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":606.5,"responseStart":0,"secureConnectionStart":0},{"duration":195.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":371.6000003814697,"connectEnd":371.6000003814697,"connectStart":371.6000003814697,"domainLookupEnd":371.6000003814697,"domainLookupStart":371.6000003814697,"fetchStart":371.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":371.6000003814697,"responseEnd":567.4000005722046,"responseStart":567.4000005722046,"secureConnectionStart":371.6000003814697},{"duration":234.80000019073486,"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":371.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":371.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":606.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":196.4000005722046,"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":372,"connectEnd":372,"connectStart":372,"domainLookupEnd":372,"domainLookupStart":372,"fetchStart":372,"redirectEnd":0,"redirectStart":0,"requestStart":372,"responseEnd":568.4000005722046,"responseStart":568.4000005722046,"secureConnectionStart":372},{"duration":699.1999998092651,"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":373.80000019073486,"connectEnd":373.80000019073486,"connectStart":373.80000019073486,"domainLookupEnd":373.80000019073486,"domainLookupStart":373.80000019073486,"fetchStart":373.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":373.80000019073486,"responseEnd":1073,"responseStart":1073,"secureConnectionStart":373.80000019073486},{"duration":791.6000003814697,"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":373.80000019073486,"connectEnd":373.80000019073486,"connectStart":373.80000019073486,"domainLookupEnd":373.80000019073486,"domainLookupStart":373.80000019073486,"fetchStart":373.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":373.80000019073486,"responseEnd":1165.4000005722046,"responseStart":1165.4000005722046,"secureConnectionStart":373.80000019073486},{"duration":454.8999996185303,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":620.3000001907349,"connectEnd":620.3000001907349,"connectStart":620.3000001907349,"domainLookupEnd":620.3000001907349,"domainLookupStart":620.3000001907349,"fetchStart":620.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":620.3000001907349,"responseEnd":1075.1999998092651,"responseStart":1075.1999998092651,"secureConnectionStart":620.3000001907349},{"duration":307.3999996185303,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1044.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1044.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1352.1999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":147,"responseStart":303,"responseEnd":322,"domLoading":367,"domInteractive":1403,"domContentLoadedEventStart":1403,"domContentLoadedEventEnd":1450,"domComplete":2805,"loadEventStart":2805,"loadEventEnd":2807,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1370.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1371.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1372},{"name":"bigPipe.activity-panel-pipe-id.end","time":1376.3000001907349},{"name":"activityTabFullyLoaded","time":1457.5}],"measures":[],"correlationId":"fe8fb288ce6009","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":93,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}