#At file:///home/lsoares/Workspace/bzr/work/bugfixing/48340/mysql-5.1-bugteam/ based on revid:jorgen.loland@stripped
3201 Luis Soares 2009-11-24
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.
modified:
sql/log_event.cc
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2009-10-23 03:13:42 +0000
+++ b/sql/log_event.cc 2009-11-24 20:04:02 +0000
@@ -4510,6 +4510,7 @@ int Load_log_event::do_apply_event(NET*
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)
Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20091124200402-8flgebguik5vf6r0.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (luis.soares:3201) Bug#48340 | Luis Soares | 24 Nov |