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:15:37 UTC
[jira] [Created] (TRAFODION-318) LP Bug: 1324240 - failed upshift
for alter add column char/varchar default values
Alice Chen created TRAFODION-318:
------------------------------------
Summary: LP Bug: 1324240 - failed upshift for alter add column char/varchar default values
Key: TRAFODION-318
URL: https://issues.apache.org/jira/browse/TRAFODION-318
Project: Apache Trafodion
Issue Type: Bug
Reporter: Apache Trafodion
Assignee: Anoop Sharma
Priority: Minor
* alter table add columns for char/varchar upshift default didn't dislplay upshift values for default columns.
SQL>create table a01table (
orders int no default not null
, ch1 char(15) upshift default 'ch1'
, vch2 varchar(15) upshift default 'vch2'
, primary key (orders ASC) not droppable
);
--- SQL operation complete.
SQL>insert into a01table (orders, ch1) values (1,'a');
--- 1 row(s) inserted.
SQL>insert into a01table (orders, ch1) values (2,'b');
--- 1 row(s) inserted.
SQL>alter table a01table add vch3 CHARACTER VARYING(15) upshift default 'vch3';
--- SQL operation complete.
SQL>alter table a01table add ch3 CHARACTER (15) upshift default 'ch3';
--- SQL operation complete.
SQL>insert into a01table (orders, ch1) values (61,'character');
--- 1 row(s) inserted.
SQL>insert into a01table (orders, vch2) values (62,repeat('a',10));
--- 1 row(s) inserted.
SQL>select * from a01table;
ORDERS CH1 VCH2 VCH3 CH3
----------- --------------- --------------- --------------- ---------------
1 A VCH2 vch3 ch3
2 B VCH2 vch3 ch3
61 CHARACTER VCH2 VCH3 CH3
62 CH1 AAAAAAAAAA VCH3 CH3
--- 4 row(s) selected.
SQL>log off;
-- test script
log a03log clear;
env;
set schema usr;
drop table a01table;
create table a01table (
orders int no default not null
, ch1 char(15) upshift default 'ch1'
, vch2 varchar(15) upshift default 'vch2'
, primary key (orders ASC) not droppable
);
insert into a01table (orders, ch1) values (1,'a');
insert into a01table (orders, ch1) values (2,'b');
alter table a01table add vch3 CHARACTER VARYING(15) upshift default 'vch3';
alter table a01table add ch3 CHARACTER (15) upshift default 'ch3';
insert into a01table (orders, ch1) values (61,'character');
insert into a01table (orders, vch2) values (62,repeat('a',10));
select * from a01table;
log off;
exit;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)