Error for prepared parameters in removable subqueries

Details

Detail name Value
Changelog Number 28636
Type Bug
Status Resolved
Affected Versions Exasol 8.29.0, Exasol 8.21.0, Exasol 2025.1.0, Exasol 2025.2.0
Fix Versions Exasol 2026.1.0, Exasol 2025.2.1, Exasol 2025.1.10
Resolution Date 2026-02-18

Description

Under specific conditions, the usage of prepared parameters in an INSERT can lead to an Internal Server error.
Necessary conditions:

  • The statement is an INSERT.
  • It contains a prepared parameter inside a Subquery.
  • The compiler can remove the subquery.

Example:

CREATE OR REPLACE TABLE T(x INT);

-- Expected: Inserted value
-- Observed: Internal Server Error
insert into T(X) SELECT A FROM (SELECT ? AS A FROM DUAL);

Workaround

It is necessary to modify the query so that the compiler does not remove the subquery.

insert into T(X) SELECT A FROM (SELECT ? AS A FROM DUAL ORDER BY FALSE);

Fix

The INSERT statement works as expected.