Last modified: 2013-02-26 16:25:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42302, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40302 - maintenance/updateSearchIndex.php gives Error: 1100 Table 'intranet_user' was not locked with LOCK TABLES (localhost)
maintenance/updateSearchIndex.php gives Error: 1100 Table 'intranet_user' was...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.19.2
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 17:04 UTC by Orion Poplawski
Modified: 2013-02-26 16:25 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Orion Poplawski 2012-09-17 17:04:56 UTC
On one of my media wiki instances I when running maintenance/updateSearchIndex.php I would get:

A database error has occurred.  Did you forget to run maintenance/update.php after upgrading?  See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT  rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,page_namespace,page_title,page_id,page_latest,user_name  FROM `intranet_revision` INNER JOIN `intranet_page` ON ((page_id = rev_page)) LEFT JOIN `intranet_user` ON ((rev_user != 0) AND (user_id = rev_user))  WHERE rev_page = '280' AND page_id = '280' AND (rev_id=page_latest)  LIMIT 1  
Function: Revision::fetchFromConds
Error: 1100 Table 'intranet_user' was not locked with LOCK TABLES (localhost)

I fixed this by also locking the user table for reading:

--- /usr/share/mediawiki119/maintenance/Maintenance.php.orig    2012-09-17 10:55:30.903679871 -0600
+++ /usr/share/mediawiki119/maintenance/Maintenance.php 2012-09-17 10:51:40.341680145 -0600
@@ -1084,7 +1084,7 @@
         */
        private function lockSearchindex( &$db ) {
                $write = array( 'searchindex' );
-               $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache' );
+               $read = array( 'page', 'revision', 'text', 'interwiki', 'l10n_cache', 'user' );
                $db->lockTables( $read, $write, __CLASS__ . '::' . __METHOD__ );
        }
Comment 1 Sam Reed (reedy) 2012-09-17 18:17:59 UTC
Done, thanks!

https://gerrit.wikimedia.org/r/24024
Comment 2 Orion Poplawski 2013-02-26 16:25:52 UTC
This didn't make it into 1.19.3.  Any chance this can make it into the 1.19.X branch?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links