[MDEV-17694] Add method LEX::sp_proc_stmt_statement_finalize() Created: 2018-11-13  Updated: 2018-11-14  Resolved: 2018-11-14

Status: Closed
Project: MariaDB Server
Component/s: Parser
Fix Version/s: 10.4.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-12518 Unify sql_yacc.yy and sql_yacc_ora.yy Closed

 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);


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