Informix Error -26050: Function (explain_sql) does not support a query with host variables.
Cause and resolution
Function (explain_sql) does not support a query with host variables.
Explain_sql only supports a single SELECT statement without any host variables. Please change your query.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26050 fires when the query passed to explain_sql contains host variables — per the
official guidance.
- The query contains one or more host variables, per the official guidance — the
direct, only cause;
explain_sqlonly supports a singleSELECTstatement without host variables.
Solutions / Resolution
- Change the query so it contains no host variables, per the official guidance.
Examples
A query with a host variable
EXEC SQL EXECUTE FUNCTION explain_sql('SELECT * FROM t1 WHERE id = ?', :id);
-- -26050: host variable placeholder not supported
Diagnostic Checks
- Check the query text passed to
explain_sql, and remove any host variable placeholders.
Related Errors / Related Topics
- -26047 — "Function (explain_sql) does not support the query provided in (%s). Only a
single select statement is supported." A related
explain_sqlquery-support restriction, on non-SELECTstatements rather than host variables within aSELECT.
explain_sql was given a query containing host variables — remove them; only a plain
SELECT is supported.