ij> -- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- by default, holdability of ResultSet objects created using this Connection object is true. Following will set it to false for this connection. NoHoldForConnection; ij> create table a (a int); 0 rows inserted/updated/deleted ij> insert into a values (1); 1 row inserted/updated/deleted ij> select * from a; A ----------- 1 ij> drop table a; 0 rows inserted/updated/deleted ij> create table b (si smallint,i int, bi bigint, r real, f float, d double precision, n5_2 numeric(5,2), dec10_3 decimal(10,3), ch20 char(20),vc varchar(20), lvc long varchar, blobCol blob(1000), clobCol clob(1000)); 0 rows inserted/updated/deleted ij> insert into b values(2,3,4,5.3,5.3,5.3,31.13,123456.123, 'one','one','one',cast(X'01ABCD' as blob(1000)),'one'); 1 row inserted/updated/deleted ij> insert into b values(-32768,-2147483648, -9223372036854775808 ,1.2E-37, 2.225E-307, +2.225E-307,-56.12, -123456.123,'one','one','one', cast(X'01ABCD' as blob(1000)),'one'); 1 row inserted/updated/deleted ij> insert into b values(null,null,null,null,null,null,null,null,null,null,null,null,null); 1 row inserted/updated/deleted ij> insert into b values(32767,2147483647, 9223372036854775807 ,1.4 , 3.4028235E38 ,3.4028235E38 ,999.99, 9999999.999,'one','one','one',cast(X'01ABCD' as blob(1000)), 'one'); 1 row inserted/updated/deleted ij> select * from b; SI |I |BI |R |F |D |N5_2 |DEC10_3 |CH20 |VC |LVC |BLOBCOL |CLOBCOL --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 |3 |4 |5.3 |5.3 |5.3 |31.13 |123456.123 |one |one |one |01abcd |one -32768|-2147483648|-9223372036854775808|1.2E-37 |2.225E-307 |2.225E-307 |-56.12 |-123456.123 |one |one |one |01abcd |one NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL |NULL 32767 |2147483647 |9223372036854775807 |1.4 |3.4028235E38 |3.4028235E38 |999.99 |9999999.999 |one |one |one |01abcd |one ij> drop table b; 0 rows inserted/updated/deleted ij> create table c (si smallint not null,i int not null , bi bigint not null, r real not null, f float not null, d double precision not null, n5_2 numeric(5,2) not null , dec10_3 decimal(10,3) not null, ch20 char(20) not null ,vc varchar(20) not null, lvc long varchar not null, blobCol blob(1000) not null, clobCol clob(1000) not null); 0 rows inserted/updated/deleted ij> insert into c values(2,3,4,5.3,5.3,5.3,31.13,123456.123, 'one','one','one', cast(X'01ABCD' as blob(1000)), 'one'); 1 row inserted/updated/deleted ij> insert into c values(-32768,-2147483648, -9223372036854775808 ,1.2E-37, 2.225E-307, +2.225E-307,-56.12, -123456.123,'one','one','one', cast(X'01ABCD' as blob(1000)),'one'); 1 row inserted/updated/deleted ij> select * from c; SI |I |BI |R |F |D |N5_2 |DEC10_3 |CH20 |VC |LVC |BLOBCOL |CLOBCOL --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 |3 |4 |5.3 |5.3 |5.3 |31.13 |123456.123 |one |one |one |01abcd |one -32768|-2147483648|-9223372036854775808|1.2E-37 |2.225E-307 |2.225E-307 |-56.12 |-123456.123 |one |one |one |01abcd |one ij> values(10); 1 ----------- 10 ij> values('hello'); 1 ----- hello ij> values(1.2); 1 ---- 1.2 ij> drop table c; 0 rows inserted/updated/deleted ij> -- bug 4430 aliasinfo nullability problem select aliasinfo from sys.sysaliases where aliasinfo is null; ALIASINFO --------------- ij> -- test commit and rollback autocommit off; ij> create table a(a int); 0 rows inserted/updated/deleted ij> insert into a values (1); 1 row inserted/updated/deleted ij> select * from a; A ----------- 1 ij> commit; ij> drop table a; 0 rows inserted/updated/deleted ij> rollback; ij> select * from a; A ----------- 1 ij> drop table a; 0 rows inserted/updated/deleted ij> commit; ij> autocommit on; ij> maximumdisplaywidth 5000; ij> --test 84 columns values(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84); 1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 |73 |74 |75 |76 |77 |78 |79 |80 |81 |82 |83 |84 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 |73 |74 |75 |76 |77 |78 |79 |80 |81 |82 |83 |84 ij> values(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100); 1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 |73 |74 |75 |76 |77 |78 |79 |80 |81 |82 |83 |84 |85 |86 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |40 |41 |42 |43 |44 |45 |46 |47 |48 |49 |50 |51 |52 |53 |54 |55 |56 |57 |58 |59 |60 |61 |62 |63 |64 |65 |66 |67 |68 |69 |70 |71 |72 |73 |74 |75 |76 |77 |78 |79 |80 |81 |82 |83 |84 |85 |86 |87 |88 |89 |90 |91 |92 |93 |94 |95 |96 |97 |98 |99 |100 ij> -- test SQL Error with non-string arguments -- Make sure connection still ok (Bug 4657) create table a (a int); 0 rows inserted/updated/deleted ij> insert into a values(2342323423) ; ERROR 22003: The resulting value is outside the range for the data type INTEGER. ij> insert into a values(1); 1 row inserted/updated/deleted ij> select * from a; A ----------- 1 ij> drop table a; 0 rows inserted/updated/deleted ij> -- Bug 4694 Test automatic rollback with close of connection -- in ij connect 'wombat'; ij(CONNECTION1)> autocommit off; ij(CONNECTION1)> create table a (a int); 0 rows inserted/updated/deleted ij(CONNECTION1)> select count(*) from a; 1 ----------- 0 ij(CONNECTION1)> disconnect; ij> set connection connection0; ij> select count(*) from a; ERROR 42X05: Table/View 'A' does not exist. ij> -- Bug 4758 - Store error does not return properly to client autocommit off; ij> create table t (i int); 0 rows inserted/updated/deleted ij> insert into t values(1); 1 row inserted/updated/deleted ij> commit; ij> insert into t values(2); 1 row inserted/updated/deleted ij> connect 'wombat'; ij(CONNECTION1)> -- by default, holdability of ResultSet objects created using this Connection object is true. Following will set it to false for this connection. NoHoldForConnection; ij(CONNECTION1)> prepare s1 as 'select * from t'; ij(CONNECTION1)> execute s1; I ----------- ERROR 40XL1: A lock could not be obtained within the time requested ij(CONNECTION1)> execute s1; I ----------- ERROR 40XL1: A lock could not be obtained within the time requested ij(CONNECTION1)> -- Bug 5967 - Selecting from 2 lob columns w/ the first one having data of length 0 create table t1 (c1 clob(10), c2 clob(10)); 0 rows inserted/updated/deleted ij(CONNECTION1)> insert into t1 values ('', 'some clob'); 1 row inserted/updated/deleted ij(CONNECTION1)> select * from t1; C1 |C2 --------------------- |some clob ij(CONNECTION1)> select c2 from t1; C2 ---------- some clob ij(CONNECTION1)> insert into t1 values ('', ''); 1 row inserted/updated/deleted ij(CONNECTION1)> insert into t1 values ('some clob', ''); 1 row inserted/updated/deleted ij(CONNECTION1)> select * from t1; C1 |C2 --------------------- |some clob | some clob | ij(CONNECTION1)> select c2 from t1; C2 ---------- some clob ij(CONNECTION1)> drop table t1; 0 rows inserted/updated/deleted ij(CONNECTION1)> commit; ij(CONNECTION1)> disconnect; ij> set connection connection0; ij> autocommit on; ij> drop table t; 0 rows inserted/updated/deleted ij>