Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-3193

DML parser IndexOutOfRangeException with where-clause using "IS NULL"

XMLWordPrintable

      The parseUpdate method of logminerdmlparser class throws indexoutofrange exception.

      If the update statement where clause contains NULL column values, the values collection do not contains those values but the column name collection does contains the names.  

      So in my case the column names collection has 32 columns and column values collection has 18 values as NULLS are filtered out.

      Both collections are iterated under the same and indexer i in for loop and since they have different sizes - this results into the error. Please refer the screen shot.

      Either we should populate the NULL Values in the column values collection or we should not add the column names in names collection with null values.

      Example DML:

      'update "SCOTT"."MTL_MATERIAL_TRANSACTIONS" set "SUBINVENTORY_CODE" = 'TEST2' 
      where "TRANSACTION_ID" = '22805' and "CREATION_DATE" = '01-MAR-12 20:29:47' 
      and "LAST_UPDATE_DATE" = '01-MAR-12 20:33:07' and "TRANSACTION_DATE" = '01-MAR-12 20:28:26' 
      and "INVENTORY_ITEM_ID" = '3150' and "ORGANIZATION_ID" = '7274'
      and "SUBINVENTORY_CODE" = 'TEST1' and "LOCATOR_ID" = '3544' and "TRANSACTION_TYPE_ID" = '41' 
      and "TRANSACTION_ACTION_ID" = '27' and "TRANSACTION_SOURCE_TYPE_ID" = '6' 
      and "TRANSACTION_SOURCE_NAME" IS NULL and "TRANSACTION_QUANTITY" = '1' 
      and "TRANSACTION_UOM" = 'EA' and "TRANSACTION_REFERENCE" IS NULL and "REASON_ID" IS NULL 
      and "TRX_SOURCE_LINE_ID" IS NULL and "RCV_TRANSACTION_ID" IS NULL 
      and "COMPLETION_TRANSACTION_ID" IS NULL and "SOURCE_CODE" = 'Manual' 
      and "SOURCE_LINE_ID" = '121056' and "TRANSFER_ORGANIZATION_ID" IS NULL 
      and "TRANSFER_SUBINVENTORY" IS NULL and "TRANSFER_LOCATOR_ID" IS NULL 
      and "SHIPMENT_NUMBER" IS NULL and "LPN_ID" IS NULL and "TRANSFER_LPN_ID" IS NULL 
      and "CONTENT_LPN_ID" IS NULL and "PICK_SLIP_NUMBER" IS NULL and "MOVE_ORDER_LINE_ID" IS NULL;' 
      

        1. Capture.PNG
          87 kB
          Mukesh Sharma

              ccranfor@redhat.com Chris Cranford
              integratemukesh@gmail.com Mukesh Sharma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: