This song is quite old -- some sources say mid 1600s or possibly older. It is known by many names. In most versions, the ship spins around three times and sinks, but other variants have it return home safely instead. A nice version exists in Songs of the Sea and Lays of the Land.
Rod Stradling wrote the liner notes for Bob Hart's anthology:
Professor Child called this The Mermaid because, in most versions, the sailors sight a mermaid, a sign of bad-luck, before their ship is wrecked. It was published in a Newcastle Garland, dated 1765, as The Seamen's Distress, although later broadside printers often called it The Sailor's Caution. In America the song was often treated
comically in 19th century college glee books and it may be that sometimes the American folk versions are serious reinterpretations of these one-time comic versions!
Oscar Brand preserves some of that joviality with his recording on Rollicking Sea Shanties.