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

Please add a string function to count how often some character is in a string

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • OTHER
    • None

    Description

      In Wikipedia we often have article names with parenthesis like https://en.wikipedia.org/wiki/Walker_(surname) and it would be nice to have some function which enables me to find those, where the number of opening parenthesis matches the numer of closing ones.

      Current solution is a query like
      ( pl_title LIKE "%)%)%" AND pl_title NOT LIKE "%(%(%" )
      OR
      ( pl_title LIKE "%)%" AND pl_title NOT LIKE "%(%" )
      ...

      It would be a lot easier to write a query like
      CHAR_COUNT(pl_title, '(') = CHAR_COUNT(pl_title, ')')

      Attachments

        Activity

          People

            Unassigned Unassigned
            Wurgl Wolfgang Formann
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.