Skip to content

Commit c5ba706

Browse files
author
Sujatha Sivakumar
committed
Bug#22278455: MYSQL 5.5:RPL_BINLOG_INDEX FAILS IN VALGRIND.
Problem: ======= rpl_binlog_index.test fails with following valgrind error. line Conditional jump or move depends on uninitialised value(s) at 0x4C2F842: __memcmp_sse4_1 (in /usr/lib64/valgrind/ vgpreload_memcheck-amd64-linux.so) 0x739E39: find_uniq_filename(char*) (log.cc:2212) 0x73A11B: MYSQL_LOG::generate_new_name(char*, char const*) (log.cc:2492) 0x73A1ED: MYSQL_LOG::init_and_set_log_file_name(char const*, char const*, enum_log_type, cache_type) (log.cc:2289) 0x73B6F5: MYSQL_BIN_LOG::open(char const*, enum_log_type, Analysis and fix: ================= This issue was fixed as part of Bug#20459363 fix in 5.6 and above. Hence backporting the fix to MySQL-5.5.
1 parent 2735f0b commit c5ba706

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/log.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -2209,7 +2209,7 @@ static int find_uniq_filename(char *name)
22092209
file_info= dir_info->dir_entry;
22102210
for (i= dir_info->number_off_files ; i-- ; file_info++)
22112211
{
2212-
if (memcmp(file_info->name, start, length) == 0 &&
2212+
if (strncmp(file_info->name, start, length) == 0 &&
22132213
test_if_number(file_info->name+length, &number,0))
22142214
{
22152215
set_if_bigger(max_found,(ulong) number);

0 commit comments

Comments
 (0)