Last modified: 2014-09-23 23:13:03 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 T29300, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27300 - FileSearch does not work with MySQL due to "LOWER(img_name)"
FileSearch does not work with MySQL due to "LOWER(img_name)"
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-10 10:33 UTC by b.wilhelm
Modified: 2014-09-23 23:13 UTC (History)
3 users (show)

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


Attachments
Change on Line 43 (5.41 KB, patch)
2011-02-10 10:35 UTC, b.wilhelm
Details

Description b.wilhelm 2011-02-10 10:33:56 UTC
LOWER(img_name) does not search in binary fields

LOWER(CONVERT(img_name USING latin1)) < solves the problem

see attachment on line 43

--
# MySQL-Server Version: 5.1.33-community
# PHP Version: 5.2.9
Comment 1 b.wilhelm 2011-02-10 10:35:05 UTC
Created attachment 8119 [details]
Change on Line 43
Comment 2 Bryan Tong Minh 2011-02-10 10:55:29 UTC
The contents of the fields is utf8, so it should be something like CONVERT(img_name USING utf8).
This would presumably break other databases though.
Comment 3 p858snake 2011-04-30 00:08:53 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 4 Sumana Harihareswara 2011-11-09 03:01:36 UTC
b.wilhelm, have you had time to respond to Bryan Tong Minh's comment about your patch?  I hope you'll update it to work against current trunk.  Thank you!
Comment 5 b.wilhelm 2011-11-21 09:15:43 UTC
(In reply to comment #4)
> b.wilhelm, have you had time to respond to Bryan Tong Minh's comment about your
> patch?  I hope you'll update it to work against current trunk.  Thank you!

in mediawiki 1.17 and 1.18RC1 in file includes\specials\SpecialListfiles.php
search "LOWER(img_name)"
replace "LOWER(CONVERT(img_name USING utf8))"
(without quotes)
Comment 6 Sumana Harihareswara 2012-10-14 21:22:39 UTC
Is this still reproducible?
Comment 8 Bryan Tong Minh 2012-10-25 13:46:59 UTC
The neatest solution would be to introduce a CONVERT() wrapper in DatabaseBase, but I'm not sure that is such a good idea, since there is so limited use for this.
This could probably be fixed by using a mysql only exception in SpecialListfiles, but that is not really nice.

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


Navigation
Links