IBM Support

IT21085: AGAINST COLUMNAR TABLES, COMBINATION OF EXCLUSIVE TABLE LOCK ANDUNCOMMITTED INSERT AND SELECT COULD RETURN INCORRECT RESULTS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In scenario when sql has exclusive lock on a columnar organized
    table, and then issued an uncommitted INSERT in that same table,
    a concurrent SELECT statement on the same table which is run in
    another session could return incorrect  results.
    Since the table is under an exclusive lock, the SELECT statement
    waits.
    Once the session that issued the uncommitted INSERT committed,
    the exclusive lock is released,
    which in turn allows the SELECT statement in the other session
    to be executed.
    The symptom that select could encounter:  results from the
    SELECT statement are not including the uncommitted INSERTS that
    should have committed prior to the SELECT statement being
    executed.
    
    Setup:
    
    
    db2 "create table columnartable (i int) organize by column"
    db2 insert into columnartable values 1,2,3,4,5
    
    [Session 1]
    In one transaction:
    lock table columnartable in exclusive mode;
    delete from columnartable;
    !sleep 10;
    insert into columnartable values 1,2,3,4,5;
    COMMIT;
    
    [Session 2]
    select count(*) from columnartable while session 1 is running
    (during the 10 seconds sleep)
    
    Observation: session 2 waited for session 1 to complete (as
    session 2 was waiting for the exclusive table lock to be
    released by session 1), and returned row count of 0 rows
    Correct result is   5 rows.
    

Local fix

  • Avoid this sequence of events.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * COLUMNAR TABLES                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please See Error Description and install fix.                *
    ****************************************************************
    

Problem conclusion

  • Please See Error Description and install fix.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT21085

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-06-19

  • Closed date

    2018-03-16

  • Last modified date

    2018-03-16

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

    IT21015

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 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":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 March 2018