SQL Query Error (SELECT e.*, i.name as title, c.name as center, ec.name as `condition`, eq.name as quality, es.name as status, et.name as transfer, i.id as item_id, i.pieces as pieces, if(i.item_type='3','Book', if(i.item_type='5','CD', if(i.item_type='4','TOY','Unknown') ) ) as type, f.name as format, c2.name as base_center, eps1.name as prepared_state, eps2.name as paid_status, ebb.name as bought_by FROM (entries e, items i, centers c, entry_statuses es) LEFT JOIN entry_conditions ec ON (e.ref_entry_condition=ec.id) LEFT JOIN entry_qualities eq ON (e.ref_entry_quality=eq.id) LEFT JOIN rental_queue_prepared rqp ON (e.barcode=rqp.barcode) LEFT JOIN entry_transfers et ON (e.ref_entry_transfer=et.id) LEFT JOIN item_formats f ON (i.ref_item_format=f.id) LEFT JOIN centers c2 ON (e.ref_base_center = c2.id) LEFT JOIN entry_prepared_states eps1 ON (e.ref_entry_prepared_state = eps1.id) LEFT JOIN entry_paid_states eps2 ON (e.ref_entry_paid_state = eps2.id) LEFT JOIN entry_bought_by ebb ON (e.ref_entry_bought_by = ebb.id) WHERE e.ref_item=i.id and e.ref_center=c.id and e.ref_status=es.id AND i.id='2231' AND es.id='1' ORDER BY e.barcode*1) : Got error 28 from storage engine