HULK HOGAN was shocked yesterday when TMZ told him that BUBBA THE LOVE SPONGE knew all along that Hulk was being taped nailing Bubba's wife HEATHER CLEM.

A TMZ staffer watched the whole tape, and he says that at the very end, after the deed is done and Hogan leaves, Bubba comes back into the room.

And he tells Heather, quote, "If we ever did want to retire, all we'd have to do is use this footage of him."  Then Heather replies, quote, "You'd never do that" . . . and Bubba says, quote, "I wouldn't do that, you'd be the biggest rat, you'd be dead."

TMZ got Hulk on the phone to tell him this, and he was pretty shocked and, in his own words, quote, "I'm sick to my stomach right now."

Hulk said that Bubba has sworn up and down to him that he knew nothing about the tape. 

And on numerous occasions, Hulk told Bubba to fess up if he was lying . . . adding, quote, "If you had anything to do with this, that means we were never friends."