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