From f05b857c4fd6605591d35d706e11e9d5401d27a0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 11 May 2006 22:56:19 +0000 Subject: [PATCH] * dumpTextPass now skips goes to database for entries that were blank in the previous dump, as this may indicate a broken dump. --- RELEASE-NOTES | 3 +++ maintenance/dumpTextPass.php | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 30fd27e8a5..7b26eb9266 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -241,6 +241,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 5891) Linktrail for Polish language (pl) * User::isBureaucrat , User::isDeveloper , User::isSysop deprecated in v1.6 now die with a backtrace. They will be removed in v1.8 +* dumpTextPass now skips goes to database for entries that were blank in the + previous dump, as this may indicate a broken dump. + == Compatibility == diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index c0ab81bd98..02eb3d7aac 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -123,8 +123,14 @@ class TextPassDumper extends BackupDumper { function getText( $id ) { if( isset( $this->prefetch ) ) { $text = $this->prefetch->prefetch( $this->thisPage, $this->thisRev ); - if( !is_null( $text ) ) + if( $text === null ) { + // Entry missing from prefetch dump + } elseif( $text === "" ) { + // Blank entries may indicate that the prior dump was broken. + // To be safe, reload it. + } else { return $text; + } } $id = intval( $id ); $row = $this->db->selectRow( 'text', -- 2.20.1