diff --git a/ChangeLog b/ChangeLog index 32135ab2d..5441f06a8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-10-19 Michal Čihař + * export.php: Use just \n for SQL exports (bug #1042521). + 2004-10-17 Marc Delisle * lang/turkish update, thanks to boralioglu. * lang/estonian: Update thanks to Alvar Soome - finsoft. @@ -14,7 +17,7 @@ $Source$ and CLIENT_LOCAL_FILES in mysqli 2004-10-15 Marc Delisle - * pdf_schema.php: new way to define font path, + * pdf_schema.php: new way to define font path, needed with the new fpdf library; also now output inline, I find it faster this way, please tell me if you prefer the old dialog method and why. @@ -22,7 +25,7 @@ $Source$ * sql.php: detect this case: SELECT DISTINCT x AS foo, y AS bar FROM sometable and count rows correctly (in MySQL 3), - thanks to Matthias Pigulla (mp@webfactory.de) + thanks to Matthias Pigulla (mp@webfactory.de) * server_privileges.php: cosmetic: title for Edit privileges * lang/galician: Updated, thanks to Xosé Calvo. * lang/italian: Updates, thanks to Pietro Danesi diff --git a/export.php b/export.php index 2cf94f540..9c85dd360 100644 --- a/export.php +++ b/export.php @@ -143,15 +143,19 @@ if (empty($asfile)) { $asfile = TRUE; } -// Defines the default format -$crlf = PMA_whichCrlf(); +// Defines the default format. For SQL always use \n as MySQL wants this on all platforms. +if ($what == 'sql') { + $crlf = "\n"; +} else { + $crlf = PMA_whichCrlf(); +} $output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xls'; // Do we need to convert charset? $output_charset_conversion = $asfile && $cfg['AllowAnywhereRecoding'] && $allow_recoding - && isset($charset_of_file) && $charset_of_file != $charset + && isset($charset_of_file) && $charset_of_file != $charset && $type != 'xls'; // Set whether we will need buffering @@ -381,9 +385,9 @@ if ($export_type == 'server') { foreach ($dblist AS $current_db) { if ((isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|')) || !isset($tmp_select)) { - if (!PMA_exportDBHeader($current_db)) + if (!PMA_exportDBHeader($current_db)) break 2; - if (!PMA_exportDBCreate($current_db)) + if (!PMA_exportDBCreate($current_db)) break 2; $tables = PMA_DBI_get_tables($current_db); foreach ($tables as $table) { @@ -397,7 +401,7 @@ if ($export_type == 'server') { break 3; } } - if (!PMA_exportDBFooter($current_db)) + if (!PMA_exportDBFooter($current_db)) break 2; } } @@ -425,10 +429,10 @@ if ($export_type == 'server') { } } } - if (!PMA_exportDBFooter($db)) + if (!PMA_exportDBFooter($db)) break; } else { - if (!PMA_exportDBHeader($db)) + if (!PMA_exportDBHeader($db)) break; // We export just one table