summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2003-07-04 16:06:17 -0400
committerunknown <vva@eagle.mysql.r18.ru>2003-07-04 16:06:17 -0400
commitcdb44cd45529dfece3e98b4941201cb228070159 (patch)
tree93b9a7afdc64d6c5f0dda6420f660f46297a2a18 /sql/log_event.cc
parentb22a79763179f5929a0030da40e0c23f77f33c5a (diff)
downloadmariadb-git-cdb44cd45529dfece3e98b4941201cb228070159.tar.gz
fixed bug #670
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc29
1 files changed, 25 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index ae4a429e35f..5f3d4263642 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1289,7 +1289,10 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
if (db && db[0] && !same_db)
fprintf(file, "use %s;\n", db);
- fprintf(file, "LOAD DATA INFILE '%-*s' ", fname_len, fname);
+ fprintf(file, "LOAD DATA ");
+ if (check_fname_outside_temp_buf())
+ fprintf(file, "LOCAL ");
+ fprintf(file, "INFILE '%-*s' ", fname_len, fname);
if (sql_ex.opt_flags & REPLACE_FLAG )
fprintf(file," REPLACE ");
@@ -1550,14 +1553,32 @@ Create_file_log_event::Create_file_log_event(const char* buf, int len,
#ifdef MYSQL_CLIENT
-void Create_file_log_event::print(FILE* file, bool short_form,
- char* last_db)
+void Create_file_log_event::print(FILE* file, bool short_form,
+ char* last_db, bool enable_local)
{
if (short_form)
+ {
+ if (enable_local && check_fname_outside_temp_buf())
+ Load_log_event::print(file, 1, last_db);
return;
- Load_log_event::print(file, 1, last_db);
+ }
+
+ if (enable_local)
+ {
+ if (!check_fname_outside_temp_buf())
+ fprintf(file, "#");
+ Load_log_event::print(file, 1, last_db);
+ fprintf(file, "#");
+ }
+
fprintf(file, " file_id: %d block_len: %d\n", file_id, block_len);
}
+
+void Create_file_log_event::print(FILE* file, bool short_form,
+ char* last_db)
+{
+ print(file,short_form,last_db,0);
+}
#endif
#ifndef MYSQL_CLIENT