bug #2839548 [export] Triggers order on export
This commit is contained in:
@@ -44,6 +44,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
- bug [export] Exporting results of a query which contains a LIMIT clause
|
||||
inside a subquery
|
||||
- bug #2837722 [export] Run complex SQL then export does not work
|
||||
- bug #2839548 [export] Triggers order on export
|
||||
|
||||
3.2.1.0 (2009-08-09)
|
||||
- bug #2799009 Login with ipv6 IP address breaks redirect
|
||||
|
21
export.php
21
export.php
@@ -444,6 +444,13 @@ if ($export_type == 'server') {
|
||||
break 3;
|
||||
}
|
||||
}
|
||||
// now export the triggers (needs to be done after the data because
|
||||
// triggers can modify already imported tables)
|
||||
if (isset($GLOBALS[$what . '_structure'])) {
|
||||
if (!PMA_exportStructure($current_db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'triggers', $export_type)) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach($views as $view) {
|
||||
// no data export for a view
|
||||
@@ -485,6 +492,13 @@ if ($export_type == 'server') {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
// now export the triggers (needs to be done after the data because
|
||||
// triggers can modify already imported tables)
|
||||
if (isset($GLOBALS[$what . '_structure'])) {
|
||||
if (!PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'triggers', $export_type)) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($views as $view) {
|
||||
// no data export for a view
|
||||
@@ -536,6 +550,13 @@ if ($export_type == 'server') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// now export the triggers (needs to be done after the data because
|
||||
// triggers can modify already imported tables)
|
||||
if (isset($GLOBALS[$what . '_structure'])) {
|
||||
if (!PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'triggers', $export_type)) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
if (!PMA_exportDBFooter($db)) {
|
||||
break;
|
||||
}
|
||||
|
@@ -763,6 +763,10 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = FALSE,
|
||||
$dump .= PMA_exportComment($GLOBALS['strTableStructure'] . ' ' . $formatted_table_name)
|
||||
. PMA_exportComment();
|
||||
$dump .= PMA_getTableDef($db, $table, $crlf, $error_url, $dates);
|
||||
$dump .= PMA_getTableComments($db, $table, $crlf, $relation, $mime);
|
||||
break;
|
||||
case 'triggers':
|
||||
$dump = '';
|
||||
$triggers = PMA_DBI_get_triggers($db, $table);
|
||||
if ($triggers) {
|
||||
$dump .= PMA_possibleCRLF()
|
||||
@@ -794,7 +798,6 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = FALSE,
|
||||
$dump .= PMA_getTableDefStandIn($db, $table, $crlf);
|
||||
} // end switch
|
||||
|
||||
$dump .= PMA_getTableComments($db, $table, $crlf, $relation, $mime);
|
||||
// this one is built by PMA_getTableDef() to use in table copy/move
|
||||
// but not in the case of export
|
||||
unset($GLOBALS['sql_constraints_query']);
|
||||
|
Reference in New Issue
Block a user