summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <dellis@goetia.(none)>2004-10-01 14:48:48 -0500
committerunknown <dellis@goetia.(none)>2004-10-01 14:48:48 -0500
commitf0440c27e1d1dd238686a311dc9771e920acb3a3 (patch)
tree7f9afa45cdad1322d16342e297648919111e3ea0 /sql/sql_acl.cc
parente5f2eba58647abffaa816390d96d528b2ed3f4f1 (diff)
downloadmariadb-git-f0440c27e1d1dd238686a311dc9771e920acb3a3.tar.gz
grant.test, grant.result, sql_acl.cc:
BUG #5831 Changed mysql_revoke_all() to successfully delete all privileges for a user in one pass. sql/sql_acl.cc: BUG #5831 Changed mysql_revoke_all() to successfully delete all privileges for a user in one pass. mysql-test/r/grant.result: BUG #5831 Changed mysql_revoke_all() to successfully delete all privileges for a user in one pass. mysql-test/t/grant.test: BUG #5831 Changed mysql_revoke_all() to successfully delete all privileges for a user in one pass.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc35
1 files changed, 16 insertions, 19 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 855e56af12b..a5284a543e6 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -3636,14 +3636,11 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
!my_strcasecmp(system_charset_info, lex_user->host.str, host))
{
if (replace_db_table(tables[1].table, acl_db->db, *lex_user, ~0, 1))
- {
result= -1;
- ++counter;
+ else
continue;
- }
}
- else
- ++counter;
+ ++counter;
}
/* Remove column access */
@@ -3666,26 +3663,26 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
~0, 0, 1))
{
result= -1;
- ++counter;
- continue;
}
- if (grant_table->cols)
+ else
{
- List<LEX_COLUMN> columns;
- if (replace_column_table(grant_table,tables[3].table, *lex_user,
- columns,
- grant_table->db,
- grant_table->tname,
- ~0, 1))
+ if (grant_table->cols)
{
- result= -1;
- ++counter;
- continue;
+ List<LEX_COLUMN> columns;
+ if (replace_column_table(grant_table,tables[3].table, *lex_user,
+ columns,
+ grant_table->db,
+ grant_table->tname,
+ ~0, 1))
+ result= -1;
+ else
+ continue;
}
+ else
+ continue;
}
}
- else
- ++counter;
+ ++counter;
}
}