Why Does 2 Samuel 21:7-9 Say David “Showed Compassion for Mephibosheth” but Then Handed Mephibosheth Over for Execution?

Two men share the name Mephibosheth in 2 Samuel 21. David spared Jonathan’s son by oath, but handed over Saul’s son by Rizpah.