提交 db21f7cb 编写于 作者: S Serge Rider

#3667 MySQL trigger create. check current catalog


Former-commit-id: b010aaa6
上级 45dd2d4a
......@@ -77,14 +77,13 @@ public class MySQLTriggerManager extends SQLTriggerManager<MySQLTrigger, MySQLTa
);
}
MySQLCatalog curCatalog = trigger.getCatalog().getDataSource().getDefaultObject();
String ddl;
if (curCatalog != trigger.getCatalog()) {
actions.add(new SQLDatabasePersistAction("Set current schema ", "USE " + DBUtils.getQuotedIdentifier(trigger.getCatalog()), false)); //$NON-NLS-2$
}
actions.add(new SQLDatabasePersistAction("Create trigger", trigger.getBody(), true)); //$NON-NLS-2$
if (curCatalog != trigger.getCatalog()) {
if (curCatalog != null && curCatalog != trigger.getCatalog()) {
actions.add(new SQLDatabasePersistAction("Set current schema ", "USE " + DBUtils.getQuotedIdentifier(curCatalog), false)); //$NON-NLS-2$
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册