Last modified: 2012-08-04 20:49:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12273 - Unable to Compare Selected Versions with postgres
Unable to Compare Selected Versions with postgres
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.11.x
All All
: Normal critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2007-12-11 07:43 UTC by Andrew McMillan
Modified: 2012-08-04 20:49 UTC (History)
1 user (show)

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


Attachments

Description Andrew McMillan 2007-12-11 07:43:11 UTC
Steps to reproduce:

1) On a fresh install of MediaWiki 1.11.0, using a PostgreSQL 8.1 database
2) I edit the main page to insert an 'x' at the start (i.e. make an arbitrary change).
3) Go to the 'History' page and click on 'Compare Selected Versions'.

The following result ensues because YYYYMMDDHHMMSS is not valid syntax for a timestamp.  It should separate the date and time parts with a 'T' like '20071211T072639'.  When I manually run the query with that edit it does not cause an error.

The full error detail is as follows:

A database error has occurred Query: SELECT * FROM recentchanges WHERE rc_timestamp = '20071211074158' AND rc_this_oldid = '2' AND rc_last_oldid = '1' AND rc_patrolled = '0' Function: DifferenceEngine::showDiffPage Error: 1 ERROR: invalid input syntax for type timestamp with time zone: "20071211074158"

Backtrace:

#0 /usr/share/mediawiki/includes/Database.php(795): DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'SELECT * FROM...', 'DifferenceEngin...', false)
#1 /usr/share/mediawiki/includes/Database.php(1240): Database->query('SELECT * FROM...', 'DifferenceEngin...')
#2 /usr/share/mediawiki/includes/RecentChange.php(100): Database->select('recentchanges', '*', Array, 'DifferenceEngin...')
#3 /usr/share/mediawiki/includes/DifferenceEngine.php(177): RecentChange::newFromConds(Array, 'DifferenceEngin...')
#4 /usr/share/mediawiki/includes/Article.php(674): DifferenceEngine->showDiffPage(false)
#5 /usr/share/mediawiki/includes/Wiki.php(383): Article->view()
#6 /usr/share/mediawiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#7 /usr/share/mediawiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#8 {main}
Comment 1 Andrew McMillan 2007-12-11 07:52:10 UTC
Note that I actually have to simplify the query to:

SELECT * FROM mediawiki.recentchanges WHERE rc_this_oldid = '2' AND rc_last_oldid = '1' ;

Before I get any actual *results*. 

Changing the format of the timestamp as I described above only means that the query does not generate a parse error in the database.

Regards,
Andrew McMillan.
Comment 2 Greg Sabino Mullane 2007-12-11 21:14:56 UTC
This was fixed in r25696. Use the diff there, or simply patch DifferenceEngine.php yourself by changing line 174 or so (the one with rc_timestamp) to:

'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ),

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


Navigation
Links