Upgrading from mysql-3.23 to mysql-4.0 (and 4.1, for that matter) removes libmysqlclient.so.10. This is normal, since libmysqlclient.so.10 belongs to mysql-3.23, and cleaning mysql-3.23 removes such files. However, this is unfortunate, because a number of packages -- notably libwww, pure-ftpd, and postfix -- depend on libmysqlclient.so.10 (instead of the more general libmysqlclient.so). This causes problems for the unwary, and though a revdep-rebuild fixes everything, downtime can still result. Thus, I propose adopting the FreeBSD strategy -- add mysqlclient-3.23 and mysqlcient-4.0 ebuilds in addition to the MySQL server ebuilds. (This may require addition of virtual entries, since both the server and client ebuilds would provide the client libraries.) This would allow both versions of the client library to be installed at the same time, while still leaving /usr/lib to Portage's control. If this is implemented, existing behavior would be retained (removing mysqlclient.so.10 when mysql-3.23 is removed), but users wishing to keep the old library around would have that option. Additionally, client ebuilds would be beneficial in the situation that a system needs access to a MySQL database but does not run the database locally (web server farms, thick client applications, etc.).
Read the big warning that is displayed after emerging mysql-4.* and heed it. Run revdep-rebuild and problems will go away. Portage is slated to get the functionality of revdep-rebuild integrated at a later point, and then this will be moot anyway. Those other packages cannot link to libmysqlclient.so instead of libmysqlclient.so.10/11 as the MySQL API between those versions is incompatible and your programs just start segfaulting in weird ways. Another reason not to do it that way is this: you have two libraries: foo and bar both of them require mysql foo is linked against libmysqlclient.so.10 bar is linked against libmysqlclient.so.11 now when you try to build a program that needs to link against both foo and bar, you get a bevy of strange and unusual errors and problems. This problem case isn't unusual at all, it exists with a number of package sets.
*** Bug 30947 has been marked as a duplicate of this bug. ***