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

Error in error log; (21) API called with NULL prepared statement #3600

Open
chrisjlocke opened this issue Apr 1, 2024 Discussed in #3598 · 2 comments
Open

Error in error log; (21) API called with NULL prepared statement #3600

chrisjlocke opened this issue Apr 1, 2024 Discussed in #3598 · 2 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs. Execute SQL release blocker Bugs that are serious enough to block our next release

Comments

@chrisjlocke
Copy link
Member

chrisjlocke commented Apr 1, 2024

Discussed in #3598

Originally posted by Moaneschien March 28, 2024
Before report it as a bug, after running the query below, the error pane says:

(21) API called with NULL prepared statement
(21) misuse at line 90775 of [d8cd6d49b4]

the result of the query is fine. I've seen it a few times before but didn't pay much attention as the results are ok. This one I caught. Checked it against SQLite 3.45.1 from the command line and it works fine, as expected. Is it a bug?

DB Browser for SQLite Version 3.13.99 (Mar 26 2024)
Last commit hash when built: 3e7dd41

Win 11
CREATE TABLE observationPT10M (
  ds  TEXT NOT NULL,  --'%F'
  pt10m INTEGER NOT NULL, --10 min index, 1 - 144
  energy_consumed Real,
  energy_returned Real,
  UNIQUE(ds,pt10m)
) STRICT;
CREATE UNIQUE INDEX idx_dspt10m 
    ON observationPT10M (ds, pt10m);
SELECT ds,
       max(energy_consumed), 
       max(energy_returned)
  FROM observationPT10M
 GROUP BY strftime('%Y', ds)
;

At the least, running this statement generates the error.

CREATE UNIQUE INDEX idx_dspt10m 
    ON observationPT10M (ds, pt10m);
@chrisjlocke chrisjlocke added bug Confirmed bugs or reports that are very likely to be bugs. Execute SQL labels Apr 1, 2024
@chrisjlocke
Copy link
Member Author

Confirmed in both the nightly and rc1 of 3.13. In both versions, the line number and GUID is different (which sort of makes sense).

@justinclift
Copy link
Member

Sounds like something we'd better investigate and fix before the 3.13 release too.

@justinclift justinclift added the release blocker Bugs that are serious enough to block our next release label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs. Execute SQL release blocker Bugs that are serious enough to block our next release
Projects
None yet
Development

No branches or pull requests

2 participants