[MDEV-29168] operator to search set columns Created: 2022-07-26 Updated: 2022-08-01 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Marc | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
at the moment there is no good way to search in set columns. The only way is to use If you want to search for more than one col, you must write The only "good" solution is, to query the set-structure 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 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. |
| Comments |
| Comment by Sergei Golubchik [ 2022-08-01 ] |
|
I presume, you mean FIND_IN_SET(xx, set-Col) AND FIND_IN_SET(yy, set-Col), not OR, as that's what your equivalent set-col = 27 condition does. |
| Comment by Marc [ 2022-08-01 ] |
|
In this case yes. |