PL/SQL parser (MDEV-10142)

[MDEV-13450] Cleanup SP code for packages Created: 2017-08-04  Updated: 2018-08-31  Resolved: 2017-08-15

Status: Closed
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: 10.3
Fix Version/s: 10.3.1

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility, refactoring

Issue Links:
Blocks
blocks MDEV-10591 Oracle-style packages Closed
Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

In order to make the patch for Oracle-style packages smaller, we'll do the following changes as a separate commit:

  • Add Sp_handler::db_find_and_cache_routine(), to avoid duplicate combinations of db_find_routine() followed by sp_cache_insert()
  • Add append_suid() and append_comment(), helper functions to share between show for CREATE PROCEDURE and show for CREATE PACKAGE
  • Move the code responsible to clone recursive SP routines from Sp_handler::sp_find_routine() into a new method Sp_handler::sp_clone_and_link_routine()
  • Add "const" qualifier to LEX_CSTRING parameters to LEX::make_sp_name()
  • Add LEX::set_user_variable(), to reduce code duplication in the grammar creating Item_func_set_user_var's
  • Add LEX::call_statement_start(), to reduce code duplication in the grammar for "call:"
  • Add LEX::add_grant_command(), to reduce code duplication in the grammar for "revoke_command:" and "grant_command:"

Generated at Thu Feb 08 08:05:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.