Bug #14686: erorr in import data
| From: | tom dot p at sf dot cz | Date: | Mon, 24 Dec 2001 15:14:15 +0000 |
| Subject: | Bug #14686: erorr in import data | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-74921@lists.php.net to get a copy of this message | ||
From: tom.p@sf.cz
Operating system: Windows 2000
PHP version: 4.0.6
PHP Bug Type: Scripting Engine problem
Bug description: erorr in import data
Hi,
I'm satisfied user of PHPmyAdmin 2.2.2, but I found it 2 bugs in file
'read_dump.php'. I'dont very well english. :-(
Bug 1:
On the line 218 change "if ($sql_file != 'none')" to "if (($sql_file !=
'none')&&($sql_file != "")) {"
Reason: Some browser return "" (nullstring) instead "none", where file not
selected.
This bug is again on the line 264.
Bug 2:
On the line 286 is this code:
// Runs multiple queries
else if (mysql_select_db($db)) {
for ($i = 0; $i < $pieces_count; $i++) {
$a_sql_query = $pieces[$i];
$result = mysql_query($a_sql_query);
if ($result == FALSE) { // readdump failed
$my_die = $a_sql_query;
break;
}
if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF
EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
$reload = 1;
}
} // end for
} // end else if
In this code isn't condition for treatment line with char '#' in begin of
the line
or blank line.
This condition was in last versions of PHPmyAdmin.
This is code for some last version:
// Runs multiple queries
else if (mysql_select_db($db)) {
for ($i = 0; $i < $pieces_count; $i++) {
$a_sql_query = trim($pieces[$i]);
******************************************************
if (!empty($a_sql_query) && $a_sql_query[0] != '#') {
******************************************************
$result = mysql_query($a_sql_query);
if ($result == FALSE) { // readdump failed
$my_die = $a_sql_query;
break;
}
}
if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF
EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
$reload = 'true';
}
} // end for
} // end else if
Bye !
--
Edit bug report at: http://bugs.php.net/?id=14686&edit=1