-
Task
-
-
Major
-
Resolution:
Fixed
-
-
-
The drop_routine has two copies in sql_yacc.yy:
- for sql_mode=DEFAULT
- for sql_mode=ORACLE
drop_routine:
|
DROP FUNCTION_SYM opt_if_exists ident '.' ident
|
{
|
if (Lex->stmt_drop_function($3, $4, $6))
|
MYSQL_YYABORT;
|
}
|
| DROP FUNCTION_SYM opt_if_exists ident
|
{
|
if (Lex->stmt_drop_function($3, $4))
|
MYSQL_YYABORT;
|
}
|
| DROP PROCEDURE_SYM opt_if_exists sp_name
|
{
|
if (Lex->stmt_drop_procedure($3, $4))
|
MYSQL_YYABORT;
|
}
|
;
|
drop_routine:
|
DROP FUNCTION_SYM opt_if_exists ident '.' ident
|
{
|
if (Lex->stmt_drop_function($3, $4, $6))
|
MYSQL_YYABORT;
|
}
|
| DROP FUNCTION_SYM opt_if_exists ident
|
{
|
if (Lex->stmt_drop_function($3, $4))
|
MYSQL_YYABORT;
|
}
|
| DROP PROCEDURE_SYM opt_if_exists sp_name
|
{
|
if (Lex->stmt_drop_procedure($3, $4))
|
MYSQL_YYABORT;
|
}
|
| DROP PACKAGE_ORACLE_SYM opt_if_exists sp_name
|
{
|
LEX *lex= Lex;
|
lex->set_command(SQLCOM_DROP_PACKAGE, $3);
|
if (unlikely(lex->sphead))
|
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE"));
|
lex->spname= $4;
|
}
|
| DROP PACKAGE_ORACLE_SYM BODY_ORACLE_SYM opt_if_exists sp_name
|
{
|
LEX *lex= Lex;
|
lex->set_command(SQLCOM_DROP_PACKAGE_BODY, $4);
|
if (unlikely(lex->sphead))
|
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE BODY"));
|
lex->spname= $5;
|
}
|
;
|
It's not necessary two have two copies. The grammar can be unified to a simple rule used for both sql_mode=DEFAULT and sql_mode=ORACLE:
drop_routine:
|
DROP sp_handler opt_if_exists ident '.' ident
|
{
|
if (Lex->stmt_drop_routine($2, $3, $4, $6))
|
MYSQL_YYABORT;
|
}
|
| DROP sp_handler opt_if_exists ident
|
{
|
if (Lex->stmt_drop_routine($2, $3, Lex_ident_sys(), $4))
|
MYSQL_YYABORT;
|
}
|
;
|
where LEX::stmt_drop_routine() is a new method in LEX replacing these three methods:
bool stmt_drop_function(const DDL_options_st &options,
|
const Lex_ident_sys_st &db,
|
const Lex_ident_sys_st &name);
|
|
bool stmt_drop_function(const DDL_options_st &options,
|
const Lex_ident_sys_st &name);
|
|
bool stmt_drop_procedure(const DDL_options_st &options,
|
sp_name *name);
|
Unification can done with help of a new method in Sp_handler:
virtual enum_sql_command sqlcom_drop() const= 0;
|
which will have the following overrides for Sp_handler descendants:
enum_sql_command sqlcom_drop() const { return SQLCOM_DROP_PROCEDURE; }
|
enum_sql_command sqlcom_drop() const { return SQLCOM_DROP_FUNCTION; }
|
enum_sql_command sqlcom_drop() const { return SQLCOM_DROP_PACKAGE; }
|
enum_sql_command sqlcom_drop() const { return SQLCOM_DROP_PACKAGE_BODY; }
|
- blocks
-
MDEV-32101
CREATE PACKAGE [BODY] for sql_mode=DEFAULT
-
-
Closed
Alexander Barkov
made changes -
Summary
|
sql_yaccyy: unify the drop_routine rule
|
sql_yacc.yy: unify the drop_routine rule
|
Alexander Barkov
made changes -
Assignee
|
|
Alexander Barkov
[ bar
]
|
Alexander Barkov
made changes -
Status
|
Open
[ 1
]
|
In Progress
[ 3
]
|
Alexander Barkov
made changes -
issue.field.resolutiondate
|
2023-09-21 07:08:28.0
|
2023-09-21 07:08:27.984
|
Alexander Barkov
made changes -
Fix Version/s
|
|
11.3.0
[ 29302
]
|
Fix Version/s
|
11.3
[ 28565
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
Status
|
In Progress
[ 3
]
|
Closed
[ 6
]
|
{"report":{"fcp":1021.1000000238419,"ttfb":456.5,"pageVisibility":"visible","entityId":125169,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d29bcc04-7160-4155-8900-c5ac1e28e5af","navigationType":0,"readyForUser":1110,"redirectCount":0,"resourceLoadedEnd":1092.1000000238419,"resourceLoadedStart":461.40000009536743,"resourceTiming":[{"duration":9.399999976158142,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":461.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":461.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":470.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":9.399999976158142,"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":461.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":461.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":471.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":60,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":461.8000000715256,"connectEnd":461.8000000715256,"connectStart":461.8000000715256,"domainLookupEnd":461.8000000715256,"domainLookupStart":461.8000000715256,"fetchStart":461.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":461.8000000715256,"responseEnd":521.8000000715256,"responseStart":521.8000000715256,"secureConnectionStart":461.8000000715256},{"duration":143.10000002384186,"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":462,"connectEnd":462,"connectStart":462,"domainLookupEnd":462,"domainLookupStart":462,"fetchStart":462,"redirectEnd":0,"redirectStart":0,"requestStart":462,"responseEnd":605.1000000238419,"responseStart":605.1000000238419,"secureConnectionStart":462},{"duration":146.79999995231628,"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":462.2000000476837,"connectEnd":462.2000000476837,"connectStart":462.2000000476837,"domainLookupEnd":462.2000000476837,"domainLookupStart":462.2000000476837,"fetchStart":462.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":462.2000000476837,"responseEnd":609,"responseStart":609,"secureConnectionStart":462.2000000476837},{"duration":147.09999990463257,"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":462.40000009536743,"connectEnd":462.40000009536743,"connectStart":462.40000009536743,"domainLookupEnd":462.40000009536743,"domainLookupStart":462.40000009536743,"fetchStart":462.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":462.40000009536743,"responseEnd":609.5,"responseStart":609.5,"secureConnectionStart":462.40000009536743},{"duration":147.20000004768372,"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":462.60000002384186,"connectEnd":462.60000002384186,"connectStart":462.60000002384186,"domainLookupEnd":462.60000002384186,"domainLookupStart":462.60000002384186,"fetchStart":462.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":462.60000002384186,"responseEnd":609.8000000715256,"responseStart":609.8000000715256,"secureConnectionStart":462.60000002384186},{"duration":198.60000002384186,"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":462.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":462.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":661.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":147.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":462.90000009536743,"connectEnd":462.90000009536743,"connectStart":462.90000009536743,"domainLookupEnd":462.90000009536743,"domainLookupStart":462.90000009536743,"fetchStart":462.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":462.90000009536743,"responseEnd":610.3000000715256,"responseStart":610.3000000715256,"secureConnectionStart":462.90000009536743},{"duration":198.40000009536743,"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":463,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":463,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":661.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":147.70000004768372,"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":463.2000000476837,"connectEnd":463.2000000476837,"connectStart":463.2000000476837,"domainLookupEnd":463.2000000476837,"domainLookupStart":463.2000000476837,"fetchStart":463.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":463.2000000476837,"responseEnd":610.9000000953674,"responseStart":610.9000000953674,"secureConnectionStart":463.2000000476837},{"duration":420,"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":476.10000002384186,"connectEnd":476.10000002384186,"connectStart":476.10000002384186,"domainLookupEnd":476.10000002384186,"domainLookupStart":476.10000002384186,"fetchStart":476.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":476.10000002384186,"responseEnd":896.1000000238419,"responseStart":896.1000000238419,"secureConnectionStart":476.10000002384186},{"duration":458.2000000476837,"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":480.5,"connectEnd":480.5,"connectStart":480.5,"domainLookupEnd":480.5,"domainLookupStart":480.5,"fetchStart":480.5,"redirectEnd":0,"redirectStart":0,"requestStart":480.5,"responseEnd":938.7000000476837,"responseStart":938.7000000476837,"secureConnectionStart":480.5},{"duration":223.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":672.7000000476837,"connectEnd":672.7000000476837,"connectStart":672.7000000476837,"domainLookupEnd":672.7000000476837,"domainLookupStart":672.7000000476837,"fetchStart":672.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":672.7000000476837,"responseEnd":896.5,"responseStart":896.5,"secureConnectionStart":672.7000000476837},{"duration":165.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":926.6000000238419,"connectEnd":926.6000000238419,"connectStart":926.6000000238419,"domainLookupEnd":926.6000000238419,"domainLookupStart":926.6000000238419,"fetchStart":926.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":926.6000000238419,"responseEnd":1092.1000000238419,"responseStart":1092.1000000238419,"secureConnectionStart":926.6000000238419},{"duration":138.70000004768372,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1015.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1015.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1153.8000000715256,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":2,"responseStart":456,"responseEnd":480,"domLoading":459,"domInteractive":1180,"domContentLoadedEventStart":1181,"domContentLoadedEventEnd":1237,"domComplete":1446,"loadEventStart":1446,"loadEventEnd":1446,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1155.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1156.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1156.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1158.6000000238419},{"name":"activityTabFullyLoaded","time":1252.3000000715256}],"measures":[],"correlationId":"50fc60d75355e1","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":380,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}