oceanbase数据库 使用mybatisplus的updateBatchById方法报语法不支持

之前用的mysql,没有问题;
现在数据库切换成了oceanbase,使用mybatisplus的updateBatchById方法报错;Not supported feature or function

报错异常如下:

Error flushing statements. Cause: java.sql.SQLException: Not supported feature or function

Cause: java.sql.SQLException: Not supported feature or function

; uncategorized SQLException; SQL state [0A000]; error code [1235]; Not supported feature or function; nested exception is java.sql.SQLException: Not supported feature or function

你使用的是哪个版本的OceanBase?

我用的命令 SHOW variables like ‘%version%’
查询到的版本号:5.7.25-OceanBase_CE-v4.2.0.0

谢谢,已经找到解决方案了
JDBC 连接池配置:
rewriteBatchedStatements和allowMultiQueries需要都配置上,之前只配置了rewriteBatchedStatements=true

参考:https://www.oceanbase.com/docs/enterprise-oceanbase-database-cn-10000000000356671

1 个赞