https://bugzilla.wikimedia.org/show_bug.cgi?id=52778

--- Comment #9 from Sam Reed (reedy) <[email protected]> ---
There's the DELETE part too.. Both should be easily updated to use batched
queries

Our delete wrapper in it's current form doesn't take options...

Ideally

            do {
                $res = $dbw->delete(
                    'user_properties',
                    array(
                        'up_property' => 'skin',
                        'up_value NOT IN (' . $dbw->makeList( $dontChange ) .
')'
                    ),
                    __METHOD__,
                    array( 'LIMIT' => 50 )
                );
                wfWaitForSlaves();
            } while ( $res->numRows() === 50 );


but in the current state... Ugh.

            do {
                $res = $dbw->query(
                    "DELETE FROM user_properties WHERE up_property='skin' AND
up_value NOT IN ({$dbw->makeList( $dontChange )}) LIMIT 50",
                    __METHOD__
                );
                wfWaitForSlaves();
            } while ( $res->numRows() === 50 );


Logging a bug for it!

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to