ODBC SQLRowCount function returns wrong row number

Bug #1388930 reported by Jieping Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
New
High
Daniel Lu

Bug Description

In the rowset update test, 10 rows were inserted to the table, hence 10 rows were expected to be updated, but SQLRowCount returned 55 rows instead.

 > Binding parameters.
 >> Freeing the statement bind parameter buffers.
 > Updating rows.
 >> ERROR: The number of expected good rows processed [10] does not match the SQLRowCount() [55] at line 3457.
  tableType[100]: REGULAR
  tableFeature[1]: STANDARD
  mode[1]: STANDARD
  feature[1]: STANDARD
  operation[20]: PREPARE_EXECUTE
  action[32]: UPDATE
  bindOrientation[40]: ROW
  injectionType[60]: NO_ERRORS
  numberOfRows: 10
  rowsetSize: 10
  commitRate: 1000
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1234567890123456789 1234567890123456789
[2] 2 2 2 2 2 2 2 2 1 2 1 1 1 1 1 1 2 2 2 2 2 2 1234567890123456789 1234567890123456789
[3] 3 3 3 3 3 3 3 3 1 3 1 1 1 1 1 1 3 3 3 3 3 2 1234567890123456789 1234567890123456789
[4] 4 4 4 4 4 4 4 4 1 4 1 1 1 1 1 1 4 4 4 4 4 2 1234567890123456789 1234567890123456789
[5] 5 5 5 5 5 5 5 5 1 5 1 1 1 1 1 1 5 5 5 5 5 2 1234567890123456789 1234567890123456789
[6] 6 6 6 6 6 6 6 6 1 6 1 1 1 1 1 1 6 6 6 6 6 2 1234567890123456789 1234567890123456789
[7] 7 7 7 7 7 7 7 7 1 7 1 1 1 1 1 1 7 7 7 7 7 2 1234567890123456789 1234567890123456789
[8] 8 8 8 8 8 8 8 8 1 8 1 1 1 1 1 1 8 8 8 8 8 2 1234567890123456789 1234567890123456789
[9] 9 9 9 9 9 9 9 9 1 9 1 1 1 1 1 1 9 9 9 9 9 2 1234567890123456789 1234567890123456789
[10] 10 10 10 10 10 10 10 10 1 10 1 1 1 1 1 1 10 10 10 10 10 2 1234567890123456789 1234567890123456789
....FAILED!....
 > Free handles.

 >>showddl rowset_table;

CREATE TABLE TRAFODION.ODBCTEST.ROWSET_TABLE
  (
    C01 CHAR(20) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
  , C02 CHAR(20) CHARACTER SET UCS2 COLLATE
      DEFAULT DEFAULT NULL
  , C03 VARCHAR(20) CHARACTER SET ISO88591 COLLATE
      DEFAULT DEFAULT NULL
  , C04 VARCHAR(20) CHARACTER SET UCS2 COLLATE
      DEFAULT DEFAULT NULL
  , C05 VARCHAR(20) CHARACTER SET ISO88591 COLLATE
      DEFAULT DEFAULT NULL
  , C06 VARCHAR(20) CHARACTER SET UCS2 COLLATE
      DEFAULT DEFAULT NULL
  , C07 CHAR(20) CHARACTER SET UCS2 COLLATE
      DEFAULT DEFAULT NULL
  , C08 VARCHAR(20) CHARACTER SET UCS2 COLLATE
      DEFAULT DEFAULT NULL
  , C09 DECIMAL(8, 0) DEFAULT NULL
  , C10 DECIMAL(8, 0) UNSIGNED DEFAULT NULL
  , C11 NUMERIC(8, 0) DEFAULT NULL
  , C12 NUMERIC(8, 0) UNSIGNED DEFAULT NULL
  , C13 SMALLINT DEFAULT NULL
  , C14 SMALLINT UNSIGNED DEFAULT NULL
  , C15 SMALLINT DEFAULT NULL
  , C16 SMALLINT UNSIGNED DEFAULT NULL
  , C17 INT NO DEFAULT NOT NULL NOT DROPPABLE
  , C18 INT UNSIGNED DEFAULT NULL
  , C19 LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
  , C20 REAL DEFAULT NULL
  , C21 DOUBLE PRECISION DEFAULT NULL
  , C22 DOUBLE PRECISION DEFAULT NULL
  , C23 DATE DEFAULT NULL
  , C24 TIME(0) DEFAULT NULL
  , C25 TIMESTAMP(6) DEFAULT NULL
  , C26 INTERVAL YEAR(2) DEFAULT NULL
  , C27 INTERVAL MONTH(2) DEFAULT NULL
  , C28 INTERVAL DAY(2) DEFAULT NULL
  , C29 INTERVAL HOUR(2) DEFAULT NULL
  , C30 INTERVAL MINUTE(2) DEFAULT NULL
  , C31 INTERVAL SECOND(2,6) DEFAULT NULL
  , C32 INTERVAL YEAR(2) TO MONTH DEFAULT NULL
  , C33 INTERVAL DAY(2) TO HOUR DEFAULT NULL
  , C34 INTERVAL DAY(2) TO MINUTE DEFAULT NULL
  , C35 INTERVAL DAY(2) TO SECOND(6) DEFAULT NULL
  , C36 INTERVAL HOUR(2) TO MINUTE DEFAULT NULL
  , C37 INTERVAL HOUR(2) TO SECOND(6) DEFAULT NULL
  , C38 INTERVAL MINUTE(2) TO SECOND(6) DEFAULT
      NULL
  , C39 NUMERIC(19, 0) DEFAULT NULL
  , C40 NUMERIC(19, 0) UNSIGNED DEFAULT NULL
  , PRIMARY KEY (C19 ASC)
  )
;

ALTER TABLE TRAFODION.ODBCTEST.ROWSET_TABLE ADD CONSTRAINT
  TRAFODION.ODBCTEST.C17C CHECK (TRAFODION.ODBCTEST.ROWSET_TABLE.C17 < 50000)

--- SQL operation complete.
>>select count(*) from rowset_table;

(EXPR)
--------------------

                   10

--- 1 row(s) selected.
>>

tags: added: client-odbc-linux
Daniel Lu (ping-lu)
Changed in trafodion:
assignee: nobody → Daniel Lu (ping-lu)
Jian Jin (jian-jin)
Changed in trafodion:
assignee: Daniel Lu (ping-lu) → Arvind Narain (arvind-narain)
Revision history for this message
Jian Jin (jian-jin) wrote :

according to Daniel's analysis, it could be mxosrvr issue, Arvind will look at this firstly.

Changed in trafodion:
milestone: r1.0 → r1.1
Changed in trafodion:
assignee: Arvind Narain (arvind-narain) → jiegao (jie-gao)
milestone: r1.1 → r1.2
Revision history for this message
Chen-Yun Fan (chen-yun-fan) wrote :

Daniel will add the analysis into comments.

Changed in trafodion:
assignee: jiegao (jie-gao) → Daniel Lu (ping-lu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers