diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-10-01 23:07:26 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-10-01 23:07:26 +0200 |
commit | d4f6d2f08f228778fd7744554d8b12be05b6a114 (patch) | |
tree | 2ccc39d16d3a5be27c54e03a81d2d3f75cfb9266 /sql/sql_acl.cc | |
parent | 3744b8ae3171fd423f89c64a83d3afc7e3722856 (diff) | |
parent | dd8833bff0af1b75e007e3db1d18debfb7c4a096 (diff) | |
download | mariadb-git-d4f6d2f08f228778fd7744554d8b12be05b6a114.tar.gz |
Merge branch '10.3' into 10.4
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 3eb89b58289..dc69cb63618 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -6982,7 +6982,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); } } @@ -8031,8 +8032,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). @@ -8241,7 +8242,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); @@ -8424,7 +8425,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access_arg, Security_context *sctx= thd->security_ctx; ulong UNINIT_VAR(want_access); 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); @@ -8513,7 +8514,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, |