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

operator to search set columns

    XMLWordPrintable

Details

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

    Description

      at the moment there is no good way to search in set columns. The only way is to use
      FIND_IN_SET(xx, set-Col)
      which is "ok" if you just have one set val to search. But it does not use the index.

      If you want to search for more than one col, you must write
      FIND_IN_SET(xx, set-Col) OR FIND_IN_SET(yy, set-Col)

      The only "good" solution is, to query the set-structure
      SET('xx','yy')
      determine the bits and have a "unreadable query"
      set-col = 27

      It would be good to have an operator which uses the definition of the table, like it is done when the query is returned, so one could write sth like this
      set-col=SET_COL('xx','yy')

      where "SET_COL('xx','yy')" would return sth like 27 by looking up the value via the table defintion. Now indices could be used, and the query remains readable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mokraemer Marc
            Votes:
            0 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.