From d6b54e5f498bb2c888f4be842e59b487dfaf9336 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 27 Jun 2008 14:27:18 +0000 Subject: [PATCH] PMA_getTableDef() is also called from Table.class.php --- libraries/Table.class.php | 2 +- libraries/export/sql.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 066d4a7352..e732798395 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -599,7 +599,7 @@ class PMA_Table { $no_constraints_comments = true; $GLOBALS['sql_constraints_query'] = ''; - $sql_structure = PMA_getTableDef($source_db, $source_table, "\n", $err_url); + $sql_structure = PMA_getTableDef($source_db, $source_table, "\n", $err_url, false, false); unset($no_constraints_comments); $parsed_sql = PMA_SQP_parse($sql_structure); $analyzed_sql = PMA_SQP_analyze($parsed_sql); diff --git a/libraries/export/sql.php b/libraries/export/sql.php index a6420852e1..753252ebf7 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -418,6 +418,7 @@ function PMA_getTableDefStandIn($db, $view, $crlf) { * @param string the end of line sequence * @param string the url to go back in case of error * @param boolean whether to include creation/update/check dates + * @param boolean whether to add semicolon and end-of-line at the end * * @return string resulting schema * @@ -427,7 +428,7 @@ function PMA_getTableDefStandIn($db, $view, $crlf) { * * @access public */ -function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false) +function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $add_semicolon = true) { global $sql_drop_table; global $sql_backquotes; @@ -600,7 +601,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false) $schema_create .= $auto_increment; PMA_DBI_free_result($result); - return $schema_create . ';' . $crlf; + return $schema_create . ($add_semicolon ? ';' . $crlf : ''); } // end of the 'PMA_getTableDef()' function -- 2.11.4.GIT