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

📄 rollforwardrecovery.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 5 页
字号:
2          3          4          5          ij> select * from t2;B          -----------1          2          3          4          5          ij> select * from t3;C1         |C2                  --------------------------------1          |NULL                2          |NULL                3          |NULL                4          |NULL                5          |NULL                6          |NULL                7          |NULL                8          |NULL                9          |NULL                10         |NULL                11         |NULL                12         |NULL                13         |NULL                14         |NULL                15         |NULL                16         |NULL                17         |NULL                18         |NULL                19         |NULL                20         |NULL                21         |NULL                22         |NULL                23         |NULL                24         |NULL                25         |NULL                26         |NULL                27         |NULL                28         |NULL                29         |NULL                30         |NULL                ij> select * from t4;C1         -----------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        130        1001       ij> insert into t3 (c1) values(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), (130);30 rows inserted/updated/deletedij> insert into t3 (c1) values(1001), (1000);2 rows inserted/updated/deletedij> --unlogged primary key add constraintalter table t3 add constraint pk1 primary key(c1);0 rows inserted/updated/deletedij> --unlogged foreign key addalter table t4 add constraint fk1 foreign key (c1) references t3(c1);0 rows inserted/updated/deletedij> --unlogged add unique constraintalter table t4 add constraint uk2 unique(c1);0 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> --following insert should throw duplicate error.insert into t4 values(101);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 'UK2' defined on 'T4'.ij> insert into t3 (c1) values(101);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 'PK1' defined on 'T3'.ij> --folowing should throw foreign key violations error.insert into t4 values(9999);ERROR 23503: INSERT on table 'T4' caused a violation of foreign key constraint 'FK1' for key (9999).  The statement has been rolled back.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 t1;A          -----------1          2          3          4          5          ij> select * from t2;B          -----------1          2          3          4          5          ij> select c1 from t3;C1         -----------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         

⌨️ 快捷键说明

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