MySQL++ is licensed though LGPL, that means that I could release an executable dynamically linked against it without worrying about the source code not being GPL.
But, MySQL++ DOES link against libmysqlclient{_r}.{a,so} ( http://tangentsoft.net/mysql++/#linkerrors ) which is GPLed.
As seen as then MySQL++ is technically just a 'wrapper' (btw a very well implemented wrapper, don't get me wrong) towards the GPLed libmysqlclient{_r}.{a,so}, if I link against MySQL++ is like linking against libmysqlclient{_r}.{a,so}?
If this is the case, then the purpose of MySQL++ being LGPLed is pointless as seen as then any executable dynamically linking against it MUST be then linked against libmysqlclient{_r}.{a,so} as well. Where am I wrong?
I believe that you are correct in concluding that linking against LGPL library A which itself links against GPL library B is the same as linking against a GPL library, and so requires your program to be under the GPL.
So I would agree that libmysql++ being LGPL is pretty pointless, but I think it may be that way because older versions of the MySQL client libraries used to be LGPL. (They're all full-GPL now, though, as you noticed)
If your program is licensed under one of the licences listed in the
EXCEPTIONS-CLIENT
file in the MySQL distribution, then your program doesn't have to be GPL-compatible to use the MySQL client library.But in general, yes, if you want to link to a GPL library then your program has to be GPL-compatible.
You may need to consult a lawyer. I am not one. But here are some things to consider:
Remember that the (L)GPL's power derives from copyright. If A is a derived work of B, you need permission from B's copyright holder to distribute it. If A isn't, you don't need permission to distribute A. If A derives from B, but B derives from C, A may or may not derive from C. You need permission from all copyright holders to distribute their works or derivative works. The (L)GPL specifies under what conditions that permission is automatically granted.
Oracle (neé Sun, neé MySQL AB) will happily sell you a GPL exemption for the C API library. Then you can distribute the MySQL++ DLL along with your program and only be subject to the LGPL.