Author: paul
Date: 2008-10-02 16:49:03 +0200 (Thu, 02 Oct 2008)
New Revision: 11949
Log:
r34398@frost: paul | 2008-10-02 09:40:40 -0500
mysql_library_init: add example
Modified:
trunk/refman-4.1/apis-c.xml
trunk/refman-5.0/apis-c.xml
trunk/refman-5.1/apis-c.xml
trunk/refman-6.0/apis-c.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:34397
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:33554
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:34398
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:33554
Modified: trunk/refman-4.1/apis-c.xml
===================================================================
--- trunk/refman-4.1/apis-c.xml 2008-10-02 14:48:56 UTC (rev 11948)
+++ trunk/refman-4.1/apis-c.xml 2008-10-02 14:49:03 UTC (rev 11949)
Changed blocks: 3, Lines Added: 24, Lines Deleted: 10; 1595 bytes
@@ -4256,6 +4256,24 @@
NULL)</function>.
</para>
+<programlisting>
+#include <mysql.h>
+#include <stdlib.h>
+
+int main(void) {
+ if (mysql_library_init(0, NULL, NULL)) {
+ fprintf(stderr, "could not initialize MySQL library\n");
+ exit(1);
+ }
+
+ /* Use any MySQL API functions here */
+
+ mysql_library_end();
+
+ return EXIT_SUCCESS;
+}
+</programlisting>
+
<para>
When arguments are to be passed (<literal>argc</literal> is
greater than <literal>0</literal>), the first element of
@@ -4283,16 +4301,6 @@
<literal>[embedded]</literal> groups are used by default.
</para>
- <para>
- <function role="capi">mysql_library_init()</function> was added
- in MySQL 4.1.10. For older versions of MySQL, call
- <function role="capi">mysql_server_init()</function> instead.
- </para>
-
- <para>
- <emphasis role="bold">Example</emphasis>
- </para>
-
<programlisting>
#include <mysql.h>
#include <stdlib.h>
@@ -4325,6 +4333,12 @@
</programlisting>
<para>
+ <function role="capi">mysql_library_init()</function> was added
+ in MySQL 4.1.10. For older versions of MySQL, call
+ <function role="capi">mysql_server_init()</function> instead.
+ </para>
+
+ <para>
<emphasis role="bold">Return Values</emphasis>
</para>
Modified: trunk/refman-5.0/apis-c.xml
===================================================================
--- trunk/refman-5.0/apis-c.xml 2008-10-02 14:48:56 UTC (rev 11948)
+++ trunk/refman-5.0/apis-c.xml 2008-10-02 14:49:03 UTC (rev 11949)
Changed blocks: 3, Lines Added: 24, Lines Deleted: 10; 1593 bytes
@@ -4406,6 +4406,24 @@
NULL)</function>.
</para>
+<programlisting>
+#include <mysql.h>
+#include <stdlib.h>
+
+int main(void) {
+ if (mysql_library_init(0, NULL, NULL)) {
+ fprintf(stderr, "could not initialize MySQL library\n");
+ exit(1);
+ }
+
+ /* Use any MySQL API functions here */
+
+ mysql_library_end();
+
+ return EXIT_SUCCESS;
+}
+</programlisting>
+
<para>
When arguments are to be passed (<literal>argc</literal> is
greater than <literal>0</literal>), the first element of
@@ -4433,16 +4451,6 @@
<literal>[embedded]</literal> groups are used by default.
</para>
- <para>
- <function role="capi">mysql_library_init()</function> was added
- in MySQL 5.0.3. For older versions of MySQL, call
- <function role="capi">mysql_server_init()</function> instead.
- </para>
-
- <para>
- <emphasis role="bold">Example</emphasis>
- </para>
-
<programlisting>
#include <mysql.h>
#include <stdlib.h>
@@ -4475,6 +4483,12 @@
</programlisting>
<para>
+ <function role="capi">mysql_library_init()</function> was added
+ in MySQL 5.0.3. For older versions of MySQL, call
+ <function role="capi">mysql_server_init()</function> instead.
+ </para>
+
+ <para>
<emphasis role="bold">Return Values</emphasis>
</para>
Modified: trunk/refman-5.1/apis-c.xml
===================================================================
--- trunk/refman-5.1/apis-c.xml 2008-10-02 14:48:56 UTC (rev 11948)
+++ trunk/refman-5.1/apis-c.xml 2008-10-02 14:49:03 UTC (rev 11949)
Changed blocks: 2, Lines Added: 18, Lines Deleted: 4; 1013 bytes
@@ -4464,6 +4464,24 @@
NULL)</function>.
</para>
+<programlisting>
+#include <mysql.h>
+#include <stdlib.h>
+
+int main(void) {
+ if (mysql_library_init(0, NULL, NULL)) {
+ fprintf(stderr, "could not initialize MySQL library\n");
+ exit(1);
+ }
+
+ /* Use any MySQL API functions here */
+
+ mysql_library_end();
+
+ return EXIT_SUCCESS;
+}
+</programlisting>
+
<para>
When arguments are to be passed (<literal>argc</literal> is
greater than <literal>0</literal>), the first element of
@@ -4491,10 +4509,6 @@
<literal>[embedded]</literal> groups are used by default.
</para>
- <para>
- <emphasis role="bold">Example</emphasis>
- </para>
-
<programlisting>
#include <mysql.h>
#include <stdlib.h>
Modified: trunk/refman-6.0/apis-c.xml
===================================================================
--- trunk/refman-6.0/apis-c.xml 2008-10-02 14:48:56 UTC (rev 11948)
+++ trunk/refman-6.0/apis-c.xml 2008-10-02 14:49:03 UTC (rev 11949)
Changed blocks: 2, Lines Added: 18, Lines Deleted: 4; 1013 bytes
@@ -4419,6 +4419,24 @@
NULL)</function>.
</para>
+<programlisting>
+#include <mysql.h>
+#include <stdlib.h>
+
+int main(void) {
+ if (mysql_library_init(0, NULL, NULL)) {
+ fprintf(stderr, "could not initialize MySQL library\n");
+ exit(1);
+ }
+
+ /* Use any MySQL API functions here */
+
+ mysql_library_end();
+
+ return EXIT_SUCCESS;
+}
+</programlisting>
+
<para>
When arguments are to be passed (<literal>argc</literal> is
greater than <literal>0</literal>), the first element of
@@ -4446,10 +4464,6 @@
<literal>[embedded]</literal> groups are used by default.
</para>
- <para>
- <emphasis role="bold">Example</emphasis>
- </para>
-
<programlisting>
#include <mysql.h>
#include <stdlib.h>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r11949 - in trunk: . refman-4.1 refman-5.0 refman-5.1 refman-6.0 | paul.dubois | 2 Oct |