diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-10-04 13:55:38 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-10-04 13:55:38 +0200 |
commit | 9206c1ea9746ab022f531e40eec7d930be137f21 (patch) | |
tree | 7fdd6dbee3e1d5df1801edf099d4b417ba5d6db5 /sql/sql_acl.cc | |
parent | 8759967d1c53603ee63b7e28bdf6c76b80635073 (diff) | |
parent | bb76dcbec77d31818ec7dfc0d0dc1f4b49185bc5 (diff) | |
download | mariadb-git-9206c1ea9746ab022f531e40eec7d930be137f21.tar.gz |
Merge branch '10.10' into 10.11
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 4e9e642d9d9..e49089ce678 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -7140,7 +7140,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, table_list->grant.want_privilege); my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), command, thd->security_ctx->priv_user, - thd->security_ctx->host_or_ip, table_list->alias.str); + thd->security_ctx->host_or_ip, table_list->db.str, + table_list->alias.str); DBUG_RETURN(-1); } } @@ -8192,8 +8193,8 @@ bool grant_reload(THD *thd) @see check_table_access @note - This functions assumes that either number of tables to be inspected - by it is limited explicitly (i.e. is is not UINT_MAX) or table list + This function assumes that either number of tables to be inspected + by it is limited explicitly (i.e. is not UINT_MAX) or table list used and thd->lex->query_tables_own_last value correspond to each other (the latter should be either 0 or point to next_global member of one of elements of this table list). @@ -8398,7 +8399,7 @@ err: my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), command, sctx->priv_user, - sctx->host_or_ip, + sctx->host_or_ip, tl ? tl->db.str : "unknown", tl ? tl->get_table_name() : "unknown"); } DBUG_RETURN(TRUE); @@ -8582,7 +8583,7 @@ bool check_grant_all_columns(THD *thd, privilege_t want_access_arg, Security_context *sctx= thd->security_ctx; privilege_t want_access(NO_ACL); const char *table_name= NULL; - const char* db_name; + const char* db_name= NULL; GRANT_INFO *grant; GRANT_TABLE *UNINIT_VAR(grant_table); GRANT_TABLE *UNINIT_VAR(grant_table_role); @@ -8671,7 +8672,7 @@ err: if (using_column_privileges) my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), command, sctx->priv_user, - sctx->host_or_ip, table_name); + sctx->host_or_ip, db_name, table_name); else my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), command, |