Select * and select count(*) show inconsistent results within a transaction

Bug #1261993 reported by Weishiun Tsai
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
High
John de Roo

Bug Description

Within a transaction, after a row was inserted into a table, select * and select count(*) from the same table showed inconsistent results. Select * showed the row that was inserted. Select count(*) showed 0, as shown in the following example:

>>create table t (a int);

--- SQL operation complete.
>>begin work;

--- SQL operation complete.
>>insert into t values (1);

--- 1 row(s) inserted.
>>select * from t;

A
-----------

          1

--- 1 row(s) selected.
>>select count(*) from t;

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

                   0

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

Tags: dtm
summary: Select * and select count(*) show inconsistent results within a
- transaction.
+ transaction
Changed in trafodion:
assignee: nobody → Anoop Sharma (anoop-sharma)
Revision history for this message
John de Roo (john-deroo) wrote :

Fixed and verified in seatrans_2 branch. Merged into datalake_64 branch, revision 39062.

Changed in trafodion:
status: New → Fix Committed
John de Roo (john-deroo)
Changed in trafodion:
assignee: Anoop Sharma (anoop-sharma) → John de Roo (john-deroo)
Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

verified on the datalake v39114 build, which was the first datalake build when seatrans_2 was merged into. This problem has been fixed:

[trafodion@centos-mapr1 scripts]$ sqlci | cat
Trafodion Conversational Interface 0.7.0
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>create table t (a int);

--- SQL operation complete.
>>begin work;

--- SQL operation complete.
>>insert into t values (1);

--- 1 row(s) inserted.
>>select * from t;

A
-----------

          1

--- 1 row(s) selected.
>>select count(*) from t;

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

                   1

--- 1 row(s) selected.
>>rollback work;

--- SQL operation complete.
>>

Changed in trafodion:
status: Fix Committed → Fix Released
information type: Proprietary → Public
Alice Chen (alchen)
tags: added: dtm
removed: transaction
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.