Process crash, if predicate in join ON-clause is not a boolean expression.

Details

Detail name Value
Changelog Number 7004
Type Bug
Status Resolved
Affected Versions Exasol 6.0.11
Fix Versions Exasol 6.0.14
Resolution Date 2018-12-18

Description

Predicate in a join clause should be a boolean expression.  

Example

In this example, there is an expression in ON which is not a boolean expression:

create table x( 
   a int
);

create table y(
    b int
);

create table z(
    c int
);

SELECT distinct
x.a
FROM  x INNER JOIN  y 
ON x.a = y.b
AND (SELECT max(z.c) as max_c FROM  z)  ;

This expression:

 SELECT max(z.c) as max_c FROM  z

in ON clause causes an internal server error and crashes. It is not a boolean expression. Expected is an exception.

Typical usage of such expression is:

(SELECT max(z.c) as max_c FROM  z) > a_number

Change

Now the expression leads to a boolean result and the statement will work as expected.