⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 holdcursorjdbc30.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 3 页
字号:
ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> commit;ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> next  test1;No current rowij> commit;ij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> commit;ij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> commit;ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> next  test1;No current rowij> commit;ij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> commit;ij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> next  test1;ERROR (no SQLState): Invalid operation: result set closedij> close test1;ij> commit;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> commit;ij> insert into foo values (1, 10);1 row inserted/updated/deletedij> insert into foo values (1, 20);1 row inserted/updated/deletedij> insert into foo values (1, 30);1 row inserted/updated/deletedij> insert into foo values (1, 40);1 row inserted/updated/deletedij> insert into foo values (1, 50);1 row inserted/updated/deletedij> -- insert into foo (select a + 5, data + 50 from foo);----- the following for update of data cursors will all use group fetch = 1, thus each----- next passes straight through to store.get with hold cursor test1 as    'select a,data from foo order by data desc';ij> close test1;ij> commit;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> commit;ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> commit;ij> next  test1;A |DATA       -----1 |50         ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> next  test1;A |DATA       -----1 |50         ij> commit;ij> next  test1;A |DATA       -----1 |40         ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> next  test1;A |DATA       -----1 |50         ij> commit;ij> next  test1;A |DATA       -----1 |40         ij> commit;ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> next  test1;A |DATA       -----1 |50         ij> commit;ij> next  test1;A |DATA       -----1 |40         ij> commit;ij> next  test1;A |DATA       -----1 |30         ij> next  test1;A |DATA       -----1 |20         ij> next  test1;A |DATA       -----1 |10         ij> commit;ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as    'select a,data from foo order by data desc';ij> next  test1;A |DATA       -----1 |50         ij> commit;ij> next  test1;A |DATA       -----1 |40         ij> commit;ij> next  test1;A |DATA       -----1 |30         ij> next  test1;A |DATA       -----1 |20         ij> next  test1;A |DATA       -----1 |10         ij> next  test1;No current rowij> commit;ij> close test1;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> get with hold cursor test1 as     'select a,data from foo order by data desc';ij> next  test1;A |DATA       -----1 |50         ij> commit;ij> next  test1;A |DATA       -----1 |40         ij> commit;ij> next  test1;A |DATA       -----1 |30         ij> next  test1;A |DATA       -----1 |20         ij> next  test1;A |DATA       -----1 |10         ij> next  test1;No current rowij> close test1;ij> commit;ij> -- should failnext test1;IJ ERROR: Unable to establish cursorij> commit;ij> ----------------------------------------------------------------------------------- TEST 7: test of hold cursor code in DistinctScalarAggregateResultSet.java-----     Directed test of hold cursor as applies to sort scans opened by-----     DistinctScalarAggregateResultSet.java.-----drop table t1;ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist.ij> create table t1 (c1 int, c2 int);0 rows inserted/updated/deletedij> insert into t1 values (null, null), (1,1), (null, null), (2,1), (3,1), (10,10);6 rows inserted/updated/deletedij> select * from t1;C1 |C2         -----NULL |NULL       1 |1          NULL |NULL       2 |1          3 |1          10 |10         ij> select sum(distinct c1) from t1;1          -----16         WARNING 01003: Null values were eliminated from the argument of a column function. : ij> get with hold cursor test1 as 'select sum(distinct c1) from t1';ij> commit;ij> next test1;1          -----16         WARNING 01003: Null values were eliminated from the argument of a column function. : ij> close test1;ij> get with hold cursor test1 as 'select sum(distinct c1) from t1';ij> next test1;1          -----16         WARNING 01003: Null values were eliminated from the argument of a column function. : ij> commit;ij> next test1;No current rowij> commit;ij> close test1;ij> commit;ij> ----------------------------------------------------------------------------------- TEST 8: test of hold cursor code in GroupedAggregateResultSet.java-----     Directed test of hold cursor as applies to sort scans opened by-----     GroupedAggregateResultSet.java.-----drop table t1;0 rows inserted/updated/deletedij> create table t1 (c1 int, c2 int);0 rows inserted/updated/deletedij> insert into t1 values (null, null), (1,1), (null, null), (2,1), (3,1), (10,10);6 rows inserted/updated/deletedij> select * from t1;C1 |C2         -----NULL |NULL       1 |1          NULL |NULL       2 |1          3 |1          10 |10         ij> select sum(distinct c1) from t1 group by c2;1          -----6          10         NULL       WARNING 01003: Null values were eliminated from the argument of a column function. : ij> commit;ij> get with hold cursor test1 as 'select sum(distinct c1) from t1 group by c2';ij> commit;ij> next test1;1          -----6          ij> next test1;1          -----10         ij> commit;ij> next test1;1          -----NULL       WARNING 01003: Null values were eliminated from the argument of a column function. : ij> close test1;ij> get with hold cursor test1 as 'select sum(distinct c1) from t1 group by c2';ij> next test1;1          -----6          ij> commit;ij> next test1;1          -----10         ij> commit;ij> next test1;1          -----NULL       WARNING 01003: Null values were eliminated from the argument of a column function. : ij> close test1;ij> ----------------------------------------------------------------------------------- TEST 9: test scan positioned on a row which has been purged.-----drop table t1;0 rows inserted/updated/deletedij> create table t1 (c1 int, c2 int);0 rows inserted/updated/deletedij> create index tx on t1 (c1);0 rows inserted/updated/deletedij> insert into t1 values (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6);6 rows inserted/updated/deletedij> get with hold cursor test1 as     'select c1 from t1';ij> next test1;C1         -----1          ij> commit;ij> -- at this point the btree scan is positioned by "key" on (1,1).  Make sure----- deleting this key doesn't cause any problems.delete from t1 where c1 = 1 or c1 = 2;2 rows inserted/updated/deletedij> next test1;C1         -----2          ij> -- at this point the btree scan is positioned on (3, 3), let's see what happens----- if we delete (3,3) and look at current scan.delete from t1 where c1 = 3;1 row inserted/updated/deletedij> -- position on (4,4)next test1;C1         -----3          ij> commit;ij> -- delete all the rows and hopefully get all rows to be purged by the time----- the scan does the next.delete from t1;3 rows inserted/updated/deletedij> commit;ij> next test1;C1         -----4          ij> close test1;ij> ----------------------------------------------------------------------------------- TEST 10: test scan positioned on a page which has been purged (should really-----          not be any different than a row being purged).-----drop table t1;0 rows inserted/updated/deletedij> create table t1 (c1 varchar(1000), c2 int);0 rows inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');Statement executed.ij> create index tx on t1 (c1);0 rows inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', NULL);Statement executed.ij> insert into t1 values (PADSTRING('1',1000), 1), (PADSTRING('2',1000), 2), (PADSTRING('3',1000), 3), (PADSTRING('4',1000), 4), (PADSTRING('5',1000), 5), (PADSTRING('6',1000), 6), (PADSTRING('7',1000), 7);7 rows inserted/updated/deletedij> get with hold cursor test1 as     'select c1 from t1';ij> next test1;C1                                                                                                                              -----1                                                                                                                              &ij> commit;ij> -- at this point the btree scan is positioned by "key" on (1,1).  Make sure----- deleting this key doesn't cause any problems.delete from t1 where c1 = PADSTRING('1',1000) or c1 = PADSTRING('2',1000);2 rows inserted/updated/deletedij> next test1;C1                                                                                                                              -----2                                                                                                                              &ij> -- at this point the btree scan is positioned on (3, 3), let's see what happens----- if we delete (3,3) and look at current scan.delete from t1 where c1 = PADSTRING('3',1000);1 row inserted/updated/deletedij> -- position on (4,4)next test1;C1                                                                                                                              -----3                                                                                                                              &ij> commit;ij> -- delete all the rows and hopefully get all rows to be purged by the time----- the scan does the next.delete from t1;4 rows inserted/updated/deletedij> commit;ij> next test1;C1                                                                                                                              -----4                                                                                                                              &ij> close test1;ij> ----------------------------------------------------------------------------------- TEST 11: beetle 4902: test query plans which use reopenScan() on a btree to -----          do the inner table processing of a join.  Prior to the fix a null-----          pointer exception would be thrown after the commit, as the code-----          did not handle keeping the resultset used for the inner table-----          open across commits in this case.-----drop table t1;0 rows inserted/updated/deletedij> drop table t2;ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T2' because it does not exist.ij> create table t1 (i1 int, i2 int);0 rows inserted/updated/deletedij> create table t2 (i1 int, i2 int);0 rows inserted/updated/deletedij> create index t1_idx on t1 (i1);0 rows inserted/updated/deletedij> create index t2_idx on t2 (i1);0 rows inserted/updated/deletedij> insert into t1 values (1, 10), (2, 20), (3, 30), (4, 40), (5, 50);5 rows inserted/updated/deletedij> insert into t2 values (1, 10), (2, 20),          (4, 40), (5, 50);4 rows inserted/updated/deletedij> commit;ij> -- force nestedLoop to make sure reopenScan() is used on inner table.get with hold cursor test11 as'select * from    t1, t2        where t1.i1 = t2.i1';ij> commit;ij> next test11;I1 |I2 |I1 |I2         -----1 |10 |1 |10         ij> commit;ij> next test11;I1 |I2 |I1 |I2         -----2 |20 |2 |20         ij> commit;ij> next test11;I1 |I2 |I1 |I2         -----4 |40 |4 |40         ij> next test11;I1 |I2 |I1 |I2         -----5 |50 |5 |50         ij> commit;ij> commit;ij> next test11;No current rowij> commit;ij> close test11;ij> ----------------------------------------------------------------------------------- TEST 12: beetle 4902: test query plans which use reopenScan() on a base table-----          to do the inner table processing of a join.  Prior to the fix a null-----          pointer exception would be thrown after the commit, as the code-----          did not handle keeping the resultset used for the inner table-----          open across commits in this case.-----drop table t1;0 rows inserted/updated/deletedij> drop table t2;0 rows inserted/updated/deletedij> create table t1 (i1 int, i2 int);0 rows inserted/updated/deletedij> create table t2 (i1 int, i2 int);0 rows inserted/updated/deletedij> insert into t1 values (1, 10), (2, 20), (3, 30), (4, 40), (5, 50);5 rows inserted/updated/deletedij> insert into t2 values (1, 10), (2, 20),          (4, 40), (5, 50);4 rows inserted/updated/deletedij> commit;ij> -- force nestedLoop to make sure reopenScan() is used on inner table.get with hold cursor test12 as'select * from    t1, t2        where t1.i1 = t2.i1';ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');Statement executed.ij> commit;ij> next test12;I1 |I2 |I1 |I2         -----1 |10 |1 |10         ij> commit;ij> next test12;I1 |I2 |I1 |I2         -----2 |20 |2 |20         ij> commit;ij> next test12;I1 |I2 |I1 |I2         -----4 |40 |4 |40         ij> next test12;I1 |I2 |I1 |I2         -----5 |50 |5 |50         ij> commit;ij> commit;ij> next test12;No current rowij> commit;ij> close test12;ij> exit;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -