This is an automated email from the ASF dual-hosted git repository.
jianbin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/develop by this push:
new 40c49f6f12 bugfix: fix dameng delete undo fail (#6716)
40c49f6f12 is described below
commit 40c49f6f125a3f24a66c481171571bb8eb30127f
Author: chd <[email protected]>
AuthorDate: Thu Aug 1 20:55:05 2024 +0800
bugfix: fix dameng delete undo fail (#6716)
---
changes/en-us/develop.md | 3 ++-
changes/zh-cn/develop.md | 3 ++-
.../io/seata/rm/datasource/undo/dm/DmUndoDeleteExecutor.java | 12 +++++++++++-
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/changes/en-us/develop.md b/changes/en-us/develop.md
index ae018ce099..334e1cdc0a 100644
--- a/changes/en-us/develop.md
+++ b/changes/en-us/develop.md
@@ -17,7 +17,8 @@ Add changes here for all PR submitted to the develop branch.
- [[#6632](https://github.com/seata/seata/pull/6632)] fix hsf ConsumerModel
convert error.
- [[#6661](https://github.com/seata/seata/pull/6661)] fix `tableMeta` cache
scheduled refresh issue
- [[#6715](https://github.com/apache/incubator-seata/pull/6715)] fix dameng
rollback info un compress fail
-
+- [[#6716](https://github.com/apache/incubator-seata/pull/6716)] fix dameng
delete undo fail
+-
### optimize:
- [[#6044](https://github.com/seata/seata/pull/6044)] optimize derivative
product check base on mysql
- [[#6361](https://github.com/seata/seata/pull/6361)] optimize 401 issues for
some links
diff --git a/changes/zh-cn/develop.md b/changes/zh-cn/develop.md
index b4878622da..15eedf9ea4 100644
--- a/changes/zh-cn/develop.md
+++ b/changes/zh-cn/develop.md
@@ -17,7 +17,8 @@
- [[#6632](https://github.com/seata/seata/pull/6632)] 修复 hsf ConsumerModel 转换错误
- [[#6661](https://github.com/seata/seata/pull/6661)] 修复`tableMeta`缓存定时刷新失效问题
- [[#6715](https://github.com/apache/incubator-seata/pull/6715)]
修复达梦数据库的getRollbackInfo没有解压缩的问题
--
+- [[#6716](https://github.com/apache/incubator-seata/pull/6716)]
修复达梦数据库的delete sql回滚失败的问题
+
### optimize:
- [[#6044](https://github.com/seata/seata/pull/6044)] 优化MySQL衍生数据库判断逻辑
- [[#6361](https://github.com/seata/seata/pull/6361)] 优化部分链接 401 的问题
diff --git
a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/dm/DmUndoDeleteExecutor.java
b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/dm/DmUndoDeleteExecutor.java
index c03865bd45..d9fd373676 100644
---
a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/dm/DmUndoDeleteExecutor.java
+++
b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/dm/DmUndoDeleteExecutor.java
@@ -69,7 +69,17 @@ public class DmUndoDeleteExecutor extends
AbstractUndoExecutor {
String insertValues = fields.stream().map(field -> "?")
.collect(Collectors.joining(", "));
- return String.format(INSERT_SQL_TEMPLATE, sqlUndoLog.getTableName(),
insertColumns, insertValues);
+ return "SET IDENTITY_INSERT " +
+ sqlUndoLog.getTableName() +
+ " ON; INSERT INTO " +
+ sqlUndoLog.getTableName() +
+ " (" +
+ insertColumns +
+ ") VALUES (" +
+ insertValues +
+ "); SET IDENTITY_INSERT " +
+ sqlUndoLog.getTableName() +
+ " OFF;";
}
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]