Last modified: 2012-08-04 20:49:00 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 T14910, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12910 - MySQL Specific SQL in SpecialRecentchanges
MySQL Specific SQL in SpecialRecentchanges
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.12.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres 12784
  Show dependency treegraph
 
Reported: 2008-02-04 14:06 UTC by OverlordQ
Modified: 2012-08-04 20:49 UTC (History)
1 user (show)

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


Attachments

Description OverlordQ 2008-02-04 14:06:52 UTC
The SQL starting on line 162:

===
 $sql2 = "SELECT * FROM $recentchanges $forceclause".
          ($uid ? "LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") .
          "WHERE rc_timestamp >= '{$cutoff}' {$hidem} " .
          "ORDER BY rc_timestamp DESC";
===

Does not work in current versions of PostgreSQL and will not work in future versions.
Comment 1 OverlordQ 2008-02-04 14:41:25 UTC
This is due to the fact that in the recentchanges table rc_bot is a character(1) field, and you're trying to compare it to a 1 or a 0.

This can either be rectified by 

A) Using an actual integer datatype for the table in PG
-or-
B) Using a cast

Without digging deeper, option A would require no code changes here, but might elsewhere, while option B would require changing code.
Comment 2 Brion Vibber 2008-02-04 19:44:17 UTC
You're using a 1-character text string for boolean fields? Ok, you guys can stop making fun of us for our funny timestamp format now. ;)
Comment 3 OverlordQ 2008-02-14 22:17:11 UTC
I believe this was fixed in r30800 and Greg just forgot to close this bug. 
Comment 4 Greg Sabino Mullane 2008-02-14 22:25:03 UTC
(In reply to comment #2)
> You're using a 1-character text string for boolean fields? Ok, you guys can
> stop making fun of us for our funny timestamp format now. ;)

We only did that because you guys don't have a real boolean field, and assign 1 and 0 to your pseudo-booleans in the code. :) No worries, PG is using smallint everywhere mysql is using bool/tinyint now, so everyone should be happy.

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


Navigation
Links