Skip to content

Commit

Permalink
0001814: NullPointerException in AbstractTriggerTemplate.createInital…
Browse files Browse the repository at this point in the history
…LoadSql
  • Loading branch information
chenson42 committed Jul 20, 2014
1 parent 8671110 commit 3662a4e
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -904,8 +904,17 @@ protected Table lookupAndOrderColumnsAccordingToTriggerHistory(String routerId,
Table table = null;
if (useDatabaseDefinition) {
table = platform.getTableFromCache(catalogName, schemaName, tableName, false);

if (table != null && table.getColumnCount() < triggerHistory.getParsedColumnNames().length) {
/*
* If the column count is less than what trigger history reports, then
* chances are the table cache is out of date.
*/
table = platform.getTableFromCache(catalogName, schemaName, tableName, true);
}

if (table != null) {
table = table.copyAndFilterColumns(triggerHistory.getParsedColumnNames(),
table = table.copyAndFilterColumns(triggerHistory.getParsedColumnNames(),
triggerHistory.getParsedPkColumnNames(), true);
} else {
throw new SymmetricException("Could not find the following table. It might have been dropped: %s", Table.getFullyQualifiedTableName(catalogName, schemaName, tableName));
Expand Down

0 comments on commit 3662a4e

Please sign in to comment.