Question2Answer query failed:

SELECT qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type,1) AS basetype, INSTR(qa_posts.type, '_HIDDEN')>0 AS hidden, qa_posts.acount, qa_posts.selchildid, qa_posts.upvotes, qa_posts.downvotes, BINARY qa_posts.title AS title, BINARY qa_posts.tags AS tags, UNIX_TIMESTAMP(qa_posts.created) AS created, qa_posts.userid, qa_posts.cookieid, INET_NTOA(qa_posts.createip) AS createip, qa_userpoints.points, qa_users.flags, qa_users.level, BINARY qa_users.email AS email, CONVERT(qa_users.handle USING BINARY) AS handle, qa_users.avatarblobid, qa_users.avatarwidth, qa_users.avatarheight, score FROM qa_posts LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN (SELECT postid, SUM(score)+LOG(postid)/1000000 AS score FROM ((SELECT qa_titlewords.postid, LOG(10000/titlecount) AS score FROM qa_titlewords JOIN qa_words ON qa_titlewords.wordid=qa_words.wordid JOIN qa_titlewords AS source ON qa_titlewords.wordid=source.wordid WHERE source.postid=20573 AND titlecount<10000) UNION ALL (SELECT qa_posttags.postid, 2*LOG(10000/tagcount) AS score FROM qa_posttags JOIN qa_words ON qa_posttags.wordid=qa_words.wordid JOIN qa_posttags AS source ON qa_posttags.wordid=source.wordid WHERE source.postid=20573 AND tagcount<10000) UNION ALL (SELECT qa_posts.postid, LOG(10000/qa_categories.qcount) FROM qa_posts JOIN qa_categories ON qa_posts.categoryid=qa_categories.categoryid AND qa_posts.type='Q' WHERE qa_categories.categoryid=(SELECT categoryid FROM qa_posts WHERE postid=20573) AND qa_categories.qcount<10000)) x GROUP BY postid ORDER BY score DESC LIMIT 50) y ON qa_posts.postid=y.postid

Error 2006: MySQL server has gone away