SQL failed; SQL: SELECT SQL_CALC_FOUND_ROWS DISTINCT t.* FROM wp_5_pod p LEFT JOIN wp_5_pod_rel r4 ON r4.field_id = 18 AND r4.pod_id = p.id LEFT JOIN `wp_5_pod_tbl_venues` `event_venue` ON `event_venue`.id = r4.tbl_row_id INNER JOIN `wp_5_pod_tbl_events` t ON t.id = p.tbl_row_id WHERE p.datatype = 2 AND event_venue.id = '152' AND CASE WHEN t.event_end = '0000-00-00 00:00:00' THEN t.event_start >= NOW() ELSE t.event_end >= NOW() END ORDER BY t.event_start ASC LIMIT 0,10; Response: Got error 122 from storage engine