|
@@ 1628-1637 (lines=10) @@
|
| 1625 |
|
list( $index, $options, $fallbackIndex, $fallbackOptions ) = |
| 1626 |
|
DBAccessObjectUtils::getDBOptions( $flags ); |
| 1627 |
|
|
| 1628 |
|
if ( !$row ) { |
| 1629 |
|
// Text data is immutable; check replica DBs first. |
| 1630 |
|
$row = wfGetDB( $index )->selectRow( |
| 1631 |
|
'text', |
| 1632 |
|
[ 'old_text', 'old_flags' ], |
| 1633 |
|
[ 'old_id' => $textId ], |
| 1634 |
|
__METHOD__, |
| 1635 |
|
$options |
| 1636 |
|
); |
| 1637 |
|
} |
| 1638 |
|
|
| 1639 |
|
// Fallback to DB_MASTER in some cases if the row was not found |
| 1640 |
|
if ( !$row && $fallbackIndex !== null ) { |
|
@@ 1640-1650 (lines=11) @@
|
| 1637 |
|
} |
| 1638 |
|
|
| 1639 |
|
// Fallback to DB_MASTER in some cases if the row was not found |
| 1640 |
|
if ( !$row && $fallbackIndex !== null ) { |
| 1641 |
|
// Use FOR UPDATE if it was used to fetch this revision. This avoids missing the row |
| 1642 |
|
// due to REPEATABLE-READ. Also fallback to the master if READ_LATEST is provided. |
| 1643 |
|
$row = wfGetDB( $fallbackIndex )->selectRow( |
| 1644 |
|
'text', |
| 1645 |
|
[ 'old_text', 'old_flags' ], |
| 1646 |
|
[ 'old_id' => $textId ], |
| 1647 |
|
__METHOD__, |
| 1648 |
|
$fallbackOptions |
| 1649 |
|
); |
| 1650 |
|
} |
| 1651 |
|
|
| 1652 |
|
if ( !$row ) { |
| 1653 |
|
wfDebugLog( 'Revision', "No text row with ID '$textId' (revision {$this->getId()})." ); |