SQLException: The prepared statement has been finalized

Aperta
#731 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, sqlite
Ambito
database

Direzione di ricerca

Start with org.sqlite.core.DB.execute, CoreStatement.exec, and JDBC3Statement.execute from the stack trace, then compare how the JDBC driver handles the ; query with the CLI. Use the supplied Java reproduction to confirm the finalized-statement error; done means the JDBC behavior is understood and the issue's expected behavior is resolved.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

waiting for feedback

Hi, when I execute the query ";" in the JDBC and get the "The prepared statement has been finalized" error, but there is no error when I execute the query ";" in the cli.

Reproducible test case:

...
Connection connection = connection = DriverManager.getConnection("jdbc:sqlite:sample.db");
Statement statement = connection.createStatement();
statement.executeUpdate(";");
...

The stack trace:

java.lang.AssertionError: ;
        at Sample.Main(Sample.java:17)
Caused by: java.sql.SQLException: The prepared statement has been finalized
        at org.sqlite.core.NativeDB.throwex(NativeDB.java:406)
        at org.sqlite.core.NativeDB.step(Native Method)
        at org.sqlite.core.DB.execute(DB.java:962)
        at org.sqlite.core.CoreStatement.exec(CoreStatement.java:74)
        at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:41)

SQLite3 JDBC version:
3.36.0.3

Is it expected?

Lingua principale
Java
Stelle
3.3k
Fork
676
Merge medio
1g 15h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xerial/sqlite-jdbc

Tutte le issue di xerial/sqlite-jdbc

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.