summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 3b499b8d502..dfa44e19ffc 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -309,15 +309,19 @@ void Load_log_event::pack_info(String* packet)
pretty_print_str(&tmp, sql_ex.escaped, sql_ex.escaped_len);
}
+ bool line_lexem_added= false;
if (sql_ex.line_term_len)
{
tmp.append(" LINES TERMINATED BY ");
pretty_print_str(&tmp, sql_ex.line_term, sql_ex.line_term_len);
+ line_lexem_added= true;
}
if (sql_ex.line_start_len)
{
- tmp.append(" LINES STARTING BY ");
+ if (!line_lexem_added)
+ tmp.append(" LINES");
+ tmp.append(" STARTING BY ");
pretty_print_str(&tmp, sql_ex.line_start, sql_ex.line_start_len);
}
@@ -1299,15 +1303,19 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
pretty_print_str(file, sql_ex.escaped, sql_ex.escaped_len);
}
+ bool line_lexem_added= false;
if (sql_ex.line_term)
{
fprintf(file," LINES TERMINATED BY ");
pretty_print_str(file, sql_ex.line_term, sql_ex.line_term_len);
+ line_lexem_added= true;
}
if (sql_ex.line_start)
{
- fprintf(file," LINES STARTING BY ");
+ if (!line_lexem_added)
+ fprintf(file," LINES");
+ fprintf(file," STARTING BY ");
pretty_print_str(file, sql_ex.line_start, sql_ex.line_start_len);
}