Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-2473

WHERE clause with contradicting condition should return no rows

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 8.1
    • Query Engine
    • None

      Using Eclipse datasource explorer with teiid connection using SHOWPLAN to demonstrate the problem.

      Enter: SELECT * FROM SECURITY.SYSINFO WHERE SYSID = 'DE29 AND SYSID <> 'DE29'

      USER COMMAND appears as: SELECT * FROM SECURITY.SYSINFO WHERE SYSID = 'DE29

      Apparently conflicting "AND SYSID <> 'DE29'" is dropped and I get results from SYSID = 'DE29'.

      Enter: SELECT * FROM SECURITY.SYSINFO WHERE SYSID <> 'DE29' AND SYSID = 'DE29'

      USER COMMAND appears as: SELECT * FROM SECURITY.SYSINFO WHERE 1 = 0

      And I get expected null result set.

      Admittedly irrational query but it should give empty result set however you order the WHERE clause conditions.

            rhn-engineering-shawkins Steven Hawkins
            bluesgtrst Jeff Hayes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: