
Consider the test case below. It is unexpected that the fourth query return `1 2`, as the above queries all return an empty result. Might be related to https://github.com/openlink/virtuoso-opensource/issues/1250

```sql
DROP TABLE t0;
DROP TABLE t1;

CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 INT);
INSERT INTO t1 ( c0) VALUES (1);
INSERT INTO t0 ( c0) VALUES (2);

SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)); -- empty table
SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE ''; -- empty table
SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE (NOT ''); -- empty table

SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE '' UNION ALL SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE (NOT '');
-- Expected: empty table
-- Actual: 1 2
```

Here's the version: Version 7.2.13-dev.3239-pthreads as of Mar 15 2024 (da40b02)


Unexpected results when using `INNER JOIN` and `UNION`
This is a GitHub Issue
repo:virtuoso-opensource
owner:openlink
Title : Unexpected results when using `INNER JOIN` and `UNION`
Issue date:

--- start body ---

Consider the test case below. It is unexpected that the fourth query return `1 2`, as the above queries all return an empty result. Might be related to https://github.com/openlink/virtuoso-opensource/issues/1250

```sql
DROP TABLE t0;
DROP TABLE t1;

CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 INT);
INSERT INTO t1 ( c0) VALUES (1);
INSERT INTO t0 ( c0) VALUES (2);

SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)); -- empty table
SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE ''; -- empty table
SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE (NOT ''); -- empty table

SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE '' UNION ALL SELECT * FROM t1 INNER  JOIN t0 ON (2 IN (1/3)) WHERE (NOT '');
-- Expected: empty table
-- Actual: 1 2
```

Here's the version: Version 7.2.13-dev.3239-pthreads as of Mar 15 2024 (da40b02)


--- end body ---
