Bug 1486872 - Incorrect results when executing simple SELECT queries
Summary: Incorrect results when executing simple SELECT queries
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid
Version: 6.4.0
Hardware: All
OS: All
unspecified
high
Target Milestone: ER3
: 6.4.0
Assignee: Van Halbert
QA Contact: Jan Stastny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-30 16:32 UTC by Cojan van Ballegooijen
Modified: 2018-02-13 17:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-13 17:39:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIID-5045 0 Blocker Resolved Rewriter allows "true" criteria to be modified 2017-11-20 13:22:04 UTC

Description Cojan van Ballegooijen 2017-08-30 16:32:58 UTC
Description of problem:
Incorrect results when executing simple SELECT queries

Version-Release number of selected component (if applicable):
6.3.6

How reproducible:
Use any deployed VDB and execute the following select statements

Steps to Reproduce:
1. Use any deployed VDB
2. Connect using JDBC client i.e. SQuirrelSQL
3. Run following query
3a. SELECT not(false)
3b. SELECT * FROM <model> where 1 = 1

Actual results 3a:
3a. SELECT not(false)
1st attempt returns true
2nd attempt returns false

Actual results 3b:
no rows returned

Expected results:

3a. true all the time
3b. all rows should be returned since 1 is equal to 1 = true

Additional info:
Tested it in 6.4 ER1 and seems to be fixed in this release.

Comment 2 Steven Hawkins 2017-08-30 18:11:40 UTC
As written this is not reproducible for me, but the issue here seems rooted in using the predicate "not(true)".  Due to how this is handled in the rewriter the constant representing true is modified, thus later queries become invalidated.  I've captured this as https://issues.jboss.org/browse/TEIID-5045


Note You need to log in before you can comment on or make changes to this bug.