Skip to content

Conversation

@potoo0
Copy link
Contributor

@potoo0 potoo0 commented Aug 20, 2025

Summary

  • Override clearBatch for PreparedStatementImpl
  • Clears the internal batch state immediately after executeBatch() to prevent parameter leakage and enable safe statement reuse.

Closes #2548

Checklist

Delete items not relevant to your PR:

@CLAassistant
Copy link

CLAassistant commented Aug 20, 2025

CLA assistant check
All committers have signed the CLA.

@chernser
Copy link
Contributor

@potoo0 please sign CLA

@chernser
Copy link
Contributor

This change requires tests. I see only example code change (what is should not be).

Thanks!

@potoo0
Copy link
Contributor Author

potoo0 commented Aug 21, 2025

This change requires tests. I see only example code change (what is should not be).

@chernser
Thanks for the review! I've added the tests for this change.

@potoo0 potoo0 marked this pull request as ready for review August 21, 2025 15:30
@chernser chernser merged commit 036d128 into ClickHouse:main Aug 22, 2025
53 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jdbc-v2] Critical: executeBatch reuse causes duplicate data insertion after 0.8.6

3 participants