Last modified: 2008-02-05 11:02:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12754 - Querying for N-Ary property with a type Text fails
Querying for N-Ary property with a type Text fails
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-01-23 10:47 UTC by Markus Nitsche
Modified: 2008-02-05 11:02 UTC (History)
1 user (show)

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


Description Markus Nitsche 2008-01-23 10:47:56 UTC
SMW1.0 on MW1.12alpha

Steps to reproduce:
1. Create an n-ary attribute that uses type:text (

Type:String, Number, Text

2. Make some annotations of this property (

[[TestNary:=Hello world;42;Some more text]]

3. Create a query asking for an exact text value, for example:

<ask>[[TestNary:=?;?;Some more text]][[TestNary:=*]]</ask> (


A SQL error appears, stating:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "SMW::getQueryResult". MySQL returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) ORDER BY `page`.page_title ASC LIMIT 51' at line 1 (localhost)".

Expected Result:
The query should deliver all pages with "Some more text" annotated in third position of this property.
Comment 1 Markus Krötzsch 2008-02-05 11:02:36 UTC
This requires some clarification:

* The fact that SMW throws SQL errors (in any situation whatsoever) is a bug.

* The fact that you cannot search for exact values of Type:Text is not a bug, but part of the design. Type:Text data is not used in query matching for performance reasons and because it is not expected that any user would search for exact matches of long texts in general. Moreover, Type:Text values do not even have a DB index, for reasons of space.

The *bug* has now been fixed in SVN. The other request remains a "wontfix" -- use Type:String for  value matching.

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