dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84b1614
)
add a damn deadlock loop on this thing
author
Brion Vibber
<brion@users.mediawiki.org>
Fri, 3 Oct 2008 22:23:03 +0000
(22:23 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Fri, 3 Oct 2008 22:23:03 +0000
(22:23 +0000)
maintenance/updateRestrictions.php
patch
|
blob
|
history
diff --git
a/maintenance/updateRestrictions.php
b/maintenance/updateRestrictions.php
index
fd4c271
..
7041e59
100644
(file)
--- a/
maintenance/updateRestrictions.php
+++ b/
maintenance/updateRestrictions.php
@@
-66,7
+66,12
@@
function migrate_page_restrictions( $db ) {
# We use insert() and not replace() as Article.php replaces
# page_restrictions with '' when protected in the restrictions table
if ( count( $batch ) ) {
- $db->insert( 'page_restrictions', $batch, __FUNCTION__, array( 'IGNORE' ) );
+ $ok = $db->deadlockLoop(
+ array( $db, 'insert' ),
+ 'page_restrictions', $batch, __FUNCTION__, array( 'IGNORE' ) );
+ if( !$ok ) {
+ throw new MWException( "Deadlock loop failed wtf :(" );
+ }
}
$blockStart += BATCH_SIZE - 1;
$blockEnd += BATCH_SIZE - 1;