[MXS-4085] Compound Cache Rules should be AND and not OR condition Created: 2022-04-08 Updated: 2022-07-04 Resolved: 2022-07-04 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | cache |
| Affects Version/s: | 2.4.19 |
| Fix Version/s: | 2.4.20 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kathryn Sizemore | Assignee: | Johan Wikman |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
centos 7 |
||
| Description |
|
According to documentation here: https://mariadb.com/kb/en/mariadb-maxscale-24-cache/#security_1 In the Security section, it shows an example and says:
However, in implementation, Each json stanza is applied as an OR condition. For Example:
Matches ANY condition and not ALL as expected. |
| Comments |
| Comment by Johan Wikman [ 2022-04-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Actually, I think it works as documented. The documentation says
So, in the store array above, the first stanza will match whenever the database is marketing, irrespective of what the table is. That is , a SELECT targeting marketing.flyer_data will match, but so will marketing.some_other_table.
Then, if there is a use array, a matching stanza from the store array is applied only if the current user matches any of the users specified in the use array. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by aws maythem [ 2022-05-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
i have the same problem the json is set to not cache specific table and database but it's still caching both rule For Example:
maxscale.cnf:
| |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Johan Wikman [ 2022-06-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
amaytham Could you provide a few concrete examples that illustrates when the cache caches data when you think it according to the rules should not? | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by aws maythem [ 2022-06-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Hello Johan | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by markus makela [ 2022-06-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
johan.wikman should this be changed into a feature request since it's working as expected and documented? | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Johan Wikman [ 2022-07-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Closing as Not a Bug. ksizemore, amaytham, please create a feature request if you think AND conditions should explicitly be supported. |