BUG#48340: rpl_cross_version: Found warnings/errors in server log file!

Valgrind reports a conditional jump that depends on uninitialized
data while doing a LOAD DATA and for this test case only. This
test case, tests that loading data from a 4.0 or 4.1 instance
into a 5.1 instance is working. As such it handles old binary log
with a different set of events than currently 5.1 codebase uses.
See the following reference for details:

http://forge.mysql.com/wiki/MySQL_Internals_Binary_Log#LOAD_DATA_INFILE_Events

Problem:
 
 The server is handling an Execute_load_log_event, which results
 in reading a Load_log_event from the binary log and applying
 it. When applying the Load_log_event, some variable setup is
 done and then mysql_load is called. Late in mysql_load
 execution, if not in row mode logging, the event is
 binlogged write_execute_load_query_log_event.

 In write_execute_load_query_log_event, thd->lex->local_file is
 inspected. The problem is that it has not been set before in the
 execution stack. This causes valgrind to report the warning.

Fix: 
  
 We fix this by initializing thd->lex->local_file to be the same
 as the value of Load_log_event::local_fname, when lex_start is
 called inside Load_log_event::do_apply_event.
This commit is contained in:
Luis Soares 2009-11-24 20:04:02 +00:00
parent 2a254a13ef
commit 2390a0cd03

View file

@ -4510,6 +4510,7 @@ int Load_log_event::do_apply_event(NET* net, Relay_log_info const *rli,
as the present method does not call mysql_parse().
*/
lex_start(thd);
thd->lex->local_file= local_fname;
mysql_reset_thd_for_next_command(thd);
if (!use_rli_only_for_errors)