1. If I knew Mary was coming, I would have gone to the the airport to welcome her.
2. If I had known Mary was coming, I would have gone to the the airport to welcome her.
To me, sentence 1 should be:
If I knew Mary was coming, I would go to the the airport to welcome her.
Sentence 2 is correct because of 'had known' should go with 'would have'. If I had known Mary was coming, I would have gone to the the airport to welcome her.