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

Add method LEX::sp_proc_stmt_statement_finalize()

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.4.1
    • Component/s: Parser
    • Labels:
      None

      Description

      The sp_proc_stmt_statement grammar rule has a huge code block:

      sp_proc_stmt_statement:
                {
                  LEX *lex= thd->lex;
                  Lex_input_stream *lip= YYLIP;
       
                  lex->sphead->reset_lex(thd);
                  lex->sphead->m_tmp_query= lip->get_tok_start();
                }
                statement
                {
                  // The huge code block is here
                }
              ;
      

      After unifying sql_yacc.yy and sql_yacc_ora.yy, there will be two similar rules:

      • sp_proc_stmt_statemen, for the default sql_mode
      • plsql_sp_proc_stmt_statemen, for sql_mode=ORACLE

      To avoid so much duplicate code, we'll move this code into a new method in LEX:

      bool sp_proc_stmt_statement_finalize(THD *thd, bool no_lookahead);
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: