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

Fixes #2923 when using EncryptPreparedStatement to savebatch occours error #2977

Closed
wants to merge 2 commits into from
Closed

Conversation

xiyelife
Copy link
Contributor

@xiyelife xiyelife commented Sep 5, 2019

Fixes #ISSUSE_ID.

Changes proposed in this pull request:
fix the mybatis setQueryTimeout() NPE

Fixes bugfix for #2923  when using EncryptPreparedStatement to savebatch occours error
create the preparedStatement when it it null
 fix the mybatis setQueryTimeout NPE
@coveralls
Copy link

Pull Request Test Coverage Report for Build 290

  • 2 of 4 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 64.945%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/EncryptPreparedStatement.java 2 4 50.0%
Totals Coverage Status
Change from base Build 315: -0.007%
Covered Lines: 9217
Relevant Lines: 14192

💛 - Coveralls

@tristaZero
Copy link
Contributor

@xiyelife Hi, thanks for your pr, but can you tell me why you add this judgement of null == encryptStatment? Is there any scenario?

@xiyelife
Copy link
Contributor Author

xiyelife commented Sep 5, 2019

as the issue says: #2923 (comment)
when mybatis prepare the statement, it will set the queryTimeout ,but the preparedStatement does not created at this time, and the NPE occured

@tristaZero
Copy link
Contributor

@xiyelife Got it, but if mybatis prepares a statement, the fisrt thing it should do is to create a statement, is't right? Can you debug your program and check whether mybatis creates an EncryptPreparedStatement?

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

Successfully merging this pull request may close these issues.

None yet

4 participants