bug 530255
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-12-14 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* ldi_check.php3: bug 530255 (LOAD DATA LOCAL INFILE)
|
||||||
|
|
||||||
2002-12-13 Michal Cihar <nijel@users.sourceforge.net>
|
2002-12-13 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
* tbl_dump.php3: Fix output order of inserts/creates, generate file
|
* tbl_dump.php3: Fix output order of inserts/creates, generate file
|
||||||
extension to include also file type, not only compression (now it
|
extension to include also file type, not only compression (now it
|
||||||
|
@@ -58,8 +58,29 @@ if (isset($btnLDI) && ($textfile != 'none')) {
|
|||||||
$column_name = PMA_sqlAddslashes($column_name);
|
$column_name = PMA_sqlAddslashes($column_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (try to) make sure the file is readable:
|
||||||
|
chmod($textfile, 0777);
|
||||||
|
|
||||||
// Builds the query
|
// Builds the query
|
||||||
$query = 'LOAD DATA LOCAL INFILE \'' . $textfile . '\'';
|
$query = 'LOAD DATA';
|
||||||
|
|
||||||
|
// for versions before 3.23.49, we use the LOCAL keyword, because
|
||||||
|
// there was a version (cannot find which one, and it does not work
|
||||||
|
// with 3.23.38) where the user can LOAD, even if the user does not
|
||||||
|
// have FILE priv, and even if the file is on the server
|
||||||
|
// (which is the present case)
|
||||||
|
//
|
||||||
|
// if we find how to check the server about --local-infile
|
||||||
|
// and --enable-local-infile, we could modify the code
|
||||||
|
// to use LOCAL for version >= 32349 if the server accepts it
|
||||||
|
//
|
||||||
|
// we could also code our own loader, but LOAD DATA INFILE is optimized
|
||||||
|
// for speed
|
||||||
|
|
||||||
|
if (PMA_MYSQL_INT_VERSION < 32349) {
|
||||||
|
$query .= ' LOCAL';
|
||||||
|
}
|
||||||
|
$query .= ' INFILE \'' . $textfile . '\'';
|
||||||
if (!empty($replace)) {
|
if (!empty($replace)) {
|
||||||
$query .= ' ' . $replace;
|
$query .= ' ' . $replace;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user