📄 rollforwardrecovery.out
字号:
112 |rollforward 113 |rollforward 114 |rollforward 115 |rollforward 116 |rollforward 117 |rollforward 118 |rollforward 119 |rollforward 120 |rollforward 121 |rollforward 122 |rollforward 123 |rollforward 124 |rollforward 125 |rollforward 126 |rollforward 127 |rollforward 128 |rollforward 129 |rollforward 130 |rollforward 131 |rollforward 1002 |rollforward 1001 |rollforward 101 |rollforward 100 |rollforward 1000 |rollforward 1 |rollforward 0 |rollforward ij> select * from t4;C1 -----------100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 1000 ij> create table t5(c1 int );0 rows inserted/updated/deletedij> --unlogged add column because of primary keyalter table t5 add column c2 int not null primary key default 0;0 rows inserted/updated/deletedij> --logged add columnalter table t5 add column c3 int not null default 0;0 rows inserted/updated/deletedij> --unlogged add columnalter table t5 add column c4 char(100) not null default '0';0 rows inserted/updated/deletedij> alter table t5 add constraint uconst UNIQUE(c4);0 rows inserted/updated/deletedij> insert into t5 values ( 1 , 2, 3 , 'one'), (11 , 22, 33, 'eleven'), (111, 222, 333, 'one hundred eleven');3 rows inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> connect 'jdbc:derby:wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';ij> select * from t5 ;C1 |C2 |C3 |C4 ----------------------------------------------------------------------------------------------------------------------------------------1 |2 |3 |one 11 |22 |33 |eleven 111 |222 |333 |one hundred eleven ij> --check if constraits are intact.--following insert should throw error because they violate constraints;insert into t5 values ( 1 , 2, 3 , 'one');ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'xxxxGENERATED-IDxxxx' defined on 'T5'.ij> insert into t5 values ( 1111 , 2222, null , 'one again');ERROR 23502: Column 'C3' cannot accept a NULL value.ij> insert into t5 values ( 1111 , 2222, 3333 , 'one');ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'UCONST' defined on 'T5'.ij> insert into t5 values ( 1111 , 2222, 3333 , 'four ones ..');1 row inserted/updated/deletedij> select * from t5;C1 |C2 |C3 |C4 ----------------------------------------------------------------------------------------------------------------------------------------1 |2 |3 |one 11 |22 |33 |eleven 111 |222 |333 |one hundred eleven 1111 |2222 |3333 |four ones .. ij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> connect 'jdbc:derby:wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';ij> select * from t5;C1 |C2 |C3 |C4 ----------------------------------------------------------------------------------------------------------------------------------------1 |2 |3 |one 11 |22 |33 |eleven 111 |222 |333 |one hundred eleven 1111 |2222 |3333 |four ones .. ij> --- Have to check long varchar/binary recovery stuff.-- create a table with 5 rows, with 4K pageSize,-- this should expand over 3 pagescreate table testing (a varchar(2024), b varchar(1024), c varchar(1024), d varchar(2048), e varchar(300)) ;0 rows inserted/updated/deletedij> -- insert 9 rows into the tableinsert into testing values (PADSTRING('1',2024), PADSTRING('2',1024), PADSTRING('3',1024), PADSTRING('4',2048), PADSTRING('5',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('10',2024), PADSTRING('20',1024), PADSTRING('30',1024), PADSTRING('40',2048), PADSTRING('50',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('100',2024), PADSTRING('200',1024), PADSTRING('300',1024), PADSTRING('400',2048), PADSTRING('500',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('1000',2024), PADSTRING('2000',1024), PADSTRING('3000',1024), PADSTRING('4000',2048), PADSTRING('5000',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('10000',2024), PADSTRING('20000',1024), PADSTRING('30000',1024), PADSTRING('40000',2048), PADSTRING('50000',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('100000',2024), PADSTRING('200000',1024), PADSTRING('300000',1024), PADSTRING('400000',2048), PADSTRING('500000',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('1000000',2024), PADSTRING('2000000',1024), PADSTRING('3000000',1024), PADSTRING('4000000',2048), PADSTRING('5000000',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('10000000',2024), PADSTRING('20000000',1024), PADSTRING('30000000',1024), PADSTRING('40000000',2048), PADSTRING('50000000',300));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('100000000',2024),PADSTRING('200000000',1024), PADSTRING('300000000',1024), PADSTRING('400000000',2048), PADSTRING('500000000',300));1 row inserted/updated/deletedij> connect 'jdbc:derby:wombat;shutdown=true';ERROR 08006: Database 'wombat' shutdown.ij> disconnect;ij> connect 'jdbc:derby:wombat;rollForwardRecoveryFrom=extinout/mybackup/wombat';ij> -- select the whole row, or individual columns.-- 9 rows should be returned from each of the following selectsselect * from testing;A |B |C |D |E --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------1 &|2 &|3 &|4 &|5 &10 &|20 &|30 &|40 &|50 &100 &|200 &|300 &|400 &|500 &1000 &|2000 &|3000 &|4000 &|5000 &10000 &|20000 &|30000 &|40000 &|50000 &100000 &|200000 &|300000 &|400000 &|500000 &
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -