[CONC-280] Update the documentation of mysql_thread_init and mysql_thread_end Created: 2017-09-06  Updated: 2023-12-13

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Shin Yoshida Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: Documentation

Issue Links:
PartOf

 Description   

The documentation of mysql_thread_init and mysql_thread_end seems too old.

According to the document, multi-thread client should call them, however, they do nothing indeed.

my_bool STDCALL mysql_thread_init(void)
{
  return 0;
}
 
void STDCALL mysql_thread_end(void)
{
}

https://mariadb.com/kb/en/the-mariadb-library/mysql_thread_init/
https://mariadb.com/kb/en/the-mariadb-library/mysql_thread_end/



 Comments   
Comment by René Cannaò [ 2019-04-10 ]

I don't think this is a documentation issue.
Rather, I suspect it is a serious bug in multi-threaded application.
I suspect that if threads do not call mysql_init() or mysql_real_connect() , a thread cannot safely use a mysql connection created by another thread.

Generated at Thu Feb 08 03:04:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.