Author: paul
Date: 2006-05-10 16:09:56 +0200 (Wed, 10 May 2006)
New Revision: 2065
Log:
r10275@frost: paul | 2006-05-10 09:03:29 -0500
mysql_{server,library}_init() is not thread-safe. (Bug#13099)
Modified:
trunk/
trunk/refman-4.1/apis.xml
trunk/refman-5.0/apis.xml
trunk/refman-5.1/apis.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7365
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10265
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7365
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10275
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
Modified: trunk/refman-4.1/apis.xml
===================================================================
--- trunk/refman-4.1/apis.xml 2006-05-10 04:52:16 UTC (rev 2064)
+++ trunk/refman-4.1/apis.xml 2006-05-10 14:09:56 UTC (rev 2065)
@@ -1719,9 +1719,14 @@
</para>
<para>
- If you like, the call to <literal>mysql_library_init()</literal>
- may be omitted, because <literal>mysql_init()</literal> will
- invoke it automatically as necessary.
+ In a non-multi-threaded environment, the call to
+ <literal>mysql_library_init()</literal> may be omitted, because
+ <literal>mysql_init()</literal> will invoke it automatically as
+ necessary. However, a race condition is possible if
+ <literal>mysql_library_init()</literal> is invoked by
+ <literal>mysql_init()</literal> in a multi-threaded environment:
+ <literal>mysql_library_init()</literal> is not thread-safe, so
+ it should be called prior to any other client library call.
</para>
<para>
@@ -12532,12 +12537,28 @@
<literal>InnoDB</literal>, and so forth) that the server uses.
If this function is not called, the next call to
<literal>mysql_init()</literal> executes
- <literal>mysql_server_init()</literal>. If you are using the
- DBUG package that comes with MySQL, you should call this after
- you have called <literal>my_init()</literal>.
+ <literal>mysql_server_init()</literal>.
</para>
<para>
+ In a non-multi-threaded environment, the call to
+ <literal>mysql_server_init()</literal> may be omitted, because
+ <literal>mysql_init()</literal> will invoke it automatically
+ as necessary. However, a race condition is possible if
+ <literal>mysql_server_init()</literal> is invoked by
+ <literal>mysql_init()</literal> in a multi-threaded
+ environment: <literal>mysql_server_init()</literal> is not
+ thread-safe, so it should be called prior to any other client
+ library call.
+ </para>
+
+ <para>
+ If you are using the DBUG package that comes with MySQL, you
+ should call <literal>mysql_server_init()</literal> after you
+ have called <literal>my_init()</literal>.
+ </para>
+
+ <para>
The <literal>argc</literal> and <literal>argv</literal>
arguments are analogous to the arguments to
<literal>main()</literal>. The first element of
Modified: trunk/refman-5.0/apis.xml
===================================================================
--- trunk/refman-5.0/apis.xml 2006-05-10 04:52:16 UTC (rev 2064)
+++ trunk/refman-5.0/apis.xml 2006-05-10 14:09:56 UTC (rev 2065)
@@ -1763,9 +1763,14 @@
</para>
<para>
- If you like, the call to <literal>mysql_library_init()</literal>
- may be omitted, because <literal>mysql_init()</literal> will
- invoke it automatically as necessary.
+ In a non-multi-threaded environment, the call to
+ <literal>mysql_library_init()</literal> may be omitted, because
+ <literal>mysql_init()</literal> will invoke it automatically as
+ necessary. However, a race condition is possible if
+ <literal>mysql_library_init()</literal> is invoked by
+ <literal>mysql_init()</literal> in a multi-threaded environment:
+ <literal>mysql_library_init()</literal> is not thread-safe, so
+ it should be called prior to any other client library call.
</para>
<para>
@@ -12597,12 +12602,28 @@
<literal>InnoDB</literal>, and so forth) that the server uses.
If this function is not called, the next call to
<literal>mysql_init()</literal> executes
- <literal>mysql_server_init()</literal>. If you are using the
- DBUG package that comes with MySQL, you should call this after
- you have called <literal>my_init()</literal>.
+ <literal>mysql_server_init()</literal>.
</para>
<para>
+ In a non-multi-threaded environment, the call to
+ <literal>mysql_server_init()</literal> may be omitted, because
+ <literal>mysql_init()</literal> will invoke it automatically
+ as necessary. However, a race condition is possible if
+ <literal>mysql_server_init()</literal> is invoked by
+ <literal>mysql_init()</literal> in a multi-threaded
+ environment: <literal>mysql_server_init()</literal> is not
+ thread-safe, so it should be called prior to any other client
+ library call.
+ </para>
+
+ <para>
+ If you are using the DBUG package that comes with MySQL, you
+ should call <literal>mysql_server_init()</literal> after you
+ have called <literal>my_init()</literal>.
+ </para>
+
+ <para>
The <literal>argc</literal> and <literal>argv</literal>
arguments are analogous to the arguments to
<literal>main()</literal>. The first element of
Modified: trunk/refman-5.1/apis.xml
===================================================================
--- trunk/refman-5.1/apis.xml 2006-05-10 04:52:16 UTC (rev 2064)
+++ trunk/refman-5.1/apis.xml 2006-05-10 14:09:56 UTC (rev 2065)
@@ -1747,9 +1747,14 @@
</para>
<para>
- If you like, the call to <literal>mysql_library_init()</literal>
- may be omitted, because <literal>mysql_init()</literal> will
- invoke it automatically as necessary.
+ In a non-multi-threaded environment, the call to
+ <literal>mysql_library_init()</literal> may be omitted, because
+ <literal>mysql_init()</literal> will invoke it automatically as
+ necessary. However, a race condition is possible if
+ <literal>mysql_library_init()</literal> is invoked by
+ <literal>mysql_init()</literal> in a multi-threaded environment:
+ <literal>mysql_library_init()</literal> is not thread-safe, so
+ it should be called prior to any other client library call.
</para>
<para>
@@ -12515,12 +12520,28 @@
<literal>InnoDB</literal>, and so forth) that the server uses.
If this function is not called, the next call to
<literal>mysql_init()</literal> executes
- <literal>mysql_server_init()</literal>. If you are using the
- DBUG package that comes with MySQL, you should call this after
- you have called <literal>my_init()</literal>.
+ <literal>mysql_server_init()</literal>.
</para>
<para>
+ In a non-multi-threaded environment, the call to
+ <literal>mysql_server_init()</literal> may be omitted, because
+ <literal>mysql_init()</literal> will invoke it automatically
+ as necessary. However, a race condition is possible if
+ <literal>mysql_server_init()</literal> is invoked by
+ <literal>mysql_init()</literal> in a multi-threaded
+ environment: <literal>mysql_server_init()</literal> is not
+ thread-safe, so it should be called prior to any other client
+ library call.
+ </para>
+
+ <para>
+ If you are using the DBUG package that comes with MySQL, you
+ should call <literal>mysql_server_init()</literal> after you
+ have called <literal>my_init()</literal>.
+ </para>
+
+ <para>
The <literal>argc</literal> and <literal>argv</literal>
arguments are analogous to the arguments to
<literal>main()</literal>. The first element of
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2065 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 10 May |