Last modified: 2012-08-04 20:48:59 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 T15004, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13004 - Prepending minus sign(-) to search query causes PostgreSQL Error
Prepending minus sign(-) to search query causes PostgreSQL Error
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.11.x
PC Windows Server 2003
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2008-02-13 09:58 UTC by Onno
Modified: 2012-08-04 20:48 UTC (History)
2 users (show)

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


Attachments

Description Onno 2008-02-13 09:58:28 UTC
Affected system:
    * MediaWiki: 1.11.0 (r29485)
    * PHP: 5.2.5 (apache2handler)
    * PostgreSQL: PostgreSQL 8.2.5 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special) 

MOR:
    1) This doesn't seem to happen on a mediawiki running on mySQL.
    2) Enter any text in the search query field. Confirm that the search works as intended.
    3) Now, prepend a minus sign (0x2D) and press either 'Go' or 'Search'.

Additional notes:
  Our installation is slightly modified due to bugs 12365, 12522, 9417.

The error, as reported by mediawiki is:
 Internal error
 
 A database error has occurred Query: SELECT page_id, page_namespace, page_title, rank(titlevector, to_tsquery('default','! byebyelotsofcake'), 1) AS score FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id AND r.rev_text_id = c.old_id AND titlevector @@ to_tsquery('default','! byebyelotsofcake') AND page_is_redirect = 0 AND page_namespace IN (0) ORDER BY score DESC, page_id DESC LIMIT 20 OFFSET 0 Function: Error: 1 ERROR: Query requires full scan, GIN doesn't support it
 
 Backtrace:
 
 #0 D:\wiki\wiki\includes\Database.php(779): DatabasePostgres->reportQueryError('ERROR: Query r...', 1, 'SELECT page_id,...', '', false)
 #1 D:\wiki\wiki\includes\SearchPostgres.php(40): Database->query('SELECT page_id,...')
 #2 D:\wiki\wiki\includes\SpecialSearch.php(157): SearchPostgres->searchTitle('-byebyelotsofca...')
 #3 D:\wiki\wiki\includes\SpecialSearch.php(38): SpecialSearch->showResults('-byebyelotsofca...')
 #4 D:\wiki\wiki\includes\SpecialPage.php(653): wfSpecialSearch(NULL, Object(SpecialPage))
 #5 D:\wiki\wiki\includes\SpecialPage.php(459): SpecialPage->execute(NULL)
 #6 D:\wiki\wiki\includes\Wiki.php(201): SpecialPage::executePath(Object(Title))
 #7 D:\wiki\wiki\includes\Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 #8 D:\wiki\wiki\index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 #9 {main}
Comment 1 Greg Sabino Mullane 2008-02-17 14:12:12 UTC
This is a GIN/GIST bug. I've created a workaround for it in r31019, please give it a try.
Comment 2 Greg Sabino Mullane 2008-03-14 04:41:55 UTC
Tested as fixed, closing bug.

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


Navigation
Links