diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-09-17 17:25:52 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-09-17 17:25:52 +0200 |
commit | d6ca0cbb23544e2e033f512f400a91ce6245a9a4 (patch) | |
tree | 0320f9cfba455c1d3cb00160205b3412461fffb3 /sql | |
parent | 2535ede7138cb4d1e8986d18b4154c377ba37f3f (diff) | |
parent | e5888b16afcef42e8127a815cc5a95abc283c6d9 (diff) | |
download | mariadb-git-d6ca0cbb23544e2e033f512f400a91ce6245a9a4.tar.gz |
Merge from 5.0
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.cc | 6 | ||||
-rw-r--r-- | sql/item_timefunc.cc | 11 | ||||
-rw-r--r-- | sql/sql_handler.cc | 7 | ||||
-rw-r--r-- | sql/udf_example.c | 4 |
4 files changed, 9 insertions, 19 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index c775848cff2..a85e354b786 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -435,8 +435,7 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const Field *Item_func::tmp_table_field(TABLE *table) { - Field *field; - LINT_INIT(field); + Field *field= NULL; switch (result_type()) { case INT_RESULT: @@ -4236,9 +4235,8 @@ void Item_func_set_user_var::save_item_result(Item *item) bool Item_func_set_user_var::update() { - bool res; + bool res= NULL; DBUG_ENTER("Item_func_set_user_var::update"); - LINT_INIT(res); switch (cached_result_type) { case REAL_RESULT: diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index a9e5c71ab56..cf38a294e55 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -278,9 +278,9 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, int strict_week_number_year= -1; int frac_part; bool usa_time= 0; - bool sunday_first_n_first_week_non_iso; - bool strict_week_number; - bool strict_week_number_year_type; + bool UNINIT_VAR(sunday_first_n_first_week_non_iso); + bool UNINIT_VAR(strict_week_number); + bool UNINIT_VAR(strict_week_number_year_type); const char *val_begin= val; const char *val_end= val + length; const char *ptr= format->format.str; @@ -288,11 +288,6 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, CHARSET_INFO *cs= &my_charset_bin; DBUG_ENTER("extract_date_time"); - LINT_INIT(strict_week_number); - /* Remove valgrind varnings when using gcc 3.3 and -O1 */ - PURIFY_OR_LINT_INIT(strict_week_number_year_type); - PURIFY_OR_LINT_INIT(sunday_first_n_first_week_non_iso); - if (!sub_pattern_end) bzero((char*) l_time, sizeof(*l_time)); diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 1e92d95573a..3bbf4b78d07 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -422,16 +422,13 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables, String buffer(buff, sizeof(buff), system_charset_info); int error, keyno= -1; uint num_rows; - uchar *key; - uint key_len; + uchar *UNINIT_VAR(key); + uint UNINIT_VAR(key_len); bool need_reopen; DBUG_ENTER("mysql_ha_read"); DBUG_PRINT("enter",("'%s'.'%s' as '%s'", tables->db, tables->table_name, tables->alias)); - LINT_INIT(key); - LINT_INIT(key_len); - thd->lex->select_lex.context.resolve_in_table_list_only(tables); list.push_front(new Item_field(&thd->lex->select_lex.context, NULL, NULL, "*")); diff --git a/sql/udf_example.c b/sql/udf_example.c index 30d85d95034..82af58ec502 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -139,10 +139,10 @@ typedef long long longlong; #include <mysql.h> #include <ctype.h> -static pthread_mutex_t LOCK_hostname; - #ifdef HAVE_DLOPEN +static pthread_mutex_t LOCK_hostname; + /* These must be right or mysqld will not find the symbol! */ my_bool metaphon_init(UDF_INIT *initid, UDF_ARGS *args, char *message); |