Hi,
we've been using Squirrel since version 2.2 being really pleased with the maturity of the application. Recently however we encountered a strange behaviour that looks to me like bug in Squirrel.
Our system:
Squirrel version 3.0 (bug tested also on Squirrel 2.6 with no difference)
DB2 for z/OS version 9.01 (DSN09010)
IBM JDBC driver (com.ibm.db2.jcc.DB2Driver) version 3.53.70
We use the JDBC driver in level 4 mode (Java pur). The database has parallelismus enabled.
The SAME query
(simple example:
select b0.* from boo b0 left join foo f0 on b0.field1 = f0.field1
where f0.field2 is null and b0.feild3 = 'x'
fetch first 10 rows only;
)
returns different results when running with CUREENT DEGREE = '1' in contrary to CURRENT DEGREE = 'ANY'. In non-parallel mode it behaves correctly returning 10 rows, in parallel mode has the result 0 rows.
We tested the behaviour with Squirrel 2.6 with the same result. We tested the JDBC driver in level 4 mode with two another appliactions in parallel mode - both returning correct results. We tested the query with both ODBC-JDBC bridge and IBM APP (COM.ibm.db2.jdbc.app.DB2Driver) driver in Squirrel with correct results. It really comes down to the combination JDBC driver plus Squirrel plus DB2 in parallel mode.
We analysed the query in OSC and noticed that the query was splitted in 3 parallel tasks and the splitting criterion was value-based. The missing rows had all high values on the key field so that they would have been fetch by tasks nr. 2 and nr. 3. Our idea is that task nr. 1 returns no rows, tasks nr. 2 and nr. 3 return rows and that the query in Squirrel returns only results of the first task. In non-parallel mode there is just one task running so the problem doesn't emerge at all.
We would be happy to help you to track the problem down.
Keep the good work,
many greetings
Peter Mandzak
Result of the query Squirrel - JDBC driver non-parallel