-
V S Murthy Sidagam authored
Description: Consider a requirement where there the OpenSSL and MySQL client library functions are both used directly to generate a binary. If the order of linking used is 1. MySQL client library (i.e libmysqlclient) and then 2. OpenSSL library (i.e libcrypto), then using the created binary will result in a crash. Analysis: The libmysqlclient library already has the built-in yaSSL library and has exported its symbols. The yaSSL and OpenSSL libraries share some of the same symbol names, so the executable which is prepared in the above said order, will resolve the OpenSSL symbols indirectly using the libmysqlclient library (yaSSL) rather than using the OpenSSL library directly. Hence, the binary will try to call functions defined in the libmysqlclient library instead of the desired OpenSSL function, thus resulting in a crash. Fix: We are maintaining two list 1)CLIENT_API_FUNCTIONS which has documented symbols. 2)CLIENT_API_FUNCTIONS_UNDOCUMENTED which has undocumented symbols. For time beging we will export the symbols which are part of above two lists. Symbols which are removed from this existing list are load_defaults, myodbc_remove_escape and mysql_embedded. Symbols which are added newly to the list are my_load_defaults, mysql_send_query and mysql_read_query_result. We need to update the document for some of these symbols. Rest of all symbols are hidden from libmysqlclient.so For Windows: To sync with other OS exported symbol list. I have auto generated the libmysql.def with the symbols of CLIENT_API_FUNCTIONS and CLIENT_API_FUNCTIONS_UNDOCUMENTED lists. (Added: get_tty_password, handle_options, my_load_defaults, mysql_session_track_get_first, mysql_session_track_get_next and mysql_stmt_next_result. Removed: load_defaults, myodbc_remove_escape and mysql_embedded)
V S Murthy Sidagam authoredDescription: Consider a requirement where there the OpenSSL and MySQL client library functions are both used directly to generate a binary. If the order of linking used is 1. MySQL client library (i.e libmysqlclient) and then 2. OpenSSL library (i.e libcrypto), then using the created binary will result in a crash. Analysis: The libmysqlclient library already has the built-in yaSSL library and has exported its symbols. The yaSSL and OpenSSL libraries share some of the same symbol names, so the executable which is prepared in the above said order, will resolve the OpenSSL symbols indirectly using the libmysqlclient library (yaSSL) rather than using the OpenSSL library directly. Hence, the binary will try to call functions defined in the libmysqlclient library instead of the desired OpenSSL function, thus resulting in a crash. Fix: We are maintaining two list 1)CLIENT_API_FUNCTIONS which has documented symbols. 2)CLIENT_API_FUNCTIONS_UNDOCUMENTED which has undocumented symbols. For time beging we will export the symbols which are part of above two lists. Symbols which are removed from this existing list are load_defaults, myodbc_remove_escape and mysql_embedded. Symbols which are added newly to the list are my_load_defaults, mysql_send_query and mysql_read_query_result. We need to update the document for some of these symbols. Rest of all symbols are hidden from libmysqlclient.so For Windows: To sync with other OS exported symbol list. I have auto generated the libmysql.def with the symbols of CLIENT_API_FUNCTIONS and CLIENT_API_FUNCTIONS_UNDOCUMENTED lists. (Added: get_tty_password, handle_options, my_load_defaults, mysql_session_track_get_first, mysql_session_track_get_next and mysql_stmt_next_result. Removed: load_defaults, myodbc_remove_escape and mysql_embedded)
Loading