IBM Support

JR27754: XQUERY FAILS WITH SQL0901N (BUFFER TOO SMALL TO HOLD DATA) IF MULTI-BYTE CHARACTERS IN XISCAN.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • An Xquery fails with SQL0901N (Reason "Buffer too small to hold
    data".) when all of the following conditions are met.
    - The predicate exceeds 128 bytes in UTF-8, and it cannot be
      split by 128 bytes because of multi-byte character.
    - Optimizer chooses XISCAN to handle the predicate.
    .
    The following steps illustrate one of the scenario.
    db2 "create table T1(C1 XML)"
    db2 "create index IXT1C1 ON T1(C1) generate key using xmlpattern
    '/info/id' as sql varchar(500)"
    db2 "insert into T1 values(xmlparse(document
    '<info><id>A</id></info>'))"
    db2 "xquery db2-fn:xmlcolumn('T1.C1')/info&#65517;id='<Japanese string
    longer than 43 characters>'&#65529;"
    .
    The db2diag.log shows the entries like as follows:
    .
    2007-11-09-16.37.02.734000+540 I1418852H1777      LEVEL: Severe
    PID     : 4176                 TID  : 4916        PROC :
    db2syscs.exe
    INSTANCE: DB2                  NODE : 000         DB   : SAMPLE
    APPHDL  : 0-22                 APPID: *LOCAL.DB2.071108072207
    AUTHID  : DB2ADMIN
    FUNCTION: DB2 UDB, XML Node Manager,
    xmlDataDescriptor_fetchStreamingData, probe:1084
    MESSAGE : ZRC=0x82A40001=-2103181311=XMLRN_PRG_ERR
              "XMRN unexpected system error"
              DIA8532C An internal processing error has occurred.
    DATA #1 : String, 29 bytes
    Buffer too small to hold data
    .
    2007-11-09-16.37.02.796000+540 I1421709H806       LEVEL: Severe
    PID     : 4176                 TID  : 4916        PROC :
    db2syscs.exe
    INSTANCE: DB2                  NODE : 000         DB   : SAMPLE
    APPHDL  : 0-22                 APPID: *LOCAL.DB2.071108072207
    AUTHID  : DB2ADMIN
    FUNCTION: DB2 UDB, trace services, sqlt_logerr_data, probe:0
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
     sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -901   sqlerrml: 29
     sqlerrmc: Buffer too small to hold data
     sqlerrp : SQLXN185
     sqlerrd : (1) 0x82A40001      (2) 0x00000001      (3)
    0x00000000
               (4) 0x00000000      (5) 0xFFFFFF38      (6)
    0x00000000
     sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
               (7)      (8)      (9)      (10)        (11)
     sqlstate:
    

Local fix

Problem summary

  • Users affected:
    All who use pureXML feature with multi-byte characters.
    .
    Problem Description:
    An Xquery fails with SQL0901N (Reason "Buffer too small to hold
    data".) when all of the following conditions are met.
    - The predicate exceeds 128 bytes in UTF-8, and it cannot be
    split by 128 bytes because of multi-byte character.
    - Optimizer chooses XISCAN to handle the predicate.
    .
    The db2diag.log shows the entries like as follows:
    .
    2007-11-09-16.37.02.734000+540 I1418852H1777      LEVEL: Severe
    PID     : 4176                 TID  : 4916        PROC :
    db2syscs.exe
    INSTANCE: DB2                  NODE : 000         DB   : SAMPLE
    APPHDL  : 0-22                 APPID: *LOCAL.DB2.071108072207
    AUTHID  : DB2ADMIN
    FUNCTION: DB2 UDB, XML Node Manager,
    xmlDataDescriptor_fetchStreamingData, probe:1084
    MESSAGE : ZRC=0x82A40001=-2103181311=XMLRN_PRG_ERR
              "XMRN unexpected system error"
              DIA8532C An internal processing error has occurred.
    DATA #1 : String, 29 bytes
    Buffer too small to hold data
    .
    2007-11-09-16.37.02.796000+540 I1421709H806       LEVEL: Severe
    PID     : 4176                 TID  : 4916        PROC :
    db2syscs.exe
    INSTANCE: DB2                  NODE : 000         DB   : SAMPLE
    APPHDL  : 0-22                 APPID: *LOCAL.DB2.071108072207
    AUTHID  : DB2ADMIN
    FUNCTION: DB2 UDB, trace services, sqlt_logerr_data, probe:0
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
     sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -901   sqlerrml: 29
     sqlerrmc: Buffer too small to hold data
     sqlerrp : SQLXN185
     sqlerrd : (1) 0x82A40001      (2) 0x00000001      (3)
    0x00000000
               (4) 0x00000000      (5) 0xFFFFFF38      (6)
    0x00000000
     sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
               (7)      (8)      (9)      (10)        (11)
     sqlstate:
    .
    Problem Summary
    Users get SQL0901N when a predicate string for XISCAN cannot be
    split by 128 bytes boundary because of multi-byte character.
    

Problem conclusion

  • First fixed in DB2 Version 9.5, FixPack 1 (s080328)
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR27754

  • Reported component name

    DB2 UDB ESE WIN

  • Reported component ID

    5765F4101

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-11-14

  • Closed date

    2008-05-08

  • Last modified date

    2008-05-08

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

    JR27751

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

Modules/Macros

  • ENG_SQRI
    

Fix information

  • Fixed component name

    DB2 UDB ESE WIN

  • Fixed component ID

    5765F4101

Applicable component levels

  • R950 PSN

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

Document Information

Modified date:
08 May 2008