Deprecating the mysql_config –libs_r option

As Norvald wrote in his recent post:

A long time ago, libmysqlclient came in two versions: one that was thread safe and one that wasn’t. But that was a long time ago. Since MySQL 5.5, the thread safe libmysqlclient_r library has just been a symlink to the libmysqlclient library, which has been thread safe at least since then.

The symlinks have been there in MySQL 5.5 and 5.6, but in 5.7 we’ve finally removed them. They’re simply not needed anymore. Since we’ve bumped the major ABI version number, there are no applications linking with version 20 of the libmysqlclient_r library.

The symlinks are gone, but we’ve kept the --libs_r option to mysql_config. It now produces the same output as the --libs option. This means that applications that used to link with libmysqlclient_r now will link with libmysqlclient, and everything will work just the way it used to.

Developers don’t need to do anything, but at some point in the future, we expect --libs_r to go, so it’s a good idea to replace it with --libs now. Using –libs_r only makes sense if you’re linking with libmysqlclient_r version 16 (which came with MySQL 5.1), but that version has reached end of life a long time ago.

So while it remains present in MySQL 5.7, we do indeed intend to remove the --libs_r option from mysql_config. To add some context, here is our current deprecation and removal plan:

  • In MySQL 5.7 we will officially deprecate this option. A note will appear in the MySQL manual page, and in the help text for mysql_config. We currently do not plan on disturbing the output of mysql_config --libs_r, to avoid breaking (in a GA release) programs that depend on libmysqlclient.
  • In MySQL 5.8, we will remove the option mysql_config --libs_r. This may require applications that depend on libmysqlclient to modify build scripts.

We value your feedback in response to our proposed plan. Please leave a comment, or get in touch!

Thank you for using MySQL!

Leave a Reply

Your email address will not be published. Required fields are marked *

Please enter * Time limit is exhausted. Please reload CAPTCHA.