IBM Support

MF62874 - LIC QUERY WITH TRANSITIVE JOIN NOT RETURNING THE CORRECT RES

PTF ( Program Temporary Fixes ) Cover letter


Order this fix

Abstract

LIC QUERY WITH TRANSITIVE JOIN NOT RETURNING THE CORRECT RES


Pre/Co-Requisite PTF / Fix List

REQ  LICENSED           PTF/FIX  LEVEL

TYPE PROGRAM  RELEASE   NUMBER   MIN/MAX  OPTION
---- -------- --------- -------  -------  ------
PRE  5770999  V7R3M0    MF62602   00/00    0000
CO   5770999  V7R3M0    MF62863   00/00    0000
CO   5770999  V7R3M0    MF62864   00/00    0000
CO   5770999  V7R3M0    MF62503   00/00    0000
CO   5770999  V7R3M0    MF62458   00/00    0000



NOTICE:
-------
Application of this PTF may disable or render ineffective programs that
use system memory addresses not generated by the IBM translator,
including programs that circumvent control technology designed to limit
interactive capacity to purchased levels.  This PTF may be a prerequisite
for future PTFs.  By applying this PTF you authorize and agree to the
foregoing.

This PTF is subject to the terms of the 'IBM License Agreement for Machine
Code', the terms of which were provided in a printed document that was
delivered with the machine.

SUBJECT TO ANY WARRANTIES WHICH CAN NOT BE EXCLUDED OR EXCEPT AS EXPLICITLY
AGREED TO IN THE APPLICABLE LICENSE AGREEMENT OR AN APPLICABLE SUPPORT
AGREEMENT, IBM MAKES NO WARRANTIES OR CONDITIONS EITHER EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON INFRINGEMENT,
REGARDING THE PTF.





APAR Error Description / Circumvention

-----------------------------------------------
Customer has queries with transitive JOINs that are not
returning the correct result for SUM aggregate. Appears some
rows are not included in the result.

CORRECTION FOR APAR MA45962 :
-----------------------------
Customer query had multiple left outer joins with local
selection predicates specific to the left outer join that could
be transitive closed per the join predicate with the main,
leading query table but these also involved carry over to other
left outer joins in the query.  This resulted in an incorrect
predicate getting applied to the tree and impacting the final
answer.  The predicates had to also involve implicit casts added
for data type matching. The logic was fixed so that there can be
no carry over related to multiple Left Outer Join or Left
Exception Join and local selection predicates and these casted
expressions.

CIRCUMVENTION FOR APAR MA45962 :
--------------------------------
None.


Activation Instructions


None.




Special Instructions


None.


Default Instructions

THIS PTF CAN BE APPLIED IMMEDIATE OR DELAYED.



Supersedes

