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

Minor refactoring of the method get_expr_query at the classes sp_instr_cpush/sp_instr_cursor_copy_struct

Details

    Description

      Based on comments from the task MDEV-36079, lets do simple refactoring to exclude duplication of source code and fix the issue with handling the characters TAB, LF following immediately after the FOR/IS clause (currently, only the spaceship is treated as a separator after the FOR/IS clauses.

      Attachments

        Issue Links

          Activity

            shulga Dmitry Shulga added a comment -

            The branch for review is bb-11.8-MDEV-36390

            shulga Dmitry Shulga added a comment - The branch for review is bb-11.8- MDEV-36390

            The last variant is OK to push

            sanja Oleksandr Byelkin added a comment - The last variant is OK to push
            bar Alexander Barkov added a comment -

            Backported to 11.4.

            commit c76d17a917fee7b10cfe801670eb1a5ef785f8ce (HEAD -> 11.4, origin/bb-11.4-bar-MDEV-36390, origin/HEAD, origin/11.4)
            Author:     Dmitry Shulga <dmitry.shulga@mariadb.com>
            AuthorDate: Thu Mar 27 18:02:37 2025 +0700
            Commit:     Alexander Barkov <bar@mariadb.com>
            CommitDate: Sat Apr 19 20:57:54 2025 +0400
             
                MDEV-36390: Minor refactoring of the method get_expr_query at the classes sp_instr_cpush/sp_instr_cursor_copy_struct
                
                Duplicated code from methods
                  sp_instr_cpush::get_expr_query
                  sp_instr_cursor_copy_struct::get_expr_query
                were extracted to the standalone function get_cursor_query
                
                Additionally, added correct parsing of a cursor definition with
                a new line or TAB instead of the space immediately after FOR/IS.
            

            bar Alexander Barkov added a comment - Backported to 11.4. commit c76d17a917fee7b10cfe801670eb1a5ef785f8ce (HEAD -> 11.4, origin/bb-11.4-bar-MDEV-36390, origin/HEAD, origin/11.4) Author: Dmitry Shulga <dmitry.shulga@mariadb.com> AuthorDate: Thu Mar 27 18:02:37 2025 +0700 Commit: Alexander Barkov <bar@mariadb.com> CommitDate: Sat Apr 19 20:57:54 2025 +0400   MDEV-36390: Minor refactoring of the method get_expr_query at the classes sp_instr_cpush/sp_instr_cursor_copy_struct Duplicated code from methods sp_instr_cpush::get_expr_query sp_instr_cursor_copy_struct::get_expr_query were extracted to the standalone function get_cursor_query Additionally, added correct parsing of a cursor definition with a new line or TAB instead of the space immediately after FOR/IS.

            People

              shulga Dmitry Shulga
              shulga Dmitry Shulga
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.