Was it all pre-planned? Sun buying MySQL at 1 billion just to make itself more attractive to Oracle for a buyout within a year?
In the end Sun seems to have made a profit out of its 1 billion investment. Oracle probably have added a lot than it would have offered simply to ensure it owns its main business killer MySQL.