diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-06-13 12:49:22 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-06-13 18:49:42 +0200 |
commit | b58586aae938e6aa7714c9bb3813da908e49010a (patch) | |
tree | 1501cf15f1bfac619528283c71144e53046f0213 /sql | |
parent | 805340936aa47493886bafd119863d83c475f45c (diff) | |
download | mariadb-git-b58586aae938e6aa7714c9bb3813da908e49010a.tar.gz |
MDEV-21560 Assertion `grant_table || grant_table_role' failed in check_grant_all_columns
With RETURNING it can happen that the user has some privileges on
the table (namely, DELETE), but later needs different privileges
on individual columns (namely, SELECT).
Do the same as in check_grant_column() - ER_COLUMNACCESS_DENIED_ERROR,
not an assert.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_acl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 9ea69e5628b..8e17958a8a1 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -8335,7 +8335,8 @@ bool check_grant_all_columns(THD *thd, ulong want_access_arg, grant_table= grant->grant_table_user; grant_table_role= grant->grant_table_role; - DBUG_ASSERT (grant_table || grant_table_role); + if (!grant_table && !grant_table_role) + goto err; } } |