Issue Details (XML | Word | Printable)

Key: OPENJPA-54
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: George Hongell
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenJPA

bad sql pushdown, should use all syntax

Created: 19/Sep/06 01:25 AM   Updated: 01/Mar/07 02:20 AM
Return to search
Component/s: query
Affects Version/s: None
Fix Version/s: 0.9.7

Time Tracking:
Not Specified

File Attachments:
  Size
Java Archive File failureEntities.jar 2006-09-20 01:30 AM George Hongell 7 kB
Environment: Windows xp, derby, db2

Resolution Date: 01/Mar/07 02:20 AM


 Description  « Hide
454 bad sql pushdown, should use all syntax
 TEST454; select e from EmpBean e where e.empid not in (select e.no from DeptBean e)
Scalar subquery is only allowed to return a single row. {prepstmnt 241176160 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE (NOT (t0.empid = (SELECT t1.deptno FROM DeptBean t1)) AND t0.empid IS NOT NULL)} [code=30000, state=21000]
s/b
select t0.empid from EMPBean t0 where ( t0.empid <> ALL ( select t2.deptno from DEPTbean t2) )

  [ FAILED 454- bucket = fvtfull, query = select e from EmpBean e where e.empid not in (select e.no from DeptBean e) :
   DIFFERENCE-locations based on expected-(
diff at line 2 position 2 EXPECTED [T] ACTUAL [ ]
 TEST454; 0 tuples
                                                                                                                                                                                                                                                                                                                e
)
   EXPECTED(
 TEST454; select e from EmpBean e where e.empid not in (select e.no from DeptBean e)
 TEST454; 0 tuples )
   ACTUAL(
 TEST454; select e from EmpBean e where e.empid not in (select e.no from DeptBean e)
                                                                                                                                                                                                                                                                                                                e
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scalar subquery is only allowed to return a single row. {prepstmnt 241176160 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE (NOT (t0.empid = (SELECT t1.deptno FROM DeptBean t1)) AND t0.empid IS NOT NULL)} [code=30000, state=21000]
 TEST454; 1 tuple) ]



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
George Hongell made changes - 20/Sep/06 01:30 AM
Field Original Value New Value
Attachment failureEntities.jar [ 12341172 ]
David Wisneski made changes - 01/Feb/07 01:25 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]
Patrick Linskey made changes - 01/Mar/07 02:17 AM
Status Closed [ 6 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Patrick Linskey made changes - 01/Mar/07 02:18 AM
Fix Version/s 0.9.7 [ 12312340 ]
Patrick Linskey made changes - 01/Mar/07 02:20 AM
Status Reopened [ 4 ] Closed [ 6 ]
Resolution Fixed [ 1 ]