summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-03-24 23:12:16 +0100
committerSergei Golubchik <serg@mariadb.org>2021-03-24 23:12:43 +0100
commit5a79807119974c37b4e9d3d46f8d68d29cfdba9e (patch)
treedaa35195e57b476fe54ce3db8a43459052fb3218 /plugin
parentcdb86faf82772e0c3f4d2532f91afbc6aa451a93 (diff)
downloadmariadb-git-5a79807119974c37b4e9d3d46f8d68d29cfdba9e.tar.gz
MDEV-25242 Server crashes in check_grant upon invoking function with userstat enabled
use check_grant(..., number_of_tables=1, ...) if you only need to check privileges for one table
Diffstat (limited to 'plugin')
-rw-r--r--plugin/userstat/table_stats.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugin/userstat/table_stats.cc b/plugin/userstat/table_stats.cc
index 7b522a388d7..241855bdc86 100644
--- a/plugin/userstat/table_stats.cc
+++ b/plugin/userstat/table_stats.cc
@@ -31,8 +31,7 @@ static int table_stats_fill(THD *thd, TABLE_LIST *tables, COND *cond)
tmp_table.grant.privilege= 0;
if (check_access(thd, SELECT_ACL, tmp_table.db,
&tmp_table.grant.privilege, NULL, 0, 1) ||
- check_grant(thd, SELECT_ACL, &tmp_table, 1, UINT_MAX,
- 1))
+ check_grant(thd, SELECT_ACL, &tmp_table, 1, 1, 1))
continue;
table->field[0]->store(table_stats->table, schema_length,