Last modified: 2011-12-21 19:36:04 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 T33276, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31276 - Database error with some regexp in Special:ReplaceText
Database error with some regexp in Special:ReplaceText
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
ReplaceText (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-30 14:16 UTC by Dan Bolser
Modified: 2011-12-21 19:36 UTC (History)
2 users (show)

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


Attachments

Description Dan Bolser 2011-09-30 14:16:32 UTC
I get the following error with the regexp '{{Contamination.*?}}'

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
SELECT page_id,page_namespace,page_title,old_text FROM `clw_page`,`clw_revision`,`clw_text` WHERE (old_text REGEXP '{{Contamination.*?}}') AND page_namespace IN ('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','102','103','106','107','108','109','170','171','420','421') AND (rev_id = page_latest) AND (rev_text_id = old_id) ORDER BY page_namespace, page_title
from within function "ReplaceText::doSearchQuery". Database returned error "1139: Got error 'repetition-operator operand invalid' from regexp (localhost)".
Comment 1 Brion Vibber 2011-09-30 17:59:13 UTC
I suspect you want '{{Contamination.*\?}}'.
Comment 2 Dan Bolser 2011-09-30 18:40:46 UTC
No, I want to make sure I capture just one template, using ? like in PCRE.
Comment 3 Brion Vibber 2011-09-30 18:43:48 UTC
Well, it's not PCRE. :)

You'll need to use something that MySQL's regexp supports:

http://dev.mysql.com/doc/refman/5.1/en/regexp.html

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


Navigation
Links