1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Sergei Golubchik
2020-06-13 12:49:22 +02:00
parent 805340936a
commit b58586aae9
3 changed files with 36 additions and 1 deletions

View File

@ -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;
}
}