Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Do
-
None
-
None
Description
reported by a customer
I read through the documentation for user priority at https://mariadb.com/kb/en/library/columnstore-database-user-management/#user-priority-management .. Query stats and user priority are enabled for testing this.
I am wondering if the user priority actually works with the wildcard host (%), when the users are defined using the wildcard? There are numerous users defined and with priority set, but my example is with user xxxxxxx@% defined:
MariaDB [infinidb_querystats]> select user,host from mysql.user where user='xxxxxx';
-------------+
| user | host |
-------------+
| xxxxxx | % |
-------------+
Set user priority:
MariaDB [infinidb_querystats]> call calsetuserpriority('%','xxxxxx','high');
Query OK, 0 rows affected (0.001 sec)
MariaDB [infinidb_querystats]> select * from user_priority where user='xxxxxx';
---------------------
| host | user | priority |
---------------------
| % | xxxxxx | HIGH |
---------------------
1 row in set (0.012 sec)
Run a query as the user xxxxxx:
MariaDB [dairy]> select count
from dairy_geno;
------------
| count |
------------
| xxxxxxxxxx |
------------
Check query stats table for the priority used on last query:
MariaDB [infinidb_querystats]> select user,host,priority,startTime from querystats where user='xxxxx' order by startTime DESC limit 1;
------------------------------------------------------------------+
| user | host | priority | startTime |
------------------------------------------------------------------+
| xxxxx | mendel-master1.global.internal | LOW | 2019-02-05 15:16:55 |
------------------------------------------------------------------+
1 row in set (58.854 sec)
As you can see, priority is still showing as low.. even though user_priority table shows as high. I am wondering if it is because of the host defined? Similarly.. user priority is reflected correctly when running as the root@localhost user set as 'HIGH' priority.
Last Query run from root user:
MariaDB [infinidb_querystats]> select user,host,priority,startTime from querystats where user='root' order by startTime DESC limit 1;
------------------------------------------+
| user | host | priority | startTime |
------------------------------------------+
| root | localhost | HIGH | 2019-02-05 13:43:38 |
------------------------------------------+
I guess I am not seeing any changes within CalShowProcessList();
UserPriority is activated, and I set a user to say 'medium' :
MariaDB [infinidb_querystats]> call calsetuserpriority('%','bwitzke','medium');
Query OK, 1 row affected (0.010 sec)
Then, while running a simple query I do not see a reflection of this while in calshowprocesslist();
it works when I specify the host such as root@localhost.. root then shows as having high priority.. just not the wildcard (%)