()
| 510 | } |
| 511 | |
| 512 | public void run() { |
| 513 | try { |
| 514 | int c = 0; |
| 515 | while(c < count) { |
| 516 | Tuple t = BTreeUtility.getBTreeTuple(item, 2); |
| 517 | Database.getBufferPool().insertTuple(tid, bf.getId(), t); |
| 518 | |
| 519 | IndexPredicate ipred = new IndexPredicate(Op.EQUALS, t.getField(bf.keyField())); |
| 520 | DbFileIterator it = bf.indexIterator(tid, ipred); |
| 521 | it.open(); |
| 522 | c = 0; |
| 523 | while(it.hasNext()) { |
| 524 | it.next(); |
| 525 | c++; |
| 526 | } |
| 527 | it.close(); |
| 528 | } |
| 529 | synchronized(slock) { |
| 530 | success = true; |
| 531 | } |
| 532 | } catch (Exception e) { |
| 533 | e.printStackTrace(); |
| 534 | synchronized(elock) { |
| 535 | error = e; |
| 536 | } |
| 537 | |
| 538 | Database.getBufferPool().transactionComplete(tid, false); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | /** |
| 543 | * @return true if we successfully inserted the tuple |
nothing calls this directly
no test coverage detected