()
| 321 | } |
| 322 | |
| 323 | @Test public void TestOpenCrash() |
| 324 | throws IOException, DbException, TransactionAbortedException { |
| 325 | setup(); |
| 326 | doInsert(hf1, 1, 2); |
| 327 | |
| 328 | // *** Test: |
| 329 | // insert but no commit |
| 330 | // crash |
| 331 | // data should not be there |
| 332 | |
| 333 | Transaction t = new Transaction(); |
| 334 | t.start(); |
| 335 | insertRow(hf1, t, 8); |
| 336 | Database.getBufferPool().flushAllPages(); // XXX something to UNDO |
| 337 | insertRow(hf1, t, 9); |
| 338 | |
| 339 | crash(); |
| 340 | |
| 341 | t = new Transaction(); |
| 342 | t.start(); |
| 343 | look(hf1, t, 1, true); |
| 344 | look(hf1, t, 8, false); |
| 345 | look(hf1, t, 9, false); |
| 346 | t.commit(); |
| 347 | } |
| 348 | |
| 349 | @Test public void TestOpenCommitOpenCrash() |
| 350 | throws IOException, DbException, TransactionAbortedException { |
nothing calls this directly
no test coverage detected