Error on query2=SELECT matchtype, title, content, bookid, chaptertype, chapterid, sectionnum, node, matchrank FROM ( (SELECT 'section' AS matchtype, t1.sectionname AS title, concat(t1.sectionname,' ',t1.content,' ',t1.content1,' ',t1.content2,' ',t1.content3,' ',t1.content4,' ',t1.content5,' ',t1.content6,' ',t1.content7,' ',t1.content8,' ',t1.content9,' ',t1.content10) as content, bookid, 'section' as chaptertype, chapterid, sectionnum, node, (MATCH(t1.sectionname,t1.content,t1.content1,t1.content2,t1.content3,t1.content4,t1.content5,t1.content6,t1.content7,t1.content8,t1.content9,t1.content10) AGAINST ('padilla v. kentucky')) AS matchrank FROM section as t1 WHERE MATCH(t1.sectionname,t1.content,t1.content1,t1.content2,t1.content3,t1.content4,t1.content5,t1.content6,t1.content7,t1.content8,t1.content9,t1.content10) AGAINST('padilla v. kentucky' IN BOOLEAN MODE) AND t1.bookid IN ("AF","CD","CMT","PCN","SH","CPCN") ) UNION (SELECT 'chapter' AS matchtype, t2.name AS title, concat(t2.name, ' ', t2.content) as content, bookid, chaptertype, label as chapterid, null as sectionnum, node, (MATCH(t2.name, t2.content) AGAINST ('padilla v. kentucky')) AS matchrank FROM chapter as t2 WHERE MATCH(t2.name,t2.content) AGAINST('padilla v. kentucky' IN BOOLEAN MODE) AND t2.bookid IN ("AF","CD","CMT","PCN","SH","CPCN") ) ) as tm ORDER BY matchrank DESC LIMIT 40, 20 --- Got error 28 from storage engine