From 4712e6b9b8e61e468ee94ec65105e61881f77421 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Fri, 20 Feb 2009 13:55:43 +0200 Subject: Bug #37313 BINLOG Contains Incorrect server id Signed integer format specifier forced to print the binlog header with server_id negative if the unsigned value sets the sign-bit ON. Fixed with correcting the specifier to correspond to typeof(server_id) == ulong. mysql-test/r/mysqlbinlog.result: results changed. mysql-test/t/mysqlbinlog.test: displaying the expected unsignedly formatted server_id value, bug#37313. sql/log_event.cc: Format specifier is corrected to correspond to typeof(server_id). --- sql/log_event.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/log_event.cc') diff --git a/sql/log_event.cc b/sql/log_event.cc index ef419aaee40..90805877502 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -976,7 +976,7 @@ void Log_event::print_header(FILE* file, PRINT_EVENT_INFO* print_event_info) fputc('#', file); print_timestamp(file); - fprintf(file, " server id %d end_log_pos %s ", server_id, + fprintf(file, " server id %lu end_log_pos %s ", server_id, llstr(log_pos,llbuff)); /* mysqlbinlog --hexdump */ -- cgit v1.2.1 From d822ab8957ad636de01eaabfc4981f0e0d0c5b47 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Sat, 21 Feb 2009 09:36:07 +0000 Subject: BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode If secure-file-priv was set on slave, it became unable to execute LOAD DATA INFILE statements sent from master using mixed or statement-based replication. This patch fixes the issue by ignoring this security restriction and checking if the files are created and read by the slave in the --slave-load-tmpdir while executing the SQL Thread. --- sql/log_event.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/log_event.cc') diff --git a/sql/log_event.cc b/sql/log_event.cc index 0e400ac2705..243790c7d76 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -354,7 +354,7 @@ static char *slave_load_file_stem(char *buf, uint file_id, int event_server_id, const char *ext) { char *res; - fn_format(buf,"SQL_LOAD-",slave_load_tmpdir, "", MY_UNPACK_FILENAME); + fn_format(buf,PREFIX_SQL_LOAD,slave_load_tmpdir, "", MY_UNPACK_FILENAME); to_unix_path(buf); buf = strend(buf); @@ -393,7 +393,7 @@ static void cleanup_load_tmpdir() we cannot meet Start_log event in the middle of events from one LOAD DATA. */ - p= strmake(prefbuf, STRING_WITH_LEN("SQL_LOAD-")); + p= strmake(prefbuf, STRING_WITH_LEN(PREFIX_SQL_LOAD)); p= int10_to_str(::server_id, p, 10); *(p++)= '-'; *p= 0; -- cgit v1.2.1 From d091deaf89a09881a34ef67335d042354da75c11 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Tue, 24 Feb 2009 16:17:34 +0200 Subject: fixing compilation warning and adding flush logs to test of bug#37313 --- sql/log_event.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/log_event.cc') diff --git a/sql/log_event.cc b/sql/log_event.cc index 90805877502..b74b38e55b2 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -976,7 +976,7 @@ void Log_event::print_header(FILE* file, PRINT_EVENT_INFO* print_event_info) fputc('#', file); print_timestamp(file); - fprintf(file, " server id %lu end_log_pos %s ", server_id, + fprintf(file, " server id %lu end_log_pos %s ", (ulong) server_id, llstr(log_pos,llbuff)); /* mysqlbinlog --hexdump */ -- cgit v1.2.1