Skip to content

Commit

Permalink
optimize: refactor ColumnUtils and EscapeHandler (apache#5456)
Browse files Browse the repository at this point in the history
# Conflicts:
#	rm-datasource/src/main/java/io/seata/rm/datasource/exec/BaseTransactionalExecutor.java
#	rm-datasource/src/main/java/io/seata/rm/datasource/exec/UpdateExecutor.java
#	rm-datasource/src/main/java/io/seata/rm/datasource/sql/handler/mariadb/MariadbEscapeHandler.java
#	rm-datasource/src/main/java/io/seata/rm/datasource/sql/handler/mysql/MySQLEscapeHandler.java
#	rm-datasource/src/main/java/io/seata/rm/datasource/sql/handler/oracle/OracleEscapeHandler.java
#	rm-datasource/src/main/java/io/seata/rm/datasource/sql/handler/postgresql/PostgresqlEscapeHandler.java
#	rm-datasource/src/main/resources/META-INF/services/io.seata.sqlparser.EscapeHandler
#	rm-datasource/src/test/java/io/seata/rm/datasource/ColumnUtilsTest.java
#	rm-datasource/src/test/java/io/seata/rm/datasource/sql/handler/EscapeHandlerTest.java
#	sqlparser/seata-sqlparser-core/src/main/java/io/seata/sqlparser/EscapeHandler.java
#	sqlparser/seata-sqlparser-core/src/main/java/io/seata/sqlparser/EscapeSymbol.java
#	sqlparser/seata-sqlparser-core/src/main/java/io/seata/sqlparser/KeywordChecker.java
#	sqlparser/seata-sqlparser-core/src/main/java/io/seata/sqlparser/util/ColumnUtils.java
  • Loading branch information
Bughue committed Nov 7, 2023
1 parent 4177462 commit 0f93213
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 2 deletions.
65 changes: 64 additions & 1 deletion changes/en-us/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ The version is updated as follows:
- [[#3887](https://github.com/seata/seata/pull/3887)] add SQL Server database support in AT mode
- [[#4033](https://github.com/seata/seata/pull/4033)] add SQLServer support for Server DB storage mode
- [[#5717](https://github.com/seata/seata/pull/5717)] compatible with file.conf and registry.conf configurations in version 1.4.2 and below
- [[#5842](https://github.com/seata/seata/pull/5842)] adding metainfo to docker image
- [[#5902](https://github.com/seata/seata/pull/5902)] support IPv6
- [[#5907](https://github.com/seata/seata/pull/5907)] support polardb-x 2.0 in AT mode
- [[#5932](https://github.com/seata/seata/pull/5932)] support Dameng database
- [[#5946](https://github.com/seata/seata/pull/5946)] add sqlserver's adaptation to the console paging interface
- [[#5226](https://github.com/seata/seata/pull/5226)] support raft cluster and store mode

### bugfix:
- [[#5677](https://github.com/seata/seata/pull/5677)] fix saga mode serviceTask inputParams json autoType convert exception
Expand Down Expand Up @@ -67,8 +73,23 @@ The version is updated as follows:
- [[#5748](https://github.com/seata/seata/pull/5748)] case of the pk col-name in the business sql is inconsistent with the case in the table metadata, resulting in a rollback failure
- [[#5745](https://github.com/seata/seata/pull/5745)] fix the problem that the parameter prefix requirement of the setAttachment method in sofa-rpc is not met
- [[#5772](https://github.com/seata/seata/pull/5762)] change some fields type of TableMetaCache to avoid integer overflow
- [[#5787](https://github.com/seata/seata/pull/5794)] Solution cluster cannot be customized when redis serves as the registry
- [[#5810](https://github.com/seata/seata/pull/5810)] fix XA transaction start exception and rollback failure caused by druid dependency conflict
- [[#5821](https://github.com/seata/seata/pull/5821)] fix insert executor keywords unescape
- [[#5835](https://github.com/seata/seata/pull/5835)] bugfix: fix TC retry rollback wrongly, after the XA transaction fail and rollback
- [[#5881](https://github.com/seata/seata/pull/5880)] fix delete branch table unlock failed
- [[#5930](https://github.com/seata/seata/pull/5930)] fix the issue of missing sentinel password in store redis mode
- [[#5958](https://github.com/seata/seata/pull/5958)] required to be unlocked when a re-election occurs in a commit state
- [[#5971](https://github.com/seata/seata/pull/5971)] fix some configurations that are not deprecated show "Deprecated"
- [[#5977](https://github.com/seata/seata/pull/5977)] fix that rpcserver is not closed when raftServer is closed
- [[#5954](https://github.com/seata/seata/pull/5954)] fix the issue of saved branch session status does not match the actual branch session status
- [[#5990](https://github.com/seata/seata/pull/5990)] fix the issue that the Lua script is not synchronized when the redis sentinel master node is down
- [[#5887](https://github.com/seata/seata/pull/5887)] fix global transaction hook repeat execute


### optimize:
- [[#5966](https://github.com/seata/seata/pull/5966)] decouple saga expression handling and remove evaluator package
- [[#5928](https://github.com/seata/seata/pull/5928)] add Saga statelang semantic validation
- [[#5208](https://github.com/seata/seata/pull/5208)] optimize throwable getCause once more
- [[#5212](https://github.com/seata/seata/pull/5212)] optimize log message level
- [[#5237](https://github.com/seata/seata/pull/5237)] optimize exception log message print(EnhancedServiceLoader.loadFile#cahtch)
Expand Down Expand Up @@ -108,11 +129,37 @@ The version is updated as follows:
- [[#5680](https://github.com/seata/seata/pull/5680)] optimize escape character for case of columnNames
- [[#5714](https://github.com/seata/seata/pull/5714)] optimize distributed lock log
- [[#5723](https://github.com/seata/seata/pull/5723)] optimize docker default timezone
- [[#5779](https://github.com/seata/seata/pull/5779)] remove unnecessary log outputs and unify the log output path.
- [[#5802](https://github.com/seata/seata/pull/5802)] set server's transaction level to READ_COMMITTED
- [[#5783](https://github.com/seata/seata/pull/5783)] support the nacos application name property
- [[#5524](https://github.com/seata/seata/pull/5524)] support for more operational commands in seata-server.sh
- [[#5836](https://github.com/seata/seata/pull/5836)] separate MySQL from Mariadb implementations
- [[#5869](https://github.com/seata/seata/pull/5869)] some minor syntax optimization
- [[#5885](https://github.com/seata/seata/pull/5885)] optimize log in ConnectionProxyXA
- [[#5894](https://github.com/seata/seata/pull/5894)] remove dependency without license
- [[#5895](https://github.com/seata/seata/pull/5895)] remove 7z format compression support
- [[#5896](https://github.com/seata/seata/pull/5896)] remove mariadb.jdbc dependency
- [[#5384](https://github.com/seata/seata/pull/5384)] unified project version
- [[#5419](https://github.com/seata/seata/pull/5419)] publish images based on java 8/17 and support maven-3.9.0
- [[#5829](https://github.com/seata/seata/pull/5829)] fix codecov chart not display
- [[#5878](https://github.com/seata/seata/pull/5878)] optimize `httpcore` and `httpclient` dependencies
- [[#5917](https://github.com/seata/seata/pull/5917)] upgrade native-lib-loader version
- [[#5926](https://github.com/seata/seata/pull/5926)] optimize some scripts related to Apollo
- [[#5938](https://github.com/seata/seata/pull/5938)] support jmx port in seata
- [[#5951](https://github.com/seata/seata/pull/5951)] remove un support config in jdk17
- [[#5959](https://github.com/seata/seata/pull/5959)] modify code style and remove unused import
- [[#4473](https://github.com/seata/seata/pull/4473)] rm appdata size limit


### security:
- [[#5642](https://github.com/seata/seata/pull/5642)] add Hessian Serializer WhiteDenyList
- [[#5694](https://github.com/seata/seata/pull/5694)] fix several node.js security vulnerabilities
- [[#5801](https://github.com/seata/seata/pull/5801)] fix some dependencies vulnerability
- [[#5805](https://github.com/seata/seata/pull/5805)] fix some serializer vulnerabilities
- [[#5868](https://github.com/seata/seata/pull/5868)] fix npm package vulnerabilities
- [[#5916](https://github.com/seata/seata/pull/5916)] upgrade nodejs dependency
- [[#5942](https://github.com/seata/seata/pull/5942)] upgrade dependencies version
- [[#5987](https://github.com/seata/seata/pull/5987)] upgrade some dependencies version

### test:
- [[#5308](https://github.com/seata/seata/pull/5308)] add unit test [FileLoader, ObjectHolder, StringUtils]
Expand All @@ -124,6 +171,14 @@ The version is updated as follows:
- [[#5428](https://github.com/seata/seata/pull/5428)] fix FileTransactionStoreManagerTest failed
- [[#5622](https://github.com/seata/seata/pull/5622)] add unit test [ExporterType, RegistryType]
- [[#5637](https://github.com/seata/seata/pull/5637)] add unit test [BatchResultMessage, HeartbeatMessage, RegisterRMResponse, ResultCode, RegisterTMResponse, MergeResultMessage, MergedWarpMessage, Version]
- [[#5893](https://github.com/seata/seata/pull/5893)] remove sofa test cases
- [[#5845](https://github.com/seata/seata/pull/5845)] upgrade druid and add `test-druid.yml`
- [[#5863](https://github.com/seata/seata/pull/5863)] fix unit test in java 21
- [[#5986](https://github.com/seata/seata/pull/5986)] fix zookeeper UT failed
- [[#5995](https://github.com/seata/seata/pull/5995)] add test cases for RaftClusterMetadataMsg
- [[#6001](https://github.com/seata/seata/pull/6001)] add test cases for RaftMsgExecute under branch package
- [[#5996](https://github.com/seata/seata/pull/5996)] add test cases for RaftMsgExecute under global package
- [[#6003](https://github.com/seata/seata/pull/6003)] add test cases for RaftMsgExecute under lock package


### Contributors:
Expand All @@ -141,7 +196,7 @@ Thanks to these contributors for their code commits. Please report an unintended
- [pengten](https://github.com/pengten)
- [wangliang181230](https://github.com/wangliang181230)
- [GoodBoyCoder](https://github.com/GoodBoyCoder)
- [a364176773](https://github.com/a364176773)
- [funky-eyes](https://github.com/funky-eyes)
- [isharpever](https://github.com/isharpever)
- [mxsm](https://github.com/mxsm)
- [liuqiufeng](https://github.com/liuqiufeng)
Expand All @@ -153,6 +208,14 @@ Thanks to these contributors for their code commits. Please report an unintended
- [yixia](https://github.com/wt-better)
- [capthua](https://github.com/capthua)
- [robynron](https://github.com/robynron)
- [XQDD](https://github.com/XQDD)
- [Weelerer](https://github.com/Weelerer)
- [Ifdevil](https://github.com/Ifdevil)
- [iquanzhan](https://github.com/iquanzhan)
- [leizhiyuan](https://github.com/leizhiyuan)
- [Aruato](https://github.com/Aruato)
- [ptyin](https://github.com/ptyin)
- [jsbxyyx](https://github.com/jsbxyyx)


Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
Expand Down
68 changes: 67 additions & 1 deletion changes/zh-cn/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#3887](https://github.com/seata/seata/pull/3887)] 增加AT模式的SQLServer数据库支持
- [[#4033](https://github.com/seata/seata/pull/4033)] 增加ServerDB存储模式的SQLServer支持
- [[#5717](https://github.com/seata/seata/pull/5717)] 兼容1.4.2及以下版本的file.conf/registry.conf配置
- [[#5842](https://github.com/seata/seata/pull/5842)] 构建docker 镜像时添加相关git信息,方便定位代码关系
- [[#5902](https://github.com/seata/seata/pull/5902)] 支持IPv6网络环境
- [[#5907](https://github.com/seata/seata/pull/5907)] 增加AT模式的PolarDB-X 2.0数据库支持
- [[#5932](https://github.com/seata/seata/pull/5932)] AT模式支持达梦数据库
- [[#5946](https://github.com/seata/seata/pull/5946)] 增加sqlserver对控制台分页接口的适配
- [[#5226](https://github.com/seata/seata/pull/5226)] 支持Raft集群部署和事务存储模式

### bugfix:
- [[#5677](https://github.com/seata/seata/pull/5677)] 修复saga模式下serviceTask入参autoType转化失败问题
Expand Down Expand Up @@ -66,8 +72,23 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5748](https://github.com/seata/seata/pull/5748)] 修复在某些情况下,业务sql中主键字段名大小写与表元数据中的不一致,导致回滚失败
- [[#5745](https://github.com/seata/seata/pull/5745)] 修复不满足 sofa-rpc 中 setAttachment 方法的参数前缀要求问题
- [[#5772](https://github.com/seata/seata/pull/5762)] 修复TableMetaCache的一些字段类型,避免溢出
- [[#5787](https://github.com/seata/seata/pull/5794)] 解决redis作为注册中心时cluster无法自定义的BUG
- [[#5810](https://github.com/seata/seata/pull/5810)] 修复druid依赖冲突导致的XA事务开始异常与回滚失败
- [[#5821](https://github.com/seata/seata/pull/5821)] 修复insert executor对关键字未转义的问题
- [[#5835](https://github.com/seata/seata/pull/5835)] bugfix: 修复当 XA 事务失败回滚后,TC 还会继续重试回滚的问题
- [[#5881](https://github.com/seata/seata/pull/5880)] 修复事务回滚时锁未删除的问题
- [[#5930](https://github.com/seata/seata/pull/5930)] 修复存储为redis哨兵模式下哨兵密码缺失的问题
- [[#5958](https://github.com/seata/seata/pull/5958)] 在二阶段提交状态下发生重选时需要进行解除全局锁
- [[#5971](https://github.com/seata/seata/pull/5971)] 修复某些未弃用的配置显示"已弃用"
- [[#5977](https://github.com/seata/seata/pull/5977)] 修复当raft server关闭时,rpc server未关闭的问题
- [[#5954](https://github.com/seata/seata/pull/5954)] 修复保存的分支会话状态与实际的分支会话状态不一致的问题
- [[#5990](https://github.com/seata/seata/pull/5990)] 修复redis sentinel master node 宕机时,lua脚本未同步的问题
- [[#5887](https://github.com/seata/seata/pull/5887)] 修复全局事务钩子重复执行


### optimize:
- [[#5966](https://github.com/seata/seata/pull/5966)] Saga 表达式解耦并统一格式
- [[#5928](https://github.com/seata/seata/pull/5928)] 增加Saga模式状态机语义验证阶段
- [[#5208](https://github.com/seata/seata/pull/5208)] 优化多次重复获取Throwable#getCause问题
- [[#5212](https://github.com/seata/seata/pull/5212)] 优化不合理的日志信息级别
- [[#5237](https://github.com/seata/seata/pull/5237)] 优化异常日志打印(EnhancedServiceLoader.loadFile#cahtch)
Expand Down Expand Up @@ -108,11 +129,37 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5680](https://github.com/seata/seata/pull/5680)] 优化大小写转义符
- [[#5714](https://github.com/seata/seata/pull/5714)] 优化分布式锁竞争日志
- [[#5723](https://github.com/seata/seata/pull/5723)] 优化docker镜像的默认时区
- [[#5779](https://github.com/seata/seata/pull/5779)] 删除无用的输出日志并统一日志输出路径
- [[#5802](https://github.com/seata/seata/pull/5802)] 优化server端事务隔离级别为读已提交
- [[#5783](https://github.com/seata/seata/pull/5783)] 支持nacos上application name配置
- [[#5524](https://github.com/seata/seata/pull/5524)] 支持 seata-server.sh 中的更多操作命令
- [[#5836](https://github.com/seata/seata/pull/5836)] 分离mariadb和mysql的AT实现
- [[#5869](https://github.com/seata/seata/pull/5869)] 优化一些小的语法
- [[#5885](https://github.com/seata/seata/pull/5885)] 优化ConnectionProxyXA中的日志
- [[#5894](https://github.com/seata/seata/pull/5894)] 移除无license组件
- [[#5895](https://github.com/seata/seata/pull/5895)] 移除7z压缩支持
- [[#5896](https://github.com/seata/seata/pull/5896)] 移除 mariadb.jdbc 依赖
- [[#5384](https://github.com/seata/seata/pull/5384)] 统一版本号管理,只需维护 `build/pom.xml` 中的版本号即可。
- [[#5419](https://github.com/seata/seata/pull/5419)] 发布基于多个java版本的docker镜像
- [[#5829](https://github.com/seata/seata/pull/5829)] 修正 `codecov chart` 不展示的问题
- [[#5878](https://github.com/seata/seata/pull/5878)] 优化 `httpcore``httpclient` 的依赖定义
- [[#5917](https://github.com/seata/seata/pull/5917)] 升级 native-lib-loader 版本
- [[#5926](https://github.com/seata/seata/pull/5926)] 优化一些与 Apollo 相关的脚本
- [[#5938](https://github.com/seata/seata/pull/5938)] 支持 jmx 监控配置
- [[#5951](https://github.com/seata/seata/pull/5951)] 删除在 jdk17 中不支持的配置项
- [[#5959](https://github.com/seata/seata/pull/5959)] 修正代码风格问题及去除无用的类引用
- [[#4473](https://github.com/seata/seata/pull/4473)] rm appdata大小限制


### security:
- [[#5642](https://github.com/seata/seata/pull/5642)] 增加Hessian 序列化黑白名单
- [[#5694](https://github.com/seata/seata/pull/5694)] 修复若干Node.js依赖安全漏洞
- [[#5801](https://github.com/seata/seata/pull/5801)] 修复Java依赖安全漏洞
- [[#5805](https://github.com/seata/seata/pull/5805)] 修复序列化漏洞
- [[#5868](https://github.com/seata/seata/pull/5868)] 修复npm package漏洞
- [[#5916](https://github.com/seata/seata/pull/5916)] 修复npm package漏洞
- [[#5942](https://github.com/seata/seata/pull/5942)] 升级依赖版本
- [[#5987](https://github.com/seata/seata/pull/5987)] 升级依赖版本

### test:
- [[#5308](https://github.com/seata/seata/pull/5308)] 添加单元测试用例 [FileLoader, ObjectHolder, StringUtils]
Expand All @@ -124,6 +171,14 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5428](https://github.com/seata/seata/pull/5428)] 修复 FileTransactionStoreManagerTest 单测失败问题
- [[#5622](https://github.com/seata/seata/pull/5622)] 添加单元测试用例 [ExporterType, RegistryType]
- [[#5637](https://github.com/seata/seata/pull/5637)] 添加单元测试用例 [BatchResultMessage, HeartbeatMessage, RegisterRMResponse, ResultCode, RegisterTMResponse, MergeResultMessage, MergedWarpMessage, Version]
- [[#5893](https://github.com/seata/seata/pull/5893)] 移除 sofa 测试用例
- [[#5845](https://github.com/seata/seata/pull/5845)] 升级 `druid` 版本,并添加 `test-druid.yml` 用于测试seata与druid各版本的兼容性。
- [[#5863](https://github.com/seata/seata/pull/5863)] 修复单元测试在Java21下无法正常运行的问题。
- [[#5986](https://github.com/seata/seata/pull/5986)] 修复 zookeeper 单测失败问题
- [[#5995](https://github.com/seata/seata/pull/5995)] 添加 RaftClusterMetadataMsg 模块的单元测试用例
- [[#6001](https://github.com/seata/seata/pull/6001)] 添加 RaftMsgExecute 模块 branch 包下的单元测试用例
- [[#5996](https://github.com/seata/seata/pull/5996)] 添加 RaftMsgExecute 模块 global 包下的单元测试用例
- [[#6003](https://github.com/seata/seata/pull/6003)] 添加 RaftMsgExecute 模块 lock 包下的单元测试用例


### Contributors:
Expand All @@ -141,7 +196,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [pengten](https://github.com/pengten)
- [wangliang181230](https://github.com/wangliang181230)
- [GoodBoyCoder](https://github.com/GoodBoyCoder)
- [a364176773](https://github.com/a364176773)
- [funky-eyes](https://github.com/funky-eyes)
- [isharpever](https://github.com/isharpever)
- [mxsm](https://github.com/mxsm)
- [liuqiufeng](https://github.com/liuqiufeng)
Expand All @@ -153,6 +208,17 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [yixia](https://github.com/wt-better)
- [capthua](https://github.com/capthua)
- [robynron](https://github.com/robynron)
- [XQDD](https://github.com/XQDD)
- [Weelerer](https://github.com/Weelerer)
- [Ifdevil](https://github.com/Ifdevil)
- [iquanzhan](https://github.com/iquanzhan)
- [leizhiyuan](https://github.com/leizhiyuan)
- [Aruato](https://github.com/Aruato)
- [ggbocoder](https://github.com/ggbocoder)
- [ptyin](https://github.com/ptyin)
- [jsbxyyx](https://github.com/jsbxyyx)



同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。

Expand Down

0 comments on commit 0f93213

Please sign in to comment.