iPhoto problem after upgrading to Mountain Lion
Firstly, make a backup of the library.  At least you will have that in-case anything does go wrong.  

Then make sure you update iPhoto to the latest version before you upgrade the Operating System.  

Finally, repair your Disk Permissions using Disk Utility http://support.apple.com/kb/PH5821

I've updated many times and never had iPhoto be affected by an OS upgrade.  Thats not to say it isn't possible.  The above steps will put you in the best shape to move forward.

If you upgrade and have an issue with the iPhoto database, hold down Command and Option keys whilst starting iPhoto to get a list of rebuild/recovery options.

Hope that helps.