You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:17:26 UTC

[jira] [Created] (TRAFODION-579) LP Bug: 1360493 - Select after an update sees ERROR[1] in trafci

Alice Chen created TRAFODION-579:
------------------------------------

             Summary: LP Bug: 1360493 - Select after an update sees ERROR[1] in trafci
                 Key: TRAFODION-579
                 URL: https://issues.apache.org/jira/browse/TRAFODION-579
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-exe
            Reporter: Weishiun Tsai
            Assignee: justin.du@hp.com
            Priority: Critical


The following sequence of statements sees ERROR[1] from trafci at the select statement after the update statement. 

*** ERROR[1] The message id: No messages in the Error description

This is a regression.  The statements ran fine on the 0.8.3 rc3 build.   The problem can be seen on the 0819_0830 build installed on a workstation, as well as a cluster.  However, it only happens when they are run from trafci.  The same sequence of statements runs fine from sqlci.

-----------------------------------------

Here is the entire script to reproduce this problem:

trafci.sh -h <your machine>:<port> -u dontcare -p dontcare

drop schema myschema15 cascade;
set schema myschema15;

create table BTA1P008
(sbin0_4 integer not null
, varchar0_500 varchar(11)  default 'GDAAIAAA' not null heading 'varchar0_500 no nulls'
, sdec16_uniq numeric(18,0) signed not null
);

create view  VNA1P008
as  select * from BTA1P008 where sdec16_uniq > 3000
union
select * from BTA1P008 where sdec16_uniq < 2500;

create table T3
( vch15 varchar(15)
, nint integer
, ch3 char(3)
, nlarge largeint);

insert into T3
values ('1st orig value' ,99 , 'o'   , 1 )
, ('2nd orig value' ,98 , 'ov'  , 2 )
, ('3rd orig value' ,97 , 'ovc' , 3 )
, ('4th orig value' ,96 , 'ov ' , 4 )
, ('5th orig value' ,95 , 'o  ' , 5 )
, ('6 is short'     ,97 , 'o'   , 6 )
, ('7'              ,94 , 'OVC' , 7 )
, ('8th orig value' ,93 , 'OV'  , 8 )
, ('9th orig val  ' ,92 , 'O'   , 9 )
, ('10th val'       ,92 , 'O'   , 9 )
, ('11th val'       ,92 , 'O'   , 9 );

select * from T3;

update T3 set vch15 = (select max(c) from (select varchar0_500 from VNA1P008 ) dt(c)) where nint=95;

select * from T3;

-----------------------------------------

Here is the execution output showing the error from trafci:

SQL>drop schema myschema15 cascade;

--- SQL operation complete.

SQL>set schema myschema15;

--- SQL operation complete.

SQL>create table BTA1P008
+>(sbin0_4 integer not null
+>, varchar0_500 varchar(11)  default 'GDAAIAAA' not null heading 'varchar0_500 no nulls'
+>, sdec16_uniq numeric(18,0) signed not null
+>);

--- SQL operation complete.

SQL>create view  VNA1P008
+>as  select * from BTA1P008 where sdec16_uniq > 3000
+>union
+>select * from BTA1P008 where sdec16_uniq < 2500;

--- SQL operation complete.

SQL>create table T3
+>( vch15 varchar(15)
+>, nint integer
+>, ch3 char(3)
+>, nlarge largeint);

--- SQL operation complete.

SQL>insert into T3
+>values ('1st orig value' ,99 , 'o'   , 1 )
+>, ('2nd orig value' ,98 , 'ov'  , 2 )
+>, ('3rd orig value' ,97 , 'ovc' , 3 )
+>, ('4th orig value' ,96 , 'ov ' , 4 )
+>, ('5th orig value' ,95 , 'o  ' , 5 )
+>, ('6 is short'     ,97 , 'o'   , 6 )
+>, ('7'              ,94 , 'OVC' , 7 )
+>, ('8th orig value' ,93 , 'OV'  , 8 )
+>, ('9th orig val  ' ,92 , 'O'   , 9 )
+>, ('10th val'       ,92 , 'O'   , 9 )
+>, ('11th val'       ,92 , 'O'   , 9 );

--- 11 row(s) inserted.

SQL>select * from T3;

VCH15           NINT        CH3  NLARGE
--------------- ----------- ---- --------------------
1st orig value           99 o                       1
2nd orig value           98 ov                      2
3rd orig value           97 ovc                     3
4th orig value           96 ov                      4
5th orig value           95 o                       5
6 is short               97 o                       6
7                        94 OVC                     7
8th orig value           93 OV                      8
9th orig val             92 O                       9
10th val                 92 O                       9
11th val                 92 O                       9

--- 11 row(s) selected.

SQL>update T3 set vch15 = (select max(c) from (select varchar0_500 from VNA1P008 ) dt(c)) where nint=95;

--- 1 row(s) updated.

SQL>select * from T3;

*** ERROR[1] The message id: No messages in the Error description

-----------------------------------------

Here is the execution output showing that it runs fine from sqlci:

>>drop schema myschema15 cascade;

--- SQL operation complete.
>>set schema myschema15;

--- SQL operation complete.
>>
>>create table BTA1P008
+>(sbin0_4 integer not null
+>, varchar0_500 varchar(11)  default 'GDAAIAAA' not null heading 'varchar0_500 no nulls'
+>, sdec16_uniq numeric(18,0) signed not null
+>);

--- SQL operation complete.
>>
>>create view  VNA1P008
+>as  select * from BTA1P008 where sdec16_uniq > 3000
+>union
+>select * from BTA1P008 where sdec16_uniq < 2500;

--- SQL operation complete.
>>
>>create table T3
+>( vch15 varchar(15)
+>, nint integer
+>, ch3 char(3)
+>, nlarge largeint);

--- SQL operation complete.
>>
>>insert into T3
+>values ('1st orig value' ,99 , 'o'   , 1 )
+>, ('2nd orig value' ,98 , 'ov'  , 2 )
+>, ('3rd orig value' ,97 , 'ovc' , 3 )
+>, ('4th orig value' ,96 , 'ov ' , 4 )
+>, ('5th orig value' ,95 , 'o  ' , 5 )
+>, ('6 is short'     ,97 , 'o'   , 6 )
+>, ('7'              ,94 , 'OVC' , 7 )
+>, ('8th orig value' ,93 , 'OV'  , 8 )
+>, ('9th orig val  ' ,92 , 'O'   , 9 )
+>, ('10th val'       ,92 , 'O'   , 9 )
+>, ('11th val'       ,92 , 'O'   , 9 );

--- 11 row(s) inserted.
>>
>>select * from T3;

VCH15            NINT         CH3  NLARGE
---------------  -----------  ---  --------------------

1st orig value            99  o                       1
2nd orig value            98  ov                      2
3rd orig value            97  ovc                     3
4th orig value            96  ov                      4
5th orig value            95  o                       5
6 is short                97  o                       6
7                         94  OVC                     7
8th orig value            93  OV                      8
9th orig val              92  O                       9
10th val                  92  O                       9
11th val                  92  O                       9

--- 11 row(s) selected.
>>
>>update T3 set vch15 = (select max(c) from (select varchar0_500 from VNA1P008 ) dt(c)) where nint=95;

--- 1 row(s) updated.
>>
>>select * from T3;

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)