diff options
author | unknown <monty@narttu.mysql.fi> | 2003-07-04 23:06:19 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-07-04 23:06:19 +0300 |
commit | 4e61b75d8b43a38f3cdf667780e000202137e4d9 (patch) | |
tree | 1da176a8e662fa899ecece2c7c7d6f9ee6e5dbc7 /sql | |
parent | 4e4ab26f53bada8aaebbe7650a08f3e9ecf15107 (diff) | |
download | mariadb-git-4e61b75d8b43a38f3cdf667780e000202137e4d9.tar.gz |
Remove compiler warnings
Simple cleanup of previous pull
sql/item_strfunc.cc:
Removed compiler warning
sql/sql_cache.cc:
Indentation fix
sql/sql_handler.cc:
Simple ptimization
sql/sql_parse.cc:
Removed compiler warning
sql/log_event.h:
Indentation fix
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_strfunc.cc | 2 | ||||
-rw-r--r-- | sql/log_event.h | 9 | ||||
-rw-r--r-- | sql/sql_cache.cc | 2 | ||||
-rw-r--r-- | sql/sql_handler.cc | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 5 |
5 files changed, 14 insertions, 6 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index caaff4d1613..801b77ffcce 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1558,7 +1558,7 @@ longlong Item_func_elt::val_int() if ((tmp=(uint) item->val_int()) == 0 || tmp > arg_count) return 0; - int result= args[tmp-1]->val_int(); + longlong result= args[tmp-1]->val_int(); null_value= args[tmp-1]->null_value; return result; } diff --git a/sql/log_event.h b/sql/log_event.h index 0a807bd524d..155da07bebd 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -406,10 +406,15 @@ public: /* fname doesn't point to memory inside Log_event::temp_buf */ void set_fname_outside_temp_buf(const char *afname, uint alen) - {fname=afname;fname_len=alen;} + { + fname= afname; + fname_len= alen; + } /* fname doesn't point to memory inside Log_event::temp_buf */ int check_fname_outside_temp_buf() - {return fname<temp_buf || fname>temp_buf+cached_event_len;} + { + return fname < temp_buf || fname > temp_buf+ cached_event_len; + } #ifndef MYSQL_CLIENT String field_lens_buf; diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 1fcd0d1456b..97ec6033ad6 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -744,7 +744,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) DBUG_VOID_RETURN; if ((local_tables= is_cacheable(thd, thd->query_length, - thd->query, &thd->lex, tables_used))) + thd->query, &thd->lex, tables_used))) { NET *net= &thd->net; byte flags= (thd->client_capabilities & CLIENT_LONG_FLAG ? 0x80 : 0); diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index e685ea3a059..b0d8b18dd17 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -234,7 +234,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, } if (cond && !cond->val_int()) continue; - if (!err && num_rows >= offset_limit) + if (num_rows >= offset_limit) { String *packet = &thd->packet; Item *item; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f5ecb98b3be..3c84caff4c5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -501,7 +501,10 @@ check_connections(THD *thd) #if !defined(HAVE_SYS_UN_H) || defined(HAVE_mit_thread) /* Fast local hostname resolve for Win32 */ if (!strcmp(thd->ip,"127.0.0.1")) - thd->host= thd->host_or_ip= (char*) localhost; + { + thd->host= (char*) localhost; + thd->host_or_ip= localhost; + } else #endif if (!(specialflag & SPECIAL_NO_RESOLVE)) |