From a4dfad891252a15f0f9ecd46fd00160d55a19900 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 14 Dec 2007 17:48:39 +0000 Subject: [PATCH] bug #1848889 [export] export trigger should use DROP TRIGGER IF EXISTS --- ChangeLog | 1 + libraries/database_interface.lib.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bf75ea4ac..704f91012 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,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 0331e011b..8b32023b4 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -1211,7 +1211,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;