Comment 3 for bug 1859773

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: Apache DBD Auth not working with mysql Focal 20.04

The build logs show this:
/home/ubuntu/deb/apr-util/apr-util-1.6.1/dbd/apr_dbd_mysql.c:1267:5: warning: implicit declaration of function ‘my_init’; did you mean ‘mysql_init’? [-Wimplicit-function-declaration]
 1267 | my_init();
      | ^~~~~~~
      | mysql_init

Checking the mysql 8 release notes at https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html we see:
"""
The my_init() function is no longer included in the list of symbols exported from libmysqlclient. It need not be called explicitly by client programs because it is called implicitly by other C API initialization functions.
"""

In the dbd/apr_dbd_mysql.c code, it is called like this:
static void dbd_mysql_init(apr_pool_t *pool)
{
#if MYSQL_VERSION_ID < 100000
    my_init();
#endif
    mysql_thread_init();