summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorvva@eagle.mysql.r18.ru <>2003-01-17 22:04:43 +0400
committervva@eagle.mysql.r18.ru <>2003-01-17 22:04:43 +0400
commit05aa563043f7211f3191c7868f0bae441b0cce00 (patch)
treea5d93d588cc112634f1d901c94100167217419d2 /sql/log_event.cc
parentf2a193521edbf00d87c05b9fa1e3f443957e0ae4 (diff)
parent1b25ee3579ca48e3792f3226a77934baaef1a128 (diff)
downloadmariadb-git-05aa563043f7211f3191c7868f0bae441b0cce00.tar.gz
Merge vvagin@work.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BINLOG_LOADDATA/4.1.clear
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 609e67b148e..4ce491d7cc5 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1396,7 +1396,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 ");
+ if (check_fname_outside_temp_buf())
+ fprintf(file, "LOCAL ");
+ fprintf(file, "DATA INFILE '%-*s' ", fname_len, fname);
if (sql_ex.opt_flags && REPLACE_FLAG )
fprintf(file," REPLACE ");
@@ -2310,14 +2313,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 // MYSQL_CLIENT
/*****************************************************************************