From ab2f3dd2a2d23d2b96604515ddc0576b54ad8049 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Wed, 8 Jul 2009 16:49:45 +0200 Subject: Bug #43397 mysql headers redefine pthread_mutex_init unnecessarily The problem is that libmysqlclient.so is built with THREAD undefined, while a client compiling against the same header files will see THREAD as defined and definitions in my_pthread.h will be included, possibly resulting in undefined symbols that cannot be resolved with libmysqlclient.so. The suggested solution is to require that clients wanting to link with libmysqlclient.so should be built with MYSQL_CLIENT_NO_THREADS defined. This requires a documentation change, and more details for this will be supplied if this patch is approved. The MYSQL_CLIENT_NO_THREADS define was renamed from UNDEF_THREADS_HACK, to get a more suitable (less suspicious) name for the define. (The UNDEF_THREADS_HACK is retained for backwards compatibility, though.) This patch is also in anticipation of WL#4958, which will remove this problem altogether by dropping the building of libmysqlclient. --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index fbd58b88b9c..ddc6da86e1c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -56,7 +56,7 @@ bug25714_SOURCES= bug25714.c bug25714_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) # Fix for mit-threads -DEFS = -DUNDEF_THREADS_HACK +DEFS = -DMYSQL_CLIENT_NO_THREADS thread_test.o: thread_test.c $(COMPILE) -c $(INCLUDES) $< -- cgit v1.2.1