Skip to content

Commit 2495e10

Browse files
author
Davi Arnaut
committed
Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.
2 parents b4b3c99 + 80246ac commit 2495e10

12 files changed

Lines changed: 27 additions & 19 deletions

File tree

cmd-line-utils/readline/bind.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ _rl_read_init_file (filename, include_level)
855855
{
856856
register int i;
857857
char *buffer, *openname, *line, *end;
858-
size_t file_size;
858+
size_t file_size = 0;
859859

860860
current_readline_init_file = filename;
861861
current_readline_init_include_level = include_level;

include/m_string.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ extern "C" {
7676
extern void *(*my_str_malloc)(size_t);
7777
extern void (*my_str_free)(void *);
7878

79-
#if defined(HAVE_STPCPY)
79+
#if MY_GNUC_PREREQ(3, 4)
80+
#define strmov(dest, src) __builtin_stpcpy(dest, src)
81+
#elif defined(HAVE_STPCPY)
8082
#define strmov(A,B) stpcpy((A),(B))
8183
#ifndef stpcpy
8284
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */

include/my_compiler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
/**
7777
Generic (compiler-independent) features.
7878
*/
79+
80+
#ifndef MY_GNUC_PREREQ
81+
# define MY_GNUC_PREREQ(maj, min) (0)
82+
#endif
83+
7984
#ifndef MY_ALIGNOF
8085
# ifdef __cplusplus
8186
template<typename type> struct my_alignof_helper { char m1; type m2; };

mysys/mf_keycache.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3963,11 +3963,11 @@ static int flush_key_blocks_int(KEY_CACHE *keycache,
39633963
if (!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
39643964
BLOCK_REASSIGNED)))
39653965
{
3966-
struct st_hash_link *next_hash_link;
3967-
my_off_t next_diskpos;
3968-
File next_file;
3969-
uint next_status;
3970-
uint hash_requests;
3966+
struct st_hash_link *UNINIT_VAR(next_hash_link);
3967+
my_off_t UNINIT_VAR(next_diskpos);
3968+
File UNINIT_VAR(next_file);
3969+
uint UNINIT_VAR(next_status);
3970+
uint UNINIT_VAR(hash_requests);
39713971

39723972
total_found++;
39733973
found++;

regex/regexec.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ size_t nmatch;
117117
my_regmatch_t pmatch[];
118118
int eflags;
119119
{
120+
char *pstr = (char *) str;
120121
register struct re_guts *g = preg->re_g;
121122
#ifdef REDEBUG
122123
# define GOODFLAGS(f) (f)
@@ -133,7 +134,7 @@ int eflags;
133134

134135
if ((size_t) g->nstates <= CHAR_BIT*sizeof(states1) &&
135136
!(eflags&REG_LARGE))
136-
return(smatcher(preg->charset, g, (char *)str, nmatch, pmatch, eflags));
137+
return(smatcher(preg->charset, g, pstr, nmatch, pmatch, eflags));
137138
else
138-
return(lmatcher(preg->charset, g, (char *)str, nmatch, pmatch, eflags));
139+
return(lmatcher(preg->charset, g, pstr, nmatch, pmatch, eflags));
139140
}

sql/debug_sync.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
16911691

16921692
if (action->execute)
16931693
{
1694-
const char *old_proc_info;
1694+
const char *UNINIT_VAR(old_proc_info);
16951695

16961696
action->execute--;
16971697

sql/handler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4160,7 +4160,7 @@ int handler::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
41604160
*/
41614161
int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
41624162
{
4163-
int result;
4163+
int UNINIT_VAR(result);
41644164
DBUG_ENTER("handler::read_multi_range_next");
41654165

41664166
/* We should not be called after the last call returned EOF. */

sql/slave.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2513,7 +2513,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
25132513

25142514
if (slave_trans_retries)
25152515
{
2516-
int temp_err;
2516+
int UNINIT_VAR(temp_err);
25172517
if (exec_res && (temp_err= has_temporary_error(thd)))
25182518
{
25192519
const char *errmsg;

sql/sql_partition.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7484,8 +7484,8 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
74847484
PARTITION_ITERATOR *part_iter)
74857485
{
74867486
Field *field= part_info->part_field_array[0];
7487-
uint32 max_endpoint_val;
7488-
get_endpoint_func get_endpoint;
7487+
uint32 UNINIT_VAR(max_endpoint_val);
7488+
get_endpoint_func UNINIT_VAR(get_endpoint);
74897489
bool can_match_multiple_values; /* is not '=' */
74907490
uint field_len= field->pack_length_in_rec();
74917491
DBUG_ENTER("get_part_iter_for_interval_via_mapping");

storage/myisam/ft_nlq_search.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)),
6363

6464
static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
6565
{
66-
int subkeys, r;
66+
int UNINIT_VAR(subkeys), r;
6767
uint keylen, doc_cnt;
6868
FT_SUPERDOC sdoc, *sptr;
6969
TREE_ELEMENT *selem;

0 commit comments

Comments
 (0)