bug #1030644 importing when last table exported was empty

This commit is contained in:
Marc Delisle
2004-09-20 17:47:40 +00:00
parent 0b851a1b30
commit 8b4513e16a
3 changed files with 15 additions and 6 deletions

View File

@@ -5,8 +5,12 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-09-20 Marc Delisle <lem9@users.sourceforge.net>
* read_dump.php, libraries/read_dump.lib.php: bug #1030644,
error importing when last table exported was empty
2004-09-20 Michal Čihař <michal@cihar.com>
* Documentation.html: Add info about theme generations.
* Documentation.html: Add info about theme generations.
2004-09-19 Alexander M. Turek <me@derrabus.de>
* Documentation.html: Clarification.

View File

@@ -18,7 +18,9 @@
*/
function PMA_splitSqlFile(&$ret, $sql, $release)
{
$sql = trim($sql);
// do not trim, see bug #1030644
//$sql = trim($sql);
$sql = rtrim($sql, "\n\r");
$sql_len = strlen($sql);
$char = '';
$string_start = '';

View File

@@ -130,13 +130,16 @@ if ($sql_file != 'none') {
// Kanji convert SQL textfile 2002/1/4 by Y.Kawada
if (@function_exists('PMA_kanji_str_conv')) {
$sql_tmp = trim($sql_query);
// do not trim here: see bug #1030644
//$sql_tmp = trim($sql_query);
$sql_tmp = $sql_query;
PMA_change_enc_order();
$sql_query = PMA_kanji_str_conv($sql_tmp, $knjenc, isset($xkana) ? $xkana : '');
PMA_change_enc_order();
} else {
$sql_query = trim($sql_query);
}
} //else {
// do not trim here: see bug #1030644
//$sql_query = trim($sql_query);
//}
// $sql_query come from the query textarea, if it's a reposted query gets its
// 'true' value