PTF/FIX NO(S).  APAR TITLE LINE
--------------  ------------------------------------------------------------
   MF62862      LIC-DB-PERFM Index Merge Ordering
   MF62855      OSP-DB QUERY THAT REUSING A PLAN IS NOT UPDATING ALL PREDICA
   MF62850      LIC-DB-PERFM Excessive optimization time when MQTs enabled
   MF61420      LIC-DB-MSGMCH3203 DbstMdDadDataSpaceConcrete
   MF61207      OSP-DB MSGMCH3601 F/DBPMFORMAT T/QQQOOODBOP VL0600 BADD
   MF62762      OSP-DBPARL-PERFM LIMITED PLAN CHOICE DUE TO JOIN ORDER RESUL
   MF62743      OSP-DB-OTHER-F/DBPMTRAPX/09B8-T/DBQQQOOODBOPX/4963-MSGMCH320
   MF62649      F/QQQOOODBOP-MSGMCH3203 MCH3203 F/ QQQOOODBOP T/ QQQOOOINV
   MF62647      LIC-DB-OTHER-INCORROUT QUERY/400 RETURNS TOO MANY ROWS IN SQ
   MF62606      LIC-DB-OTHER-INCORROUT Incorrectly sorted results possible w
   MF62504      DB-LIC-MSGMCH3203 Plan Cache Snapshot  sEstimatedIoTimeInUs_
   MF62498      LIC-DB-OTHER OLAP function over union subselect may fail
   MF62459      LIC-DB-OTHER IS NULL index advice ordering.
   MF62435      LIC-DB-OTHER Internal Database Maintenance.
   MF62419      LIC-DB-INCORROUT  update with datapartitionname and smp
   MF62416      LIC-DB-INCORROUT SMP Query with Ordering
   MF62412      F/DBOPOPERATIONMISC-MSGMCH3203 F/DBOPOPERATIONMISC-MSGMCH320
   MF62373      LIC-DB-PERFM Not using EVI Only Access
   MF62368      LIC-DB-OTHER-PERFM IMPROVE PERFORMANCE OF COMPLEX SQL QUERIE
   MF62365      LIC-DB-PERFM Optimization time with many nested subquery lev
   MF62315      OSP-DB-OTHER-UNPRED RECORD NOT FOUND ON A PARTITIONED TABLE
   MF62305      LIC-DB-PERFM SMP support for OLAP queries
   MF62296      LIC-DB-OTHER-PERFM QRY/400 TAKES MORE TIME TO OPTIMIZE
   MF62243      OSP-DB-OTHER-UNPRED TMPSTGLK SQE BUCKET 8 *DATABASE SEGMENT
   MF62219      LIC-DB-OTHER Fixes error caused by null ordering on DENSE_RA
   MF62198      LIC-DB-OTHER-F/DBOPEXPRQDS-T/QQQOOODBOP-MSGMCH3601 SQL SELEC
   MF62195      LIC-DB-OTHER-INCORROUT WRKQRY OUTPUT IS NOT IN THE SPECIFIED
   MF62122      LIC-DB-OTHER Optimizer support for PERCENTILE_CONT and PERCE
   MF62117      OSP-DB-OTHER-F/DBPMTRAP-T/QQQOOODBOP-MSGMCH3203 MSGMCH3203 F
   MF62117      OSP-DB-OTHER-F/DBOPAFFINITY-T/QQQOOODBOP-MSGMCH3203 WRONG SE
   MF62078      LIC-DB Internal Maintenance
   MF62077      LIC-DB-OTHER-F/ASSERT-T/QQQOOODBOP-MSGMCH3203 RUNNING COMPLI
   MF62071      OSP-DB_OTHER  FULL OUTER JOIN ESCAPING QUERY NORMALIZATION
   MF62042      LIC-DB-MSGMCH3203 Partitioned table query with SMP and LPG
   MF62021      LIC-DB-OTHER Internal Maintenance
   MF62020      LIC-DB-OTHER-UNPRED Grouping set query fails with MCH3203 un
   MF61856      OSP-DB-OTHER-INCORROUT INCORRECT RESULTS MAY OCCUR WITH REPL
   MF61853      OSP-DB-OTHER-PERFM SLOW PERFORMANCE AFTER CUME JOIN OPTIMIZA
   MF61853      OSP-DB-OTHER MSGMCH3203 F/DBPMTRAP T/QQQOOODBOP
   MF61853      OSP-INCORROUT WHEN FULL OUTER JOIN QUERY HAS SPECIFIC STRUCT
   MF61725      LIC-DB PERFM LONG RUNNING SQL QUERY WITH EVI ACCESS.
   MF61713      LIC-DB-OTHER Index advising for IS NULL predicates.
   MF61692      LIC-DB-MSGMCH3203 OLAP Aggregate query
   MF61684      LIC-DB Internal Database Maintenance
   MF61646      LIC-DB-PERFM SMP with Grouping and UNION
   MF61609      OSP-DB-OTHER-THREADS-F/DBOPAFFINITY-T/QQQOOODBOP-MSGMCH3203
   MF61609      OSP-DB-OTHER-INCORROUT INCORRECT OUTPUT MAY OCCUR WITH A CRO
   MF61583      LIC-DB-INCORROUT Scalar aggregate OLAP when arg is constant
   MF61551      LIC-DB-INCORROUT Grouping query with OLAP
   MF61506      LIC-DB-PERFM SQL Improve column elimination in union queries
   MF61398      LIC-DB-PERFM Optimizer picking PTL scan over index probe pla
   MF61375      LIC-DB-INCORROUT OLAPs with Different Partition By clauses
   MF61334      LIC-DB Internal Maintenance
   MF61217      OSP-DB-OTHER-F/DBOPSTRATEGY-T/QQQOOODBOP-MSGMCH3601 WHEN A D
   MF61125      OSP-DB-OTHER-F/DBLISTHOME-T/QQQOOODBOP-MSGMCH3203 MSGMCH3203
   MF61125      F/QSQFETCH-MSGSQL0811-RCTYPE1 FROM SQL QUERY WITH FETCH FIRS
   MF61125      LIC-DB-OTHER-F/QDBSIGEX-MSGCPF5149 MAY OCCUR WHEN USING USIN
   MF61125      LIC-INCORROUT NTH_VALUE when used with other OLAP aggregates
   MF61125      LIC-DB-OTHER-F/DBPMTRAPX/0958-T/QQQOOODBOP-RCX/1720-MSGMCH32
   MF60929      LIC-DB-MSGMCH32303 Aggregate OLAP and Ordering
   MF60929      LIC-DB-PERFM SQL EVI Only Access query optimization techniqu
   MF60929      OSP-UNPRED WHEN USING SQE QUERY ENGINE DUPLICATE MTI'S MAY B
   MF61588      LIC-DB-PERFM bad plan when running commit *ALL
   MF61256      OSP-DB-OTHER-INCORROUT A SQL QUERY MAY SHOW A NULL FOR A COL
   MF61211      LIC-DB-OTHER-PERFM SLOW PERFORMANCE ON A RECURSIVE COMMON TA
   MF61148      LIC-PERFM-PAR-940XMISC Bad Query Plan
   MF61063      LIC-DB-PERFM Union Queries

Summary Information

System.............................. i
Models..............................
Release............................. V7R3M0
Licensed Program............... 5770999
APAR Fixed.......................... View details for APAR MA45962
Superseded by:...................... View fix details for PTF MF66700
Recompile........................... N
Library............................. QSYS
MRI Feature ........................ NONE
Cum Level........................... C7283730


IBM i Support

IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright © 1996,1997,1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult the Terms of use link for trademark information.

Document information

More support for: i family

Software version: V7R3M0

Operating system(s): OS/400

Reference #: MF62874

Modified date: 17 January 2017