adding test scripts
[csql.git] / test / sql / Datatype / exp.test004.ksh
blob8e608ae4663d7d25de30e377fb1faf9d0c3968f1
1 echo Create table t1 (f1 varchar(10), f2 int, primary key(f1));
2 Statement Executed
3 echo Create table t2 (f1 varchar(10), f2 bigint, foreign key(f1) references t1(f1));
4 Statement Executed
5 Statement Executed: Rows Affected = 1
6 Statement Executed: Rows Affected = 1
7 echo insert into t1 values(NULL,3);
8 Statement execute failed with error -22
9 echo insert into t1 values('CSQL2',4);
10 Statement execute failed with error -21
11 echo select * from t1;
12 ---------------------------------------------------------
13 t1.f1 t1.f2
14 ---------------------------------------------------------
15 CSQL1 1
16 CSQL2 2
18 echo update t1 set f1='CSQL1' where f1='CSQL2';
19 Statement prepare failed with error -21
20 echo select * from t1;
21 ---------------------------------------------------------
22 t1.f1 t1.f2
23 ---------------------------------------------------------
24 CSQL1 1
25 CSQL2 2
27 Statement Executed: Rows Affected = 1
28 Statement Executed: Rows Affected = 1
29 echo insert into t2 values('CSQL3',30);
30 Statement execute failed with error -35
31 echo select * from t2;
32 ---------------------------------------------------------
33 t2.f1 t2.f2
34 ---------------------------------------------------------
35 CSQL1 10
36 CSQL2 20
38 echo delete from t1 where f1='CSQL1';
39 Statement execute failed with error -36
40 echo select * from t1;
41 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
44 CSQL1 1
45 CSQL2 2
47 echo select * from t2;
48 ---------------------------------------------------------
49 t2.f1 t2.f2
50 ---------------------------------------------------------
51 CSQL1 10
52 CSQL2 20
54 <Table Information of all tables>
55 <TableInfo>
56 <TableName> t1 </TableName>
57 <FieldInfo>
58 <FieldName> f1 </FieldName>
59 <Type> 32 </Type>
60 <Length> 12 </Length>
61 <Primary> 1 </Primary>
62 <Null> 1 </Null>
63 <Default> 0 </Default>
64 <DefaultValue> </DefaultValue>
65 </FieldInfo>
66 <FieldInfo>
67 <FieldName> f2 </FieldName>
68 <Type> 0 </Type>
69 <Length> 4 </Length>
70 <Primary> 0 </Primary>
71 <Null> 0 </Null>
72 <Default> 0 </Default>
73 <DefaultValue> </DefaultValue>
74 </FieldInfo>
75 </TableInfo>
76 <TableInfo>
77 <TableName> t2 </TableName>
78 <FieldInfo>
79 <FieldName> f1 </FieldName>
80 <Type> 32 </Type>
81 <Length> 12 </Length>
82 <Primary> 0 </Primary>
83 <Null> 0 </Null>
84 <Default> 0 </Default>
85 <DefaultValue> </DefaultValue>
86 </FieldInfo>
87 <FieldInfo>
88 <FieldName> f2 </FieldName>
89 <Type> 2 </Type>
90 <Length> 8 </Length>
91 <Primary> 0 </Primary>
92 <Null> 0 </Null>
93 <Default> 0 </Default>
94 <DefaultValue> </DefaultValue>
95 </FieldInfo>
96 </TableInfo>
97 </Table Information of all tables>
98 <Index Information of all Indexs>
99 <Index Name> t1_idx1_Primary </Index Name>
100 <Index Type> Hash Index </Index Type>
101 <Table Name> t1 </Table Name>
102 <Field Name> f1 </Field Name>
103 </Index Information of all Indexs>
104 Statement Executed
105 Statement Executed