Use just \n for SQL exports (bug #1042521).

This commit is contained in:
Michal Čihař
2004-10-19 11:58:05 +00:00
parent da60381d6c
commit fcdfa25a14
2 changed files with 17 additions and 10 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-10-19 Michal Čihař <michal@cihar.com>
* export.php: Use just \n for SQL exports (bug #1042521).
2004-10-17 Marc Delisle <lem9@users.sourceforge.net>
* 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 <lem9@users.sourceforge.net>
* 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

View File

@@ -143,15 +143,19 @@ if (empty($asfile)) {
$asfile = TRUE;
}
// Defines the default <CR><LF> format
$crlf = PMA_whichCrlf();
// Defines the default <CR><LF> 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