Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mycat1.6.5-RELEASE ,insert语句/update语句报错NullPointerException #2951

Open
benbenbo opened this issue Jun 7, 2024 · 2 comments
Open
Assignees
Labels

Comments

@benbenbo
Copy link

benbenbo commented Jun 7, 2024

1、bug描述
output
在SpringBoot+Mybatis+MybatisPlus的应用程序里面,执行insert语句或者update语句,会偶然出现NullPointerException(10次大概只有1次成功)
根据堆栈,发现是Nativesession.queryserverVariable方法获取不到结果集导致的报错,这个获取数据库的只读状态的。

insert语句是手工写的,没有使用MybatisPlus的封装功能,是单行数据的插入

2、版本号(非常重要)
v 1.6.5-RELEASE

@benbenbo
Copy link
Author

benbenbo commented Jun 7, 2024

数据库用的是Mysql8.0版本

@benbenbo
Copy link
Author

benbenbo commented Jun 7, 2024

应该是批量更新导致,业务代码里面,有一个地方用mybatis的foreach标签来拼接多条update语句,改为逐条update语句之后就没有问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants