isValid(firstPage) == compare(firstPage, firstPage) isValid(otherPage) == compare(firstPage, otherPage) Swap file1, file2 if comparePages( file2.firstPage, file1.firstPage )
| 1529 | // isValid(otherPage) == compare(firstPage, otherPage) |
| 1530 | // Swap file1, file2 if comparePages( file2.firstPage, file1.firstPage ) |
| 1531 | static bool comparePages(void* v1, void* v2) { |
| 1532 | Page* p1 = (Page*)v1; |
| 1533 | Page* p2 = (Page*)v2; |
| 1534 | return p2->checkHash() && (p2->seq >= p1->seq || !p1->checkHash()); |
| 1535 | } |
| 1536 | |
| 1537 | RawDiskQueue_TwoFiles* rawQueue; |
| 1538 | UID dbgid; |