Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/530#discussion_r25330596
--- Diff:
software/database/src/main/java/brooklyn/entity/database/mysql/MySqlSshDriver.java
---
@@ -186,9 +186,13 @@ protected void copyDatabaseConfigScript() {
}
protected boolean copyDatabaseCreationScript() {
- InputStream creationScript =
DatastoreMixins.getDatabaseCreationScript(entity);
- if (creationScript==null) return false;
- getMachine().copyTo(creationScript, getRunDir() +
"/creation-script.sql");
+ String creationScriptContents =
DatastoreMixins.getDatabaseCreationScriptAsString(entity);
+ if (creationScriptContents==null) return false;
+
+ creationScriptContents =
processTemplateContents(creationScriptContents);
+ Reader creationContents = new StringReader(creationScriptContents);
+
+ getMachine().copyTo(creationContents, getRunDir() +
"/creation-script.sql");
--- End diff --
You should just use `copyTemplate` instead of the previous four lines.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---