Skip to content

Show tables command will take 2 quota count. #20018

@JackyWoo

Description

@JackyWoo

(you don't have to strictly follow this form)

Describe the bug
Command suchs show tables/databases/processlist etc will take 2 quota count.

Does it reproduce on recent release?
version 20.13.3.3

How to reproduce

1. create quota

CREATE QUOTA q1 KEYED BY user_name FOR INTERVAL 1 minute MAX queries = 5 TO default

2. show current quota usage

select quota_name, end_time, queries, max_queries from system.quotas_usage;

┌─quota_name─┬────────────end_time─┬─queries─┬─max_queries─┐
│ q1         │ 2021-01-19 14:40:00 │       0 │           5 │

3. send show command
show tables;

4. show quota usage
┌─quota_name─┬────────────end_time─┬─queries─┬─max_queries─┐
│ q1         │ 2021-01-19 14:40:00 │       2 │           5 │

Expected behavior

  • show tables/databases/processlist take 1 quota count
  • show privileges take 0 quota count

Analysis

Sqls such as show tables/databases/processlist/privileges will be interpreted to select sql, so will take another quota count.

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releaseminorPriority: minor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions