A database which included details of suspected gang members ended up in the hands of rival gangs.