bug #1747215, other cases of blanks at end of line

This commit is contained in:
Marc Delisle
2007-07-11 19:19:32 +00:00
parent f772df4b99
commit 8ea5dfc479

View File

@@ -682,7 +682,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = FALSE,
? PMA_backquote($table)
: '\'' . $table . '\'';
$dump = $crlf
. PMA_exportComment(str_repeat('-', 55))
. PMA_exportComment(str_repeat('-', 56))
. $crlf
. PMA_exportComment();
@@ -804,6 +804,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
if (isset($GLOBALS['sql_ignore'])) {
$schema_insert .= 'IGNORE ';
}
// avoid EOL blank
$schema_insert .= PMA_backquote($table, $sql_backquotes) . ' SET';
} else {
// insert or replace
@@ -829,6 +830,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
if (isset($GLOBALS['sql_columns'])) {
$fields = implode(', ', $field_set);
$schema_insert = $sql_command . $insert_delayed .' INTO ' . PMA_backquote($table, $sql_backquotes)
// avoid EOL blank
. ' (' . $fields . ') VALUES';
} else {
$schema_insert = $sql_command . $insert_delayed .' INTO ' . PMA_backquote($table, $sql_backquotes)
@@ -884,7 +886,11 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$insert_line = $schema_insert;
for ($i = 0; $i < $fields_cnt; $i++) {
if (0 == $i) {
$insert_line .= ' ';
}
if ($i > 0) {
// avoid EOL blank
$insert_line .= ',';
}
$insert_line .= $field_set[$i] . ' = ' . $values[$i];