hanchuanchuan / goInception

一个集审核、执行、备份及生成回滚语句于一身的MySQL运维工具
https://hanchuanchuan.github.io/goInception/
GNU General Public License v3.0
1.6k stars 545 forks source link

SQL检测 扫描/影响行数 有问题与实际不符 #605

Closed a8159236 closed 9 months ago

a8159236 commented 10 months ago

描述 使用的是archery管理平台,SQL检测 扫描/影响行数 有问题,实际上只有两行数据修改,但是检测结果却显示影响行数有1111行?影响行数完全是 goinception 的返回,是不是goinception检测有问题?

重现 企业微信截图_16945765839281 企业微信截图_16945765383278

环境

a8159236 commented 10 months ago

image wokan我看有人遇到同样问题是要修改real_row_count参数,这个参数怎么修改,我是用docker启动的goinception

a8159236 commented 10 months ago

是直接在执行语句上面添加这一个参数吗? image

a8159236 commented 10 months ago

image image 是通过修改这个参数为true吗?等同于real_row_count ?

hanchuanchuan commented 9 months ago

请查看使用文档:https://hanchuanchuan.github.io/goInception/params.html

BearGuardian commented 4 months ago

请查看使用文档:https://hanchuanchuan.github.io/goInception/params.html

我这边加上了这个--real_row_count=true 同样的where条件 查询和 update预估的值还是不一样

BearGuardian commented 4 months ago

请查看使用文档:https://hanchuanchuan.github.io/goInception/params.html

我这边加上了这个--real_row_count=true 同样的where条件 查询和 update预估的值还是不一样

抓包看了下。 发现是goinception根据dml还原select语句时 条件变化了

# 更新语句
update tb_1 set column_a=1 where column_b like '%\_123';
# 还原的查询语句
select count(*) from tb_1 where column_b like '%_123';