diff options
-rwxr-xr-x | ChangeLog | 6 | ||||
-rw-r--r-- | libraries/read_dump.lib.php | 4 | ||||
-rw-r--r-- | read_dump.php | 11 |
3 files changed, 15 insertions, 6 deletions
@@ -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. diff --git a/libraries/read_dump.lib.php b/libraries/read_dump.lib.php index f5a4255301..f8a97ea1f0 100644 --- a/libraries/read_dump.lib.php +++ b/libraries/read_dump.lib.php @@ -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 = ''; diff --git a/read_dump.php b/read_dump.php index a1bd251f8b..5883bfa177 100644 --- a/read_dump.php +++ b/read_dump.php @@ -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 |