The open source debate revolves around five factors
One of the main claims for open source software is increased quality, because people outside of the normal development team can view the source code and contribute to the effort. If they are contributing without compensation then usually few people will get involved, but where they do they are likely to be useful contributors as they are probably enthusiasts. If they are paid then this will encourage non-enthusiasts to get involved and quality will suffer.
Certainly source code that is openly available will encourage the continuity of work it is based on beyond a project or product or even the life of the business that created it, as where there is money to be made maintaining software, companies will be willing to help.
Open source can provide competition between technology providers using it and drive down prices to the benefit of the user. However, this militates against the competing technology providers quality efforts as inevitably they will have less money to fund work from.
Notwithstanding the software quality debate, open source does present a greater opportunity for exploits to be found or even introduced by accident or intent.
Competitive advantage is eroded by making source code openly available. I know I certainly look for examples quite often, rather than work exclusively from API documentation. When implementing a mundane or well explored component it is quite reasonable that this kind of work be open to all. However, the more expensive, creative or original the source code the more valuable it is and the more it should be guarded from competitors. In some cases a particular combination of relatively unexciting components is the valuable asset that must be guarded.
MySQL have stopped access to the convenient source download bundle for their enterprise server product except for paying customers. Although it is still possible to get the source for free in a less convenient form and build it, the move is clearly designed to discourage free build and usage. The next logical step for them is to decide that licensing revenue for the enterprise server is being lost to others building their code and so make that code available only to paying customers. This clearly shows they are have concerns about the viability of the open-source model protecting their IP rights and revenue streams. Eventually they must be considering if open-source is the right model for that product.