Last modified: 2014-09-24 11:03:14 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 T73207, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71207 - MS SQL Driver doesn't handle escaping for LIKE patterns correctly
MS SQL Driver doesn't handle escaping for LIKE patterns correctly
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.25-git
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: mssql
  Show dependency treegraph
 
Reported: 2014-09-23 23:10 UTC by Emad Elwany
Modified: 2014-09-24 11:03 UTC (History)
1 user (show)

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


Attachments

Description Emad Elwany 2014-09-23 23:10:49 UTC
MS SQL requires specifying the escape character in the query using the ESCAPE directive. The way it is currently handled leads to incorrect escaping, for example, simpleSearch doesn't work since the backend query contains something like:

"...page_title LIKE '%foo\_bar'%..." which works for most DB's, but MS SQL requires:
"...page_title LIKE '%foo\_bar'% ESCAPE '\'..."

This is breaking various functions around the code base that expect LIKE queries to work correctly.
Comment 1 Gerrit Notification Bot 2014-09-23 23:34:29 UTC
Change 162508 had a related patch set uploaded by Emadelwany:
Add ESCAPE identifier to MS SQL LIKE queries so that the escaping would work as expected.

https://gerrit.wikimedia.org/r/162508

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


Navigation
Links