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

jdbc: inserted rows are still in cache after execute #1496

Closed
vagetablechicken opened this issue Mar 22, 2022 · 1 comment · Fixed by #1511
Closed

jdbc: inserted rows are still in cache after execute #1496

vagetablechicken opened this issue Mar 22, 2022 · 1 comment · Fixed by #1511
Assignees
Labels
bug Something isn't working

Comments

@vagetablechicken
Copy link
Collaborator

boolean ok = router.ExecuteInsert(db, currentSql, currentRows, status);

We should delete currentRows after ExecuteInsert.
So that, we can do

while:
  stmt.setXX()
  stmt.execute()
@vagetablechicken vagetablechicken added the bug Something isn't working label Mar 22, 2022
@vagetablechicken vagetablechicken self-assigned this Mar 22, 2022
@vagetablechicken
Copy link
Collaborator Author

vagetablechicken commented Mar 23, 2022

InsertPreparedStatementImpl problems:

  1. addBatch(String s): jdbc notes that 'This method cannot be called on a PreparedStatement or CallableStatement'. We shouldn't impl it. So that, sqlRowsMap is useless.
  2. sqlRowsMap: remove this.
  3. addBatch(): it'll add a new row in SQLInsertRows. execute/executeBatch will do rows insertion, and delete the rows(no matter ok or failed). If SQLInsertRows.GetCnt > 1, we can force to use executeBatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant