Last modified: 2012-08-04 20:48:47 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 T20077, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18077 - Minor MySQL-isms in AbuseFilter
Minor MySQL-isms in AbuseFilter
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
AbuseFilter (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Andrew Garrett
: patch
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2009-03-21 01:56 UTC by Brad Jorsch
Modified: 2012-08-04 20:48 UTC (History)
1 user (show)

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


Attachments
Patch against r48647 to fix these minor issues (2.87 KB, patch)
2009-03-21 01:56 UTC, Brad Jorsch
Details

Description Brad Jorsch 2009-03-21 01:56:14 UTC
Created attachment 5948 [details]
Patch against r48647 to fix these minor issues

Since these are all incredibly minor, I'm just going to submit one patch for the lot of them. If you really want separate patches, let me know.

1. In Views/AbuseFilterViewList.php, a query uses GROUP BY without specifying all non-aggregate columns. However, it seems the entire join with abuse_filter_action is obsolete since r46359, so may as well just get rid of it.
2. In Views/AbuseFilterViewList.php, ">>" and "|" are of equal precedence in PG, so parens are needed for correct calculation.
3. MySQL silently converts arbitrary non-numeric strings to "0", while PG (correctly, IMO) throws an error. Thus, trying to delete "afa_filter = 'new'" in Views/AbuseFilterViewEdit.php causes an error.
4. Similarly, MySQL silently casts integers to booleans, while PG requires an explicit comparison with 0 for the same result. Easy fix in Views/AbuseFilterViewExamine.php.
5. The PG schema for the "text" table doesn't allow storing gzipped text; the MySQL schema wouldn't either if MySQL actually supported UTF8 so we didn't use BLOBs all over the place. Revision::compressRevisionText doesn't even try gzip when $wgCompressRevisions is false, you should too.
Comment 1 Andrew Garrett 2009-04-24 03:27:42 UTC
Applied in r49793. Sorry for the delay and thanks for the report.

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


Navigation
Links