diff --git a/ChangeLog b/ChangeLog index 9c61694ba..17d429ab2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #1835654 [core] wrong escaping when using double quotes - bug #1817612 [cookies] Wrong cookie path on IIS with PHP-CGI, thanks to Carsten Wiedmann +- bug #1848889 [export] export trigger should use DROP TRIGGER IF EXISTS 2.11.3.0 (2007-12-08) - patch #1818389 to remove a notice (failed to flush buffer), thanks to diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index f6ed0773e..6ae3a1477 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -1276,7 +1276,7 @@ function PMA_DBI_get_triggers($db, $table) { $one_result['event_manipulation'] = $trigger['EVENT_MANIPULATION']; $one_result['full_trigger_name'] = PMA_backquote($trigger['TRIGGER_SCHEMA']) . '.' . PMA_backquote($trigger['TRIGGER_NAME']); - $one_result['drop'] = 'DROP TRIGGER ' . $one_result['full_trigger_name']; + $one_result['drop'] = 'DROP TRIGGER IF EXISTS ' . $one_result['full_trigger_name']; $one_result['create'] = 'CREATE TRIGGER ' . $one_result['full_trigger_name'] . ' ' . $trigger['ACTION_TIMING']. ' ' . $trigger['EVENT_MANIPULATION'] . ' ON ' . PMA_backquote($trigger['EVENT_OBJECT_SCHEMA']) . '.' . PMA_backquote($trigger['EVENT_OBJECT_TABLE']) . "\n" . ' FOR EACH ROW ' . $trigger['ACTION_STATEMENT'] . "\n" . $delimiter . "\n"; $result[] = $one_result;