IBM Support

IC87326: DB2 INSTANCE CRASH IN SQLUCONVDATATOTARGET() DURING LOAD INTO TABLE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Instance will crash in SQLUCONVDATATOTARGET() during load when
    all the following conditions are present.
    
    
    repro scenario:
    
    db2 "create table t1 (c1 long varchar, c2 varchar(100))"
    db2 "insert into t1 values ('hi', 'hello')"
    db2 "export to t1.ixf of ixf select c1, c2 from t1"
    db2 "create table t2 (a1 varchar(100), a2 char(100) generated
    always as (a1))"
    db2 "load from t1.ixf of ixf modified by generatedignore replace
    into t2"     <=== DB2 crashes
    
    
    
    1. Input data file is IXF type, and has a long varchar column
       ( Using our example, the first column c1 in t1.ixf is of long
    varchar type)
         Also be aware that there is a possibility of getting a long
    varchar type in ixf file if we export from DB2 iSeries (even
    when column is casted to varchar type)
    
    2. We are loading the long varchar data into a char or varchar
    column
       (column a1 in table t2 in our example)
    
    3. The load target table has a generated column whose value
    depends on the char/varchar column mentioned previously
       (in our example, a2 is a generated column whose value depends
    on a1, a1 being the char/varchar column where we are loading a
    long varchar data into)
    
    4. LOAD is actually generating the value for the generated
    column
       (in our example, if we only export column c1 into t1.ixf, and
    don't specify any "modified by generated...." option, then LOAD
    will also generate a2's value and we will also hit the problem)
       (in our example, if we use "modified by generatedoverride"
    instead of "modified by generatedignore", then LOAD will insert
    the 'hello' from the t1.ixf input data file into column a2,
    instead of generating a2's value, and we will NOT hit this
    problem.)
    5. No codepage conversion involved (i.e. codepage of data in ixf
    file is the same as database codepage).
    
    
    Stack generated similar to the following
    
    Stack #1             Signal #11        Timestamp
    2012-09-12-14.23.59.339544
    0        sqluConvDataToTarget
    1        sqluCGenColDataFormatter::iBindInValues
    2        sqluGenBindIn
    3        sqlribni
    4        sqlriSectInvoke
    5        sqluCGenColDataFormatter::iExecuteSection
    6        sqluCGenColMgr::iProcessGeneratedCols
    7        @148@sqluGetAndFormatRecords
    8        sqluCFormatter::iRun
    9        sqluLoadEDUDriver
    10       sqloEDUEntry
    

Local fix

  • Use import
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Instance will crash in SQLUCONVDATATOTARGET() during load    *
    * when                                                         *
    * all the following conditions are present.                    *
    *                                                              *
    *                                                              *
    * repro scenario:                                              *
    *                                                              *
    * db2 "create table t1 (c1 long varchar, c2 varchar(100))"     *
    * db2 "insert into t1 values ('hi', 'hello')"                  *
    * db2 "export to t1.ixf of ixf select c1, c2 from t1"          *
    * db2 "create table t2 (a1 varchar(100), a2 char(100)          *
    * generated                                                    *
    * always as (a1))"                                             *
    * db2 "load from t1.ixf of ixf modified by generatedignore     *
    * replace                                                      *
    * into t2"     <=== DB2 crashes                                *
    *                                                              *
    *                                                              *
    *                                                              *
    * 1. Input data file is IXF type, and has a long varchar       *
    * column                                                       *
    *    ( Using our example, the first column c1 in t1.ixf is of  *
    * long                                                         *
    * varchar type)                                                *
    *      Also be aware that there is a possibility of getting a  *
    * long                                                         *
    * varchar type in ixf file if we export from DB2 iSeries (even *
    * when column is casted to varchar type)                       *
    *                                                              *
    * 2. We are loading the long varchar data into a char or       *
    * varchar                                                      *
    * column                                                       *
    *    (column a1 in table t2 in our example)                    *
    *                                                              *
    * 3. The load target table has a generated column whose value  *
    * depends on the char/varchar column mentioned previously      *
    *    (in our example, a2 is a generated column whose value     *
    * depends                                                      *
    * on a1, a1 being the char/varchar column where we are loading *
    * a                                                            *
    * long varchar data into)                                      *
    *                                                              *
    * 4. LOAD is actually generating the value for the generated   *
    * column                                                       *
    *    (in our example, if we only export column c1 into t1.ixf, *
    * and                                                          *
    * don't specify any "modified by generated...." option, then   *
    * LOAD                                                         *
    * will also generate a2's value and we will also hit the       *
    * problem)                                                     *
    *    (in our example, if we use "modified by                   *
    * generatedoverride"                                           *
    * instead of "modified by generatedignore", then LOAD will     *
    * insert                                                       *
    * the 'hello' from the t1.ixf input data file into column a2,  *
    * instead of generating a2's value, and we will NOT hit this   *
    * problem.)                                                    *
    * 5. No codepage conversion involved (i.e. codepage of data in *
    * ixf                                                          *
    * file is the same as database codepage).                      *
    *                                                              *
    *                                                              *
    * Stack generated similar to the following                     *
    *                                                              *
    * Stack #1             Signal #11        Timestamp             *
    * 2012-09-12-14.23.59.339544                                   *
    * 0        sqluConvDataToTarget                                *
    * 1        sqluCGenColDataFormatter::iBindInValues             *
    * 2        sqluGenBindIn                                       *
    * 3        sqlribni                                            *
    * 4        sqlriSectInvoke                                     *
    * 5        sqluCGenColDataFormatter::iExecuteSection           *
    * 6        sqluCGenColMgr::iProcessGeneratedCols               *
    * 7        @148@sqluGetAndFormatRecords                        *
    * 8        sqluCFormatter::iRun                                *
    * 9        sqluLoadEDUDriver                                   *
    * 10       sqloEDUEntry                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * upgrade to V9.7 Fix Pack 8                                   *
    ****************************************************************
    

Problem conclusion

  • Fixed in V9.7 Fix pack 8
    

Temporary fix

  • Use import
    

Comments

APAR Information

  • APAR number

    IC87326

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-10-17

  • Closed date

    2013-04-02

  • Last modified date

    2013-04-02

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

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

    IC91272

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC87326

Modified date: 02 April 2013