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

       Web browser: ---
             Bug #: 42600
           Summary: [Regression] removeUnusedAccounts.php broken
                    (uncommitted transaction)
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Maintenance scripts
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


It was hard to debug this one because we don't log the $fname for BEGIN/COMMIT
(bug 42598).

The delete('user', ..) query in removeUnusedAccounts.php triggers an automatic
transaction begin() call, from Database::query() via Database::delete():


> # If DBO_TRX is set, start a transaction
> if ( ( $this->mFlags & DBO_TRX ) && !$this->mTrxLevel &&
>       $sql != 'BEGIN' && $sql != 'COMMIT' && $sql != 'ROLLBACK'
> ) {
>       if ( strpos( $sqlstart, "SHOW " ) !== 0 && strpos( $sqlstart, "SET " ) 
> !== 0 ) {
>               $this->begin( __METHOD__ . " ($fname)" );
>               $this->mTrxAutomatic = true;
>       }
> }

However it isn't committed anywhere.

The SQL debug log looks like this:


Query krinkle_betawiki (2879) (slave): BEGIN /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */ 
Query krinkle_betawiki (2880) (slave): SELECT /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */  COUNT(*)  FROM
`mw_revision`  WHERE rev_user = '406'  LIMIT 1  
Query krinkle_betawiki (2881) (slave): SELECT /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */  COUNT(*)  FROM `mw_archive`
 WHERE ar_user = '406'  LIMIT 1  
Query krinkle_betawiki (2882) (slave): SELECT /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */  COUNT(*)  FROM `mw_image` 
WHERE img_user = '406'  LIMIT 1  
Query krinkle_betawiki (2883) (slave): SELECT /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */  COUNT(*)  FROM
`mw_oldimage`  WHERE oi_user = '406'  LIMIT 1  
Query krinkle_betawiki (2884) (slave): SELECT /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */  COUNT(*)  FROM
`mw_filearchive`  WHERE fa_user = '406'  LIMIT 1  
Query krinkle_betawiki (2885) (slave): COMMIT /*
RemoveUnusedAccounts::isInactiveAccount Krinkle */ 
Query krinkle_betawiki (2886) (slave): BEGIN /* DatabaseBase::query
(RemoveUnusedAccounts::execute) Krinkle */ 
Query krinkle_betawiki (2887) (slave): DELETE /* RemoveUnusedAccounts::execute
Krinkle */ FROM `mw_user` WHERE user_id IN
('44','45','46','48','50','51','52','53','54','56','62','64','66','67','69','70','73','76','77','78','79','81','82','83','84','86','87','90','91','92','93','96','104','105','106','111','112','113','118','119','123','126','131','133','137','138','141','142','144','145','148','151','152','157','158','160','162','163','164','165','166','167','170','171','172','173','174','176','177','179','180','181','183','184','186
Query krinkle_betawiki (2888) (slave): DELETE /* RemoveUnusedAccounts::execute
Krinkle */ FROM `mw_logging` WHERE log_user IN
('44','45','46','48','50','51','52','53','54','56','62','64','66','67','69','70','73','76','77','78','79','81','82','83','84','86','87','90','91','92','93','96','104','105','106','111','112','113','118','119','123','126','131','133','137','138','141','142','144','145','148','151','152','157','158','160','162','163','164','165','166','167','170','171','172','173','174','176','177','179','180','181','183','184',
Query krinkle_betawiki (2889) (slave): DELETE /* RemoveUnusedAccounts::execute
Krinkle */ FROM `mw_recentchanges` WHERE rc_user IN
('44','45','46','48','50','51','52','53','54','56','62','64','66','67','69','70','73','76','77','78','79','81','82','83','84','86','87','90','91','92','93','96','104','105','106','111','112','113','118','119','123','126','131','133','137','138','141','142','144','145','148','151','152','157','158','160','162','163','164','165','166','167','170','171','172','173','174','176','177','179','180','181','183','

.. and that's the end of it, after this the execution naturally terminates from
the maintenance script.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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