IBM Support

IC78164: FED: WRONG RESULT RETURNED BY FEDERATION SERVER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • If there is an exists subquery in the head expression, this
    subquery will be pushed down and the original sql statement will
    be converted to a join sql statement.
    
    For example, in the following sql statement, nick1 and nick2 are
    nicknames and there is an exists subquery in the head
    expression:
    select ((case when exists(select * from nick1 where c2='aaa')
    then 'TRUE' else 'FALSE' end)) from nick2;
    
    DB2 compiler will rewrite it to:
    Optimized Statement:
    -------------------
    SELECT
    CASE
    WHEN (1 = Q3.$C0)
    THEN 'TRUE'
    ELSE 'FALSE' END
    FROM
       (SELECT DISTINCT Q2.$C0
       FROM
          (SELECT 1
          FROM IIDEV22.NICK1 AS Q1
          WHERE (Q1.C2 = 'aaa       ')) AS Q2) AS Q3, IIDEV22.NICK2
    AS Q4 =
    
    In this scenario, federation pda(pushdown analysis) component
    will push down all the subquery to remote data source which
    cause the wrong result.
    

Local fix

  • Change the exists subquery to "count(*) > 0" clause
    

Problem summary

  • The fix is fixed in db2 v97 FP5
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IC78164

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-17

  • Closed date

    2011-12-12

  • Last modified date

    2011-12-12

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC81476

Fix information

Applicable component levels

  • R970 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
12 December 2011