Index: trunk/phase3/maintenance/populateParentId.php |
— | — | @@ -22,6 +22,14 @@ |
23 | 23 | echo "Populating rev_parent_id column\n"; |
24 | 24 | $start = $db->selectField( 'revision', 'MIN(rev_id)', false, __FUNCTION__ ); |
25 | 25 | $end = $db->selectField( 'revision', 'MAX(rev_id)', false, __FUNCTION__ ); |
| 26 | + if( is_null( $start ) || is_null( $end ) ){ |
| 27 | + echo "...revision table seems to be empty.\n"; |
| 28 | + $db->insert( 'updatelog', |
| 29 | + array( 'ul_key' => 'populate rev_parent_id' ), |
| 30 | + __FUNCTION__, |
| 31 | + 'IGNORE' ); |
| 32 | + return; |
| 33 | + } |
26 | 34 | # Do remaining chunk |
27 | 35 | $end += BATCH_SIZE - 1; |
28 | 36 | $blockStart = $start; |