提交 888906fb authored 作者: Thomas Mueller's avatar Thomas Mueller

When altering a table with triggers, new triggers are created and initialized…

When altering a table with triggers, new triggers are created and initialized with a table name that ends with tableName_COPY_x_y.
上级 cb8d121f
......@@ -1595,10 +1595,10 @@ public class Database implements DataHandler {
* @param session the session
* @return a unique name
*/
public synchronized String getTempTableName(Session session) {
public synchronized String getTempTableName(String baseName, Session session) {
String tempName;
do {
tempName = "TEMP_TABLE_" + session.getId() + "_" + nextTempTableId++;
tempName = baseName + "_COPY_" + session.getId() + "_" + nextTempTableId++;
} while (mainSchema.findTableOrView(session, tempName) != null);
return tempName;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论