diff options
author | Neeraj Bisht <neeraj.x.bisht@oracle.com> | 2014-05-15 15:50:52 +0530 |
---|---|---|
committer | Neeraj Bisht <neeraj.x.bisht@oracle.com> | 2014-05-15 15:50:52 +0530 |
commit | cb0afbd1265a33578909554ffc2cbc63de02f09d (patch) | |
tree | 6523f31cb4b043e7e5d01927934196ebb513c9d0 /mysys | |
parent | 4c4def904368dff4acb7a2ce6fbe04afb15cbdad (diff) | |
download | mariadb-git-cb0afbd1265a33578909554ffc2cbc63de02f09d.tar.gz |
Bug#18207212 : FILE NAME IS NOT ESCAPED IN BINLOG FOR LOAD DATA INFILE STATEMENT
Problem:
Load_log_event::print_query() function does not put escape character in file name
for "LOAD DATA INFILE" statement.
Analysis:
When we have "'" in our file name for "LOAD DATA INFILE" statement,
Load_log_event::print_query() function does not put escape character
in our file name.
This one result that when we show binary-log, we get file name without
escape character.
Solution:
To put escape character when we have "'" in file name, for this instead of using
simple memcpy() to put file-name, we will use pretty_print_str().
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache2.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 04d2bc34ae4..1b0375cb88e 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -408,6 +408,13 @@ process_flags: if (my_b_write(info, (uchar*) par, length2)) goto err; } + else if (*fmt == 'c') /* char type parameter */ + { + char par[2]; + par[0] = va_arg(args, int); + if (my_b_write(info, (uchar*) par, 1)) + goto err; + } else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */ { char *par = va_arg(args, char *); |