Bug sortkey

From Dpldemo
Jump to: navigation, search

Result set too big

With MySQL 4.2 the query returns a result set which contains too many elements; executing the same DPL statement on MySQL 5 yields the correct result.

<dpl>
debug=3
  namespace=
  headingmode=H4
  ordermethod=category,lastedit
  addcategories=true
  addeditdate=true
  titlematch=%ma%
</dpl>

The DPL extension (version 2.01) produced a SQL statement which lead to a Database error.
The reason may be an internal error of DPL or an error which you made,
especially when using DPL options like titleregexp.
Query text is:
SELECT DISTINCT cl_head.cl_to, `page`.page_namespace AS page_namespace,`page`.page_title AS page_title,`page`.page_id AS page_id, rev_user, rev_user_text, rev_comment, rev_timestamp, GROUP_CONCAT(DISTINCT cl_gc.cl_to ORDER BY cl_gc.cl_to ASC SEPARATOR ' | ') AS cats FROM `revision` AS rev, `page` LEFT OUTER JOIN `categorylinks` AS cl_head, `categorylinks` AS cl_gc ON (page_id=cl_head.cl_from AND page_id=cl_gc.cl_from) WHERE 1=1 AND `page`.page_namespace IN ('0') AND (`page`.page_title LIKE '%ma%') AND `page`.page_is_redirect=0 AND `page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MAX(rev_aux.rev_timestamp) FROM `revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) GROUP BY cl_head.cl_to, `page`.page_id ORDER BY cl_head.cl_to, rev_timestamp ASC LIMIT 0, 600

Error message is:
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 ' `categorylinks` AS cl_gc ON (page_id=cl_head.cl_from AND page_id=cl_gc.cl_from)' at line 1 (localhost)


Personal tools
Ploticus
Call