Last modified: 2011-02-19 11:59:33 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 T29518, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27518 - Updater calls PopulateLogSearch before adding logging.log_user_text; populateLogUsertext not called
Updater calls PopulateLogSearch before adding logging.log_user_text; populate...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-18 02:52 UTC by Laurence 'GreenReaper' Parry
Modified: 2011-02-19 11:59 UTC (History)
1 user (show)

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


Attachments

Description Laurence 'GreenReaper' Parry 2011-02-18 02:52:51 UTC
The PopulateLogSearch updater function in maintenance/populateLogSearch.php is called when doing database updates for 1.16, as defined by the following code in getCoreUpdateList() from includes/installer/MysqlUpdater.php 

// 1.16
array( 'addTable', 'user_properties',                   'patch-user_properties.sql' ),
array( 'addTable', 'log_search',                        'patch-log_search.sql' ),
array( 'doLogSearchPopulation' ),
array( 'addField', 'logging',       'log_user_text',    'patch-log_user_text.sql' ),
....

Unfortunately the updater function relies on the presence of the field log_user_text in logging, which is added *after* the log search population. This causes updates to fail with a database error due to selects on the missing field (on MySQL 5.5.9, FreeBSD 8.1, MW 1.17 branch, updating a 1.15 database).

Switching the addField around so it is above the doLogSearchPopulation appeared to resolve this issue - the update proceeded, at least, though I'm not sure it had the right information since it just added that field.

The code in populateLogSearch.php was added in r56312 for bug 18472
...
// Add item author relations...
$userIds = $userIPs = array();
$sres = $db->select( 'logging',
array( 'log_user', 'log_user_text' ),
array( 'log_id' => $items )
...

--

On a related note, populateLogUsertext.php does not appear to be called. Deliberate? (The description at the top of the file also seems inaccurate.)
Comment 1 Max Semenik 2011-02-19 11:59:33 UTC
Fixed in r82445.

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


Navigation
Links