SQLITE_WARNING
SQLiteWARNINGCommonLoggingofficial confidence

Warning from sqlite3_log()

Production Risk

Low — warnings indicate potential performance issues, not failures.

What this means

SQLITE_WARNING (28) is passed to the sqlite3_log() callback for warnings — non-fatal issues that may indicate a misconfiguration or suboptimal usage, such as using an auto-index.

Why it happens
  1. 1SQLite created an automatic index to satisfy a query (SQLITE_WARNING_AUTOINDEX).
  2. 2Extension or VFS emitting a non-fatal warning.
How to reproduce

sqlite3_log() callback; not returned by API functions.

trigger — this will error
trigger — this will error
-- Trigger SQLITE_WARNING_AUTOINDEX:
PRAGMA automatic_index = ON;
CREATE TABLE a(x); CREATE TABLE b(x);
-- Unindexed join forces autoindex:
SELECT * FROM a JOIN b ON a.x = b.x;
-- Log will show: "automatic index on b(x)"

expected output

Log message: "automatic index on b(x)" with code SQLITE_WARNING_AUTOINDEX (284).

Fix

Version notes

Sources

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SQLite errors