-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QueryCache: Fix odd bugs with user quota
- SYSTEM DROP QUERY CACHE did not clear the user policy statistics, this made the cache block all inserts afterwards - Fixes two other oddities in the approval logic
- Loading branch information
Showing
4 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 17 additions & 9 deletions
26
tests/queries/0_stateless/02494_query_cache_user_quotas.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
Run SELECT with quota that current user may use only 1 byte in the query cache 1 | ||
Expect no entries in the query cache 0 | ||
Run SELECT again but w/o quota 1 | ||
Expect one entry in the query cache 1 | ||
a | ||
0 | ||
b | ||
1 | ||
--- | ||
Run SELECT which writes its result in the query cache 1 | ||
Run another SELECT with quota that current user may write only 1 entry in the query cache 1 | ||
Expect one entry in the query cache 1 | ||
Run another SELECT w/o quota 1 | ||
Expect two entries in the query cache 2 | ||
a | ||
b | ||
1 | ||
c | ||
d | ||
3 | ||
- | ||
a | ||
b | ||
1 | ||
c | ||
d | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters