Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10764 PL/SQL parser - Phase 2
  3. MDEV-12090

Make INSTR understand optional parameters for position and occurence

Details

    • Technical task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Currently the built-in function INSTR understands two parameters:

      INSTR(string, substring)
      

      We'll extend INSTR to understand two extra optional parameters:

      INSTR(string, substring [,position [,occurence])
      

      where:

      • position is an nonzero integer indicating the character of string where to begin the search. If position is negative, then INSTR counts backward from the end of string and then searches backward from the resulting position.
      • occurrence is a positive integer indicating which occurrence of string to search for.

      Attachments

        Activity

          bar Alexander Barkov created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Labels Compatibility
          alvinr Alvin Richards (Inactive) made changes -
          Parent MDEV-10142 [ 56873 ] MDEV-10764 [ 57940 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Support case ID not-26307
          ralf.gebhardt Ralf Gebhardt made changes -
          NRE Projects AC-2610/DEFERRED
          ralf.gebhardt Ralf Gebhardt made changes -
          Assignee Alexander Barkov [ bar ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 79691 ] MariaDB v4 [ 140224 ]
          bar Alexander Barkov made changes -
          Description
          Currently the built-in function {{INSTR}} understands two parameters:
          {code:sql}
          INSTR(string, substring)
          {code}

          We'll extend {{INSTR}} to understand two extra optional parameters:

          {code:sql}
          INSTR(string, substring [,position [,occurence])
          {code}

          where:

          - {{position}} is an nonzero integer indicating the character of {{string}} where to begin the search. If position is negative, then {{INSTR}} counts backward from the end of {{string}} and then searches backward from the resulting position.

          - {{occurrence}} is a positive integer indicating which occurrence of {{string}} to search for.
          Currently the built-in function {{INSTR}} understands two parameters:
          {code:sql}
          INSTR(string, substring)
          {code}

          We'll extend {{INSTR}} to understand two extra optional parameters:

          {code:sql}
          INSTR(string, substring [,position [,occurence])
          {code}

          where:

          - {{position}} is an nonzero integer indicating the character of {{string}} where to begin the search. If position is negative, then {{INSTR}} counts backward from the end of {{string}} and then searches backward from the resulting position.

          - {{occurrence}} is a positive integer indicating which occurrence of {{string}} to search for.
          serg Sergei Golubchik made changes -

          People

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

            Dates

              Created:
              Updated:

              Git Integration

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