influxdata/influxdb · error · Error
must provide only one InfluxQl statement per query
Error message
must provide only one InfluxQl statement per query
What it means
Raised when an InfluxQL request contains more than one statement. The v1-compatibility query endpoint accepts exactly one InfluxQL statement per request; batched statements separated by semicolons are rejected with this fixed message.
Solutions
- Split the statements into separate HTTP requests, one query per call.
- Strip any trailing/intermediate semicolons from the q parameter.
- Update migration scripts to issue sequential single-statement requests.
Example fix
// before curl 'http://localhost:8181/query?db=mydb' --data-urlencode 'q=SELECT * FROM a; SELECT * FROM b' // after curl 'http://localhost:8181/query?db=mydb' --data-urlencode 'q=SELECT * FROM a' curl 'http://localhost:8181/query?db=mydb' --data-urlencode 'q=SELECT * FROM b'
Defensive patterns
Strategy: validation
Validate before calling
const stmts = q.split(';').map(s => s.trim()).filter(Boolean);
if (stmts.length > 1) throw new Error('send each statement in its own request'); Prevention
- Strip semicolons before sending q
- Loop over statements client-side, one request each
- Reject multi-statement input in your tooling before it hits the server
When it happens
Trigger: POSTing or GETting `q=SELECT ...; SELECT ...` (or any semicolon-separated pair of statements) to the /query InfluxQL endpoint.
Common situations: Scripts copied from InfluxDB 1.x tooling that batched multiple statements; migration scripts sending several queries in one HTTP call for efficiency.
Understand the failure class
Background: "Invalid query parameter" / "Failed to parse value of ...": fixing bad query string parameters across APIs — this error's family across 36 libraries.
Related errors
- Database not found
- datafusion error
- datafusion error
- error in InfluxQL statement
- error in InfluxQL statement
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/b113e2f099112e20.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_server/src/http.rs:332
#[error("datafusion error: {0}")]
Datafusion(#[from] DataFusionError),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("query error: {0}")]
Query(#[from] QueryExecutorError),
#[error(transparent)]
DbName(#[from] ValidateDbNameError),
#[error("partial write of line protocol occurred")]
PartialLpWrite(BufferedWriteRequest),
#[error("error in InfluxQL statement: {0}")]
InfluxqlRewrite(#[from] rewrite::Error),
#[error("must provide only one InfluxQl statement per query")]
InfluxqlSingleStatement,
#[error("must specify a 'db' parameter, or provide the database in the InfluxQL query")]
InfluxqlNoDatabase,
#[error(
"provided a database in both the parameters ({param_db}) and \
query string ({query_db}) that do not match, if providing a query \
that specifies the database, you can omit the 'database' parameter \
from your request"
)]
InfluxqlDatabaseMismatch { param_db: String, query_db: String },
#[error("Operation with object store failed: {0}")]
ObjectStore(#[from] object_store::Error),
#[error("heap dump failed: {0}")]
HeapPprof(#[from] jemalloc_pprof_http::Error),View on GitHub (pinned to 06200ef96b)