It was not a mistake it was a lie.
A few years ago, when McCain was against torture, he used this as a prime example on why torture was bad way of getting information from people.
"I was once physically coerced to provide my enemies with the names of the members of my flight squadron, information that had little if any value to my enemies as actionable intelligence. But I did not refuse, or repeat my insistence that I was required under the Geneva Conventions to provide my captors only with my name, rank and serial number. Instead, I gave them the names of the Green Bay Packers' offensive line, knowing that providing them false information was sufficient to suspend the abuse,"