bug #1848889 [export] export trigger should use DROP TRIGGER IF EXISTS

This commit is contained in:
Marc Delisle
2007-12-14 17:48:39 +00:00
parent b5fadf8034
commit cd05940c9b
2 changed files with 2 additions and 1 deletions

View File

@@ -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;