Patch: fix-conjuction-of-disjunctions
Type: bugfix

Fix execution of query with conjunction of disjunctions

SQL store of SMW tried to execute (a OR b) AND (c OR d) query like
(a OR b) AND c AND d (where a, b, c, d are some query terms).

This patch fixes it.
Patch: query-optimizer
Type: feature

Query optimisation for SemanticMediaWiki:
* Identical subqueries with disjunctions and negations are executed only once
* Identical terms are removed from disjunctions and conjunctions (i.e. "a AND a" and "a OR a")