Status array returned by batch operations contains wrong return value for T2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
New
|
Medium
|
RuoYu Zuo |
Bug Description
The status array returned from T2 contains a different value compared to T4. T4 returns -2 and T2 returns 1.
The oracle JDBC documentation states:
0 or greater — the command was processed successfully and the value is an update count indicating the number of rows in the database that were affected by the command’s execution Chapter 14 Batch Updates 121
Statement.
Statement.
For a prepared statement batch, it is not possible to know the number of rows affected in the database by each individual statement in the batch. Therefore, all array elements have a value of -2. According to the JDBC 2.0 specification, a value of -2 indicates that the operation was successful but the number of rows affected is unknown.
Changed in trafodion: | |
assignee: | nobody → Kevin Xu (kai-hua-xu) |
Changed in trafodion: | |
milestone: | none → r0.9 |
Changed in trafodion: | |
milestone: | r0.9 → r1.0 |
Changed in trafodion: | |
assignee: | Arvind Narain (arvind-narain) → Daniel Lu (ping-lu) |
milestone: | r1.1 → r1.2 |
Changed in trafodion: | |
assignee: | Daniel Lu (ping-lu) → Kevin Xu (kai-hua-xu) |
Changed in trafodion: | |
assignee: | Kevin Xu (kai-hua-xu) → xiu-zhu.zhang (xiu-zhu-zhang) |
assignee: | xiu-zhu.zhang (xiu-zhu-zhang) → RuoYu Zuo (ruo-yu-zuo) |
Also, when the batch has update statements, there is only one element in the array . For T2, it is the total number of records affected, for T4, its -2 (but only one element in array).