summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-02-06 20:57:11 +0400
committerunknown <vva@eagle.mysql.r18.ru>2004-02-06 20:57:11 +0400
commit7db76e5a16796f4cf55bc95418807644d2dd6d17 (patch)
treec227c897a657471d0719eefc11829eead946197e /sql
parent15b89bfc5981ad348220fbf3f7067b7465d71080 (diff)
downloadmariadb-git-7db76e5a16796f4cf55bc95418807644d2dd6d17.tar.gz
fixed bug #1378 "mysqlbinlog for remote host is broken"
client/mysqlbinlog.cc: fixed bug #1378 "mysqlbinlog for remote host is broken" by using shared part of code for local and remote variant (function process_event) mysql-test/r/mysqlbinlog.result: fixed results for remote variant (they are the same as for local now) mysql-test/t/mysqlbinlog.test: discarded note 'V. Vagin should ...' because V.Vagin done sql/log_event.cc: added special local_fname flag to Load_log_event for using in Load_log_event::check_fname_outside_temp_buf instead of ugly condition sql/log_event.h: added special local_fname flag to Load_log_event for using in Load_log_event::check_fname_outside_temp_buf instead of ugly condition
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc4
-rw-r--r--sql/log_event.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index cafd1666eac..b5d7b1df038 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1189,7 +1189,7 @@ Load_log_event::Load_log_event(THD* thd_arg, sql_exchange* ex,
num_fields(0),fields(0),
field_lens(0),field_block_len(0),
table_name(table_name_arg ? table_name_arg : ""),
- db(db_arg), fname(ex->file_name)
+ db(db_arg), fname(ex->file_name), local_fname(FALSE)
{
time_t end_time;
time(&end_time);
@@ -1265,7 +1265,7 @@ Load_log_event::Load_log_event(const char* buf, int event_len,
bool old_format)
:Log_event(buf, old_format),num_fields(0),fields(0),
field_lens(0),field_block_len(0),
- table_name(0),db(0),fname(0)
+ table_name(0),db(0),fname(0),local_fname(FALSE)
{
if (!event_len) // derived class, will call copy_log_event() itself
return;
diff --git a/sql/log_event.h b/sql/log_event.h
index a1a7798be34..b610263a462 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -411,17 +411,19 @@ public:
const char* fname;
uint32 skip_lines;
sql_ex_info sql_ex;
+ bool local_fname;
/* fname doesn't point to memory inside Log_event::temp_buf */
void set_fname_outside_temp_buf(const char *afname, uint alen)
{
fname= afname;
fname_len= alen;
+ local_fname= true;
}
/* fname doesn't point to memory inside Log_event::temp_buf */
int check_fname_outside_temp_buf()
{
- return fname < temp_buf || fname > temp_buf+ cached_event_len;
+ return local_fname;
}
#ifndef MYSQL_CLIENT