Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Commit 037c6ca

Browse files
yizhang82Herman Lee
authored andcommitted
[cmake] Link against major.minor.patch version of libmysqlclient to avoid runtime conflict
Summary: Someone shipped a libmysqlclient.so.21 in the system but that was of older version that didn't have mysql_result_metadata (actually it did - but locally and not exported). As a result libmysql_test_api is failing to locate mysql_result_metadata at runtime. The fix is to always link against major.minor.patch version that we are building to avoid conflicts. Reviewed By: zhichengzhu Differential Revision: D17507965
1 parent 83ca49e commit 037c6ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎libmysql/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ IF(UNIX)
332332
# Name of shared library is libmysqlclient on Unix
333333
SET(UNIX_OUTPUT_NAME OUTPUT_NAME mysqlclient)
334334
SET(UNIX_VERSION VERSION "${OS_SHARED_LIB_VERSION}")
335-
SET(UNIX_SOVERSION SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
335+
SET(UNIX_SOVERSION SOVERSION "${OS_SHARED_LIB_VERSION}")
336336
ENDIF()
337337

338338
# Merge several convenience libraries into one big mysqlclient

0 commit comments

Comments
 (0)