Page MenuHomePhabricator

Subproperty breaks query
Closed, ResolvedPublic

Description

Author: reeve.junkmail

Description:
We had a property:State, with 3 subproperties State_Code, Offer2_Code, Product_Code, all of type page. When adding State_code as a subproperty of State and resaving the article with Property:State on it, the pages with queries referencing Property:State no longer worked. Specifically, the query looked like this (format=count):

SELECT /* SMW::getQueryResult WikiSysop */ COUNT(DISTINCT t8.smw_id) AS count FROM smw_ids AS t8 INNER JOIN smw_inst2 AS t1 ON t8.smw_id=t1.s_id INNER JOIN smw_atts2 AS t3 ON t1.s_id=t3.s_id INNER JOIN smw_rels2 AS t5 ON t1.s_id=t5.s_id INNER JOIN t6 AS t6 ON t5.p_id=t6.id WHERE (t1.o_id='599447' AND (t3.p_id='572930') AND (t5.o_id='578754')) LIMIT 10001

The query would hang forever until killed in mysql. When entered in the terminal, would return an error instantly - as

"... INNER JOIN t6 AS t6 ON t5.p_id=t6.id ..."

table t6 does not exist.

Removing State_Code as a subproperty (but leaving the other 2) fixed the query. Also, it might be important to note that State_Code has about 23million values.


Version: unspecified
Severity: blocker

Details

Reference
bz26964

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:13 PM
bzimport set Reference to bz26964.

Is still issue still present on SMW 1.6?

Unknown Object (User) added a comment.Jun 5 2012, 1:42 AM

This bug is open for over a year and the initial requester did not respond to Jeroen's question therefore we might close this one.

For the next request SMW version/MW version would be helpful in order to make a full diagnosis.