PMA_getTableDef() is also called from Table.class.php
This commit is contained in:
@@ -599,7 +599,7 @@ class PMA_Table {
|
|||||||
$no_constraints_comments = true;
|
$no_constraints_comments = true;
|
||||||
$GLOBALS['sql_constraints_query'] = '';
|
$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);
|
unset($no_constraints_comments);
|
||||||
$parsed_sql = PMA_SQP_parse($sql_structure);
|
$parsed_sql = PMA_SQP_parse($sql_structure);
|
||||||
$analyzed_sql = PMA_SQP_analyze($parsed_sql);
|
$analyzed_sql = PMA_SQP_analyze($parsed_sql);
|
||||||
|
@@ -418,6 +418,7 @@ function PMA_getTableDefStandIn($db, $view, $crlf) {
|
|||||||
* @param string the end of line sequence
|
* @param string the end of line sequence
|
||||||
* @param string the url to go back in case of error
|
* @param string the url to go back in case of error
|
||||||
* @param boolean whether to include creation/update/check dates
|
* @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
|
* @return string resulting schema
|
||||||
*
|
*
|
||||||
@@ -427,7 +428,7 @@ function PMA_getTableDefStandIn($db, $view, $crlf) {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @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_drop_table;
|
||||||
global $sql_backquotes;
|
global $sql_backquotes;
|
||||||
@@ -600,7 +601,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
|
|||||||
$schema_create .= $auto_increment;
|
$schema_create .= $auto_increment;
|
||||||
|
|
||||||
PMA_DBI_free_result($result);
|
PMA_DBI_free_result($result);
|
||||||
return $schema_create . ';' . $crlf;
|
return $schema_create . ($add_semicolon ? ';' . $crlf : '');
|
||||||
} // end of the 'PMA_getTableDef()' function
|
} // end of the 'PMA_getTableDef()' function
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user