Mysql: Support the MariaDB client library.

The MariaDB client library is a forward port of the LGPL
mysql client library from MySQL 3.23 to support modern
MySQL and MariaDB.
[portability] Replaced use of MIN/MAX with macros MINIMUM/MAXIMUM.

The macros MIN and MAX are apparently available on Linux, but not
on Solaris 10.