3452 Dmitry Shulga 2011-06-15
Fixed bug#12403662 (formerly known as bug#60987): LOAD DATA LOCAL INFILE
can't parse relative paths "higher" than 3 levels up
When trying to LOAD DATA LOCAL INFILE using a relative path with 3 or
more levels up in the directory hierarchy, mysqld wrongly parses
the path and as a consequence, can't find the file.
This bug was introduced by patch for bug#58205.
The reason for bug is that implementaiton of function cleanup_dirname()
doesn't take into account the begin of buffer being processed during
handling of path to file.
@ mysys/mf_pack.c
function cleanup_dirname() was modified: fixed wrong comparison
condition when handling substring "../" at the begining of the buffer.
modified:
mysys/mf_pack.c
3451 Marko Mäkelä 2011-06-15 [merge]
Merge mysql-5.1 to mysql-5.5.
modified:
storage/innobase/btr/btr0cur.c
storage/innobase/include/rem0rec.h
storage/innobase/include/rem0rec.ic
storage/innobase/include/univ.i
storage/innobase/row/row0row.c
storage/innobase/row/row0vers.c
storage/innobase/trx/trx0rec.c
=== modified file 'mysys/mf_pack.c'
--- a/mysys/mf_pack.c 2010-12-29 00:26:31 +0000
+++ b/mysys/mf_pack.c 2011-06-15 09:18:08 +0000
@@ -193,7 +193,7 @@ size_t cleanup_dirname(register char *to
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
- (pos > start && memcmp(pos, parent, length) == 0))
+ (pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
Attachment: [text/bzr-bundle] bzr/dmitry.shulga@oracle.com-20110615091808-plmirk1gfi3vapvu.bundle
| Thread |
|---|
| • bzr push into mysql-5.5 branch (Dmitry.Shulga:3451 to 3452) Bug#60987Bug#12403662 | Dmitry Shulga | 16 Jun |