Navigation Menu

Skip to content

Commit

Permalink
0001925: Send Table Schema uses cached tables
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Aug 20, 2014
1 parent ad5442c commit 9f698d7
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -1414,9 +1414,16 @@ public CsvData next() {
routerId, triggerHistory, true, true);
Database db = new Database();
db.setName("dataextractor");
/*
* Force a reread of table so new columns are picked up. A create
* event is usually sent after there is a change to the table so
* we want to make sure that the cache is updated
*/
Table table = platform.getTableFromCache(targetTable.getCatalog(),
targetTable.getSchema(), targetTable.getName(), true);
db.setCatalog(targetTable.getCatalog());
db.setSchema(targetTable.getSchema());
db.addTable(targetTable);
db.addTable(table != null ? table : targetTable);
data.setRowData(CsvUtils.escapeCsvData(DatabaseXmlUtil.toXml(db)));
}
}
Expand Down

0 comments on commit 9f698d7

Please sign in to comment.