diff -Naur bacula-5.2.2.old/src/cats/mysql.c bacula-5.2.2/src/cats/mysql.c --- bacula-5.2.2.old/src/cats/mysql.c 2011-11-26 15:08:12.000000000 +0100 +++ bacula-5.2.2/src/cats/mysql.c 2011-12-10 22:32:47.763334236 +0100 @@ -296,7 +296,7 @@ void B_DB_MYSQL::db_thread_cleanup(void) { #ifndef HAVE_WIN32 - my_thread_end(); + mysql_thread_end(); #endif }