Skip to content

Commit

Permalink
assume that the trigger does not exist if we get an exception while l…
Browse files Browse the repository at this point in the history
…ooking it up (this is to work around a flaky error in a version of mysql we encountered).
  • Loading branch information
chenson42 committed Oct 10, 2007
1 parent 999fa08 commit d0b5c8e
Showing 1 changed file with 21 additions and 20 deletions.
@@ -1,21 +1,14 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
* SymmetricDS is an open source database synchronization solution. Copyright
* (C) Chris Henson <chenson42@users.sourceforge.net> This library is free
* software; you can redistribute it and/or modify it under the terms of the GNU
* Lesser General Public License as published by the Free Software Foundation;
* either version 3 of the License, or (at your option) any later version. This
* library is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details. You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

package org.jumpmind.symmetric.service.impl;
Expand Down Expand Up @@ -364,9 +357,17 @@ private TriggerHistory rebuildTriggerIfNecessary(boolean forceRebuild,
// does not exist as well.
oldTriggerName = newTriggerHist.getTriggerNameForDmlType(dmlType);
oldSourceSchema = trigger.getSourceSchemaName();
triggerExists = dbDialect.doesTriggerExist(trigger
.getSourceSchemaName(), trigger.getSourceTableName()
.toUpperCase(), oldTriggerName);
try {
triggerExists = dbDialect.doesTriggerExist(trigger
.getSourceSchemaName(), trigger.getSourceTableName()
.toUpperCase(), oldTriggerName);
} catch (Exception ex) {
triggerExists = false;
logger
.warn(
"Could not figure out if the trigger exists. Assuming that is does not.",
ex);
}
}

if (!triggerExists && forceRebuild) {
Expand Down

0 comments on commit d0b5c8e

Please sign in to comment.