Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13529

Add class Sql_cmd_call

    XMLWordPrintable

Details

    Description

      This is a self-containing sub-task of MDEV-10591.
      It's done separately, to reduce the patch size for MDEV-10591, to easier reviewing purposes.

      Currently SQLCOM_CALL is handled in a huge piece of code in a switch in mysql_execute_command():

      case SQLCOM_CALL:
        {
          // around 50 code lines
        }
      

      We'll introduce a new class Sql_cmd_call and move this code to Sql_cmd_call::execute.

      After this change, CALL statements will be handled in the same way with other statements using Sql_cmd based implementations:

      • ALTER TABLE
      • ALTER SEQUENCE
      • CHECK
      • OPTIMIZE
      • REPAIR
      • SIGNAL
      • RESIGNAL
      • GET DIAGNOSTICS
      • TRUNCATE

      Reasoning:

      • MDEV-10591 will need more data (other than LEX::sphead) to execute the query: a pointer to Sp_handler will be needed, to distinguish between calls for standalone vs package procedures. Adding a new member to LEX is not a good idea.
      • All statements should eventually be refactored to use the Sql_cmd infrastructure anyway.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.