diff options
author | unknown <monty@mysql.com> | 2005-02-25 16:53:22 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-25 16:53:22 +0200 |
commit | 248e44945161ec6a84072c8684447aeb702e5bd7 (patch) | |
tree | 9b48fa5a8476d449ea4512314b86f9704517cd0c /sql/sql_acl.cc | |
parent | eb18f93a7847ca6cdb8430d4500a797fe68826db (diff) | |
download | mariadb-git-248e44945161ec6a84072c8684447aeb702e5bd7.tar.gz |
Remove compiler warnings and remove not used variables
(Found during build process)
extra/comp_err.c:
Remove compiler warnings
extra/perror.c:
Remove compiler warnings
innobase/dict/dict0dict.c:
Remove compiler warnings
innobase/dict/dict0load.c:
Remove compiler warnings
innobase/pars/pars0sym.c:
Remove compiler warnings
innobase/row/row0row.c:
Remove compiler warnings
innobase/row/row0sel.c:
Remove compiler warnings
libmysqld/lib_sql.cc:
Remove not used variables
myisam/mi_key.c:
Remove compiler warnings
regex/engine.c:
Added comment
sql/derror.cc:
Remove not used variables
sql/examples/ha_archive.cc:
Fixed bug in blob handling
Removed not used variable
sql/field.cc:
Remove compiler warnings
Remove not used variables
sql/filesort.cc:
Remove compiler warnings
sql/ha_heap.cc:
Remove not used variable
sql/ha_innodb.cc:
Remove not used variables
Remove compiler warnings
sql/handler.cc:
Remove compiler warnings and remove not used variables
sql/item.cc:
Remove compiler warnings and remove not used variables
sql/item_subselect.cc:
Remove compiler warnings
sql/item_sum.cc:
Remove compiler warnings
sql/item_sum.h:
Remove compiler warnings and remove not used variables
sql/log.cc:
Remove compiler warnings and remove not used variables
sql/log_event.cc:
Remove compiler warnings
sql/mysqld.cc:
Remove compiler warnings and remove not used variables
sql/opt_range.cc:
Remove compiler warnings and remove not used variables
sql/slave.cc:
Remove compiler warnings and remove not used variables
sql/sp_pcontext.cc:
Remove compiler warnings and remove not used variables
sql/sql_acl.cc:
Remove compiler warnings and remove not used variables
sql/sql_analyse.cc:
Remove compiler warnings and remove not used variables
sql/sql_base.cc:
Remove compiler warnings and remove not used variables
sql/sql_db.cc:
Remove compiler warnings and remove not used variables
sql/sql_help.cc:
Remove compiler warnings and remove not used variables
sql/sql_insert.cc:
Remove compiler warnings and remove not used variables
sql/sql_load.cc:
Remove compiler warnings and remove not used variables
sql/sql_parse.cc:
Remove compiler warnings and remove not used variables
sql/sql_prepare.cc:
Remove compiler warnings and remove not used variables
sql/sql_select.cc:
Remove compiler warnings and remove not used variables
sql/sql_show.cc:
Remove compiler warnings and remove not used variables
sql/sql_table.cc:
Remove compiler warnings
sql/sql_union.cc:
Remove compiler warnings
sql/sql_update.cc:
Remove compiler warnings and remove not used variables
sql/sql_yacc.yy:
Remove compiler warnings and remove not used variables
sql/strfunc.cc:
Remove compiler warnings and remove not used variables
strings/ctype-ucs2.c:
Remove compiler warnings
tests/mysql_client_test.c:
Remove compiler warnings and remove not used variables
tools/mysqlmanager.c:
Remove compiler warnings and remove not used variables
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 651fa947694..b3b913cda5c 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -877,7 +877,6 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh, */ int acl_getroot_no_password(THD *thd) { - ulong user_access= NO_ACCESS; int res= 1; uint i; ACL_USER *acl_user= 0; @@ -1660,7 +1659,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, Check that the user isn't trying to change a password for another user if he doesn't have UPDATE privilege to the MySQL database */ - DBUG_ASSERT(combo.host.str); + DBUG_ASSERT(combo.host.str != 0); if (thd->user && combo.password.str && (strcmp(thd->user,combo.user.str) || my_strcasecmp(system_charset_info, @@ -2634,7 +2633,6 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list, { class LEX_COLUMN *column; List_iterator <LEX_COLUMN> column_iter(columns); - int res; if (open_and_lock_tables(thd, table_list)) DBUG_RETURN(TRUE); @@ -3473,7 +3471,6 @@ bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant, { GRANT_TABLE *grant_table; GRANT_COLUMN *grant_column; - Field *field=0; want_access &= ~grant->privilege; if (!want_access) @@ -4796,7 +4793,6 @@ static void append_user(String *str, LEX_USER *user) bool mysql_create_user(THD *thd, List <LEX_USER> &list) { int result; - int found; String wrong_users; ulong sql_mode; LEX_USER *user_name; @@ -4817,7 +4813,7 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list) Search all in-memory structures and grant tables for a mention of the new user name. */ - if ((found= handle_grant_data(tables, 0, user_name, NULL))) + if (handle_grant_data(tables, 0, user_name, NULL)) { append_user(&wrong_users, user_name); result= TRUE; @@ -4859,7 +4855,6 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list) bool mysql_drop_user(THD *thd, List <LEX_USER> &list) { int result; - int found; String wrong_users; LEX_USER *user_name; List_iterator <LEX_USER> user_list(list); @@ -4875,7 +4870,7 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list) while ((user_name= user_list++)) { - if ((found= handle_grant_data(tables, 1, user_name, NULL)) <= 0) + if (handle_grant_data(tables, 1, user_name, NULL) <= 0) { append_user(&wrong_users, user_name); result= TRUE; @@ -4907,7 +4902,6 @@ bool mysql_drop_user(THD *thd, List <LEX_USER> &list) bool mysql_rename_user(THD *thd, List <LEX_USER> &list) { int result= 0; - int found; String wrong_users; LEX_USER *user_from; LEX_USER *user_to; @@ -4925,7 +4919,7 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list) while ((user_from= user_list++)) { user_to= user_list++; - DBUG_ASSERT(user_to); /* Syntax enforces pairs of users. */ + DBUG_ASSERT(user_to != 0); /* Syntax enforces pairs of users. */ /* Search all in-memory structures and grant tables @@ -5137,7 +5131,6 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name) { uint counter, revoked; int result; - ACL_DB *acl_db; TABLE_LIST tables[GRANT_TABLES]; DBUG_ENTER("sp_revoke_privileges"); @@ -5148,10 +5141,10 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name) VOID(pthread_mutex_lock(&acl_cache->lock)); /* Remove procedure access */ - do { + do + { for (counter= 0, revoked= 0 ; counter < proc_priv_hash.records ; ) { - const char *db,*name; GRANT_NAME *grant_proc= (GRANT_NAME*) hash_element(&proc_priv_hash, counter); if (!my_strcasecmp(system_charset_info, grant_proc->db, sp_db) && |