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

[seata-java] bugfix: mysql insert on update duplicate sensitive case not matched #700

Open
1 task
luky116 opened this issue Nov 23, 2024 · 4 comments
Open
1 task

Comments

@luky116
Copy link
Contributor

luky116 commented Nov 23, 2024

seata-java: apache/incubator-seata#4912

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

image

当数据库column为大写,而sql为小写时,读取parameter时匹配不上,造成了前镜像的sql为select * from table导致了全表扫描,后镜像也进行了一次全表扫描的bug

image

Ⅱ. Does this pull request fix one issue?

fixes #4909

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@ForestLH
Copy link

plz assign me, it is leehao

@ForestLH
Copy link

这个seata-java中的问题,在seata-go中不会出现。

在构造Column后,会使用小写。

for _, col := range colList {
list = append(list, col.Name.L)
}

我认为可以关闭这个issue。

@Code-Fight
Copy link
Contributor

这个seata-java中的问题,在seata-go中不会出现。

在构造Column后,会使用小写。

for _, col := range colList {
list = append(list, col.Name.L)
}

我认为可以关闭这个issue。

👍🏻,反过来,假设SQL是大写,这里自动使用column的小写,是否会有问题?

@ForestLH
Copy link

ForestLH commented Feb 6, 2025

这个seata-java中的问题,在seata-go中不会出现。
在构造Column后,会使用小写。

  [incubator-seata-go/pkg/datasource/sql/exec/at/insert_on_update_executor.go](https://github.com/apache/incubator-seata-go/blob/ad092d5eb331a86c850b48013e35a627c99e022c/pkg/datasource/sql/exec/at/insert_on_update_executor.go#L395-L397)


    Lines 395 to 397
  in
  [ad092d5](/apache/incubator-seata-go/commit/ad092d5eb331a86c850b48013e35a627c99e022c)





    
      
       for _, col := range colList { 
    

    
      
       	list = append(list, col.Name.L) 
    

    
      
       } 

我认为可以关闭这个issue。

👍🏻,反过来,假设SQL是大写,这里自动使用column的小写,是否会有问题?

抱歉这么久才来回复您,确实会有问题,在新的pr中已经修复,烦请review。

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

No branches or pull requests

3 participants