Skip to content
Snippets Groups Projects
Unverified Commit 88d938a2 authored by 曹华栋's avatar 曹华栋 Committed by GitHub
Browse files

bugfix: do not call setBlob to invalid the jdbc exception (#3555)

parent 3d87b000
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#3481](https://github.com/seata/seata/pull/3481)] 修复当 consul client 获取集群信息报错时会导致刷新任务中断
- [[#3491](https://github.com/seata/seata/pull/3491)] 修复README.md文件中的拼写错误
- [[#3531](https://github.com/seata/seata/pull/3531)] 修复RedisTransactionStoreManager读取brachTransaction中的NPE
- [[#3555](https://github.com/seata/seata/pull/3555)] 通过setBytes代替setBlob,避免高版本jdbc驱动工作异常
- [[#3540](https://github.com/seata/seata/pull/3540)] 修复server发布打包时缺失文件
### optimize:
......
......@@ -44,9 +44,9 @@
- [[#3481](https://github.com/seata/seata/pull/3481)] fix seata node refresh failure because consul crash
- [[#3491](https://github.com/seata/seata/pull/3491)] fix typo in README.md
- [[#3531](https://github.com/seata/seata/pull/3531)] fix the NPE of RedisTransactionStoreManager when get branch transactions
- [[#3555](https://github.com/seata/seata/pull/3555)] do not call setBlob to invalid the jdbc exception
- [[#3540](https://github.com/seata/seata/pull/3540)] fix server distribution missing files
### optimize:
- [[#3383](https://github.com/seata/seata/pull/3383)] optimize StatementProxyTest unit test
......
......@@ -28,6 +28,7 @@ import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.JSON;
import io.seata.common.util.BlobUtils;
import io.seata.common.util.IOUtil;
import io.seata.common.util.StringUtils;
import io.seata.config.ConfigurationFactory;
......@@ -162,7 +163,7 @@ public abstract class AbstractUndoExecutor {
if (type == JDBCType.BLOB.getVendorTypeNumber()) {
SerialBlob serialBlob = (SerialBlob) value;
if (serialBlob != null) {
undoPST.setBlob(undoIndex, serialBlob.getBinaryStream());
undoPST.setBytes(undoIndex, BlobUtils.blob2Bytes(serialBlob));
} else {
undoPST.setObject(undoIndex, null);
}
......
......@@ -21,7 +21,6 @@ import java.sql.SQLException;
import java.util.Date;
import io.seata.common.loader.LoadLevel;
import io.seata.common.util.BlobUtils;
import io.seata.core.compressor.CompressorType;
import io.seata.core.constants.ClientTableColumnsName;
import io.seata.rm.datasource.undo.AbstractUndoLogManager;
......@@ -86,7 +85,7 @@ public class MySQLUndoLogManager extends AbstractUndoLogManager {
pst.setLong(1, branchId);
pst.setString(2, xid);
pst.setString(3, rollbackCtx);
pst.setBlob(4, BlobUtils.bytes2Blob(undoLogContent));
pst.setBytes(4, undoLogContent);
pst.setInt(5, state.getValue());
pst.executeUpdate();
} catch (Exception e) {
......
......@@ -16,7 +16,6 @@
package io.seata.rm.datasource.undo.oracle;
import java.io.ByteArrayInputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
......@@ -87,8 +86,7 @@ public class OracleUndoLogManager extends AbstractUndoLogManager {
pst.setLong(1, branchID);
pst.setString(2, xid);
pst.setString(3, rollbackCtx);
ByteArrayInputStream inputStream = new ByteArrayInputStream(undoLogContent);
pst.setBlob(4, inputStream);
pst.setBytes(4, undoLogContent);
pst.setInt(5, state.getValue());
pst.executeUpdate();
} catch (Exception e) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment