After couple of days I figured out how to repeat the error. I started the attached query several times concurrently and it crashed the server.

--
Chives

SELECT t.id, t.title, t.filename, max((unix_timestamp(newest_created) << 32) | 
newest.author_id) & 0xFFFFFF AS newest_author,
  max(newest_created), min(newest_created), count(distinct post.id),
  min((unix_timestamp(newest_created) << 32) | newest.author_id) & 0xFFFFFF AS 
oldest_author
FROM thread as t
  RIGHT JOIN post on (post.thread = t.id)
  LEFT JOIN
    (select ifnull(p2.modified, p2.created) as newest_created, p2.thread as 
thread_id, p2.author as author_id, p2.id as post_id
    from post as p2) as newest on newest.thread_id = t.id
WHERE t.subforum=63
GROUP by t.id, t.title, t.filename
order by max(newest_created) desc
LIMIT 0,20

Reply via email to