summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2022-03-19 17:02:52 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2022-06-12 17:24:11 +0300
commit1987d6e632ba5f6c45aacdd76d44c39017022ca5 (patch)
treef59fb29b5826a45c82ffcbca7854661fe7405e36
parent405752c1f475c5e6e3a50df29b955ce250851fa6 (diff)
downloadmariadb-git-1987d6e632ba5f6c45aacdd76d44c39017022ca5.tar.gz
Fix return values
-rw-r--r--sql/sql_acl.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index c345dc20007..b45b18315ce 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -13474,13 +13474,12 @@ bool Sql_cmd_grant_proxy::check_access_proxy(THD *thd,
bool Sql_cmd_grant_proxy::execute(THD *thd)
{
- LEX *lex= thd->lex;
bool result;
const bool no_auto_create_users= MY_TEST(thd->variables.sql_mode &
MODE_NO_AUTO_CREATE_USER);
Grant_tables tables;
- DBUG_ASSERT(lex->first_select_lex()->table_list.first == NULL);
+ DBUG_ASSERT(thd->lex->first_select_lex()->table_list.first == NULL);
DBUG_ASSERT((m_grant_option & ~GRANT_ACL) == NO_ACL); // only WITH GRANT OPTION
if (grant_stage0(thd))
@@ -13520,7 +13519,7 @@ bool Sql_cmd_grant_proxy::execute(THD *thd)
if (!is_revoke())
user_list_reset_mqh();
- return false;
+ return result;
#ifdef WITH_WSREP
wsrep_error_label:
@@ -13670,7 +13669,7 @@ static bool maria_deny(THD *thd, const User_table &user_table,
bool create_new_users, bool no_auto_create_users)
{
List_iterator<LEX_USER> it(list);
- bool result;
+ bool result= false;
DBUG_ENTER("maria_deny");
/* Only allow DB level denies. */
@@ -13779,7 +13778,7 @@ bool Sql_cmd_grant_table::execute_deny(THD *thd)
if (!result)
my_ok(thd);
- return false;
+ return result;
#ifdef WITH_WSREP
wsrep_error_label:
@@ -13818,7 +13817,7 @@ bool Sql_cmd_grant_table::execute_grant_global(THD *thd)
if (!result)
my_ok(thd);
- return false;
+ return result;
#ifdef WITH_WSREP
wsrep_error_label: