summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-04-01 18:19:15 +0200
committerunknown <guilhem@mysql.com>2003-04-01 18:19:15 +0200
commit241b6c058dc24f67687a6c9a5e6411066b6a5eca (patch)
treeeaa34da2fa8fc62e66e3d4afc3e0bfae233b4ead /sql/log_event.cc
parentf9df0feecbdd8c576d043731558a8d1b80b78be2 (diff)
downloadmariadb-git-241b6c058dc24f67687a6c9a5e6411066b6a5eca.tar.gz
Small-and-safe fix for bug #218: "LOAD DATA INFILE IGNORE is well
logged, but read as LOAD DATA INFILE REPLACE" This was just bad && instead of &, but nasty consequences. This should be merged to 4.0 BUT it will not be automatic (some code has moved from log_event.h to log_event.cc, and log_event.cc has changed); please Merging Man, do 'bk grep REPLACE_FLAG' in 4.0/sql to find all the new places. sql/log_event.cc: & instead of && when testing flags sql/slave.cc: & instead of && when testing flags
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index c30d03adaf5..7c4c893a823 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -671,9 +671,9 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
fprintf(file, "LOAD DATA INFILE '%s' ", fname);
- if(sql_ex.opt_flags && REPLACE_FLAG )
+ if(sql_ex.opt_flags & REPLACE_FLAG )
fprintf(file," REPLACE ");
- else if(sql_ex.opt_flags && IGNORE_FLAG )
+ else if(sql_ex.opt_flags & IGNORE_FLAG )
fprintf(file," IGNORE ");
fprintf(file, "INTO TABLE %s ", table_name);
@@ -685,7 +685,7 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
if(!(sql_ex.empty_flags & ENCLOSED_EMPTY))
{
- if(sql_ex.opt_flags && OPT_ENCLOSED_FLAG )
+ if(sql_ex.opt_flags & OPT_ENCLOSED_FLAG )
fprintf(file," OPTIONALLY ");
fprintf(file, " ENCLOSED BY ");
pretty_print_char(file, sql_ex.enclosed);