Prepared parameters inside IN lists with tuples may cause an error
Details
| Detail name | Value |
|---|---|
| Changelog Number | 29565 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 2025.1.0, Exasol 2025.2.0 |
| Fix Versions | Exasol 2026.1.0, Exasol 2025.1.11 |
| Resolution Date | 2026-05-15 |
Description
Valid queries using prepared parameters inside IN lists with tuples may lead to the incorrect error “type error: too large character string type”. This only happens if the following conditions apply:
- An IN list with tuples is inside a query.
- A tuple in the IN list contains at least one prepared parameters.
- The IN list is on an outer query.
- An inner query is materialized by the database (e.g., due to a UNION ALL or OUTER JOIN).
- The IN list is applicable on the inner query (e.g., the UNION ALL).
Example:
CREATE OR REPLACE TABLE T(x INT, y VARCHAR(100)); INSERT INTO t VALUES (1,'a'),(2,'b'),(3,'d'); -- Expected (with 'c'): 1 row -- Observed: Error: type error: too large character string type WITH t2 AS (SELECT 'c' AS q FROM DUAL UNION ALL SELECT 'd' AS q FROM DUAL ) SELECT * FROM t2 WHERE (q, q) IN ((?,'c'));
Workaround
Remove the IN list:
-- Observed (with 'c'): 1 row WITH t2 AS (SELECT 'c' AS q FROM DUAL UNION ALL SELECT 'd' AS q FROM DUAL ) SELECT * FROM t2 WHERE q = ? and q ='c';
Fix
The queries work as intended.