~maria-captains/mariadb-native-client/trunk

« back to all changes in this revision

Viewing changes to docs/funcref/mysql_init.xml

  • Committer: Georg Richter
  • Date: 2012-11-26 10:23:56 UTC
  • Revision ID: georg@linux-eozo-20121126102356-llqrnqevaypb2nc6
- Added documentation (docbook based)
- To build the documentation use cmake . -DBUILD_DOCS=yes
- minor fixes in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0' encoding='UTF-8'?>
 
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 
3
               "docbook/dtd/xml/4.2/docbookx.dtd" [
 
4
<!ENTITY % global_ents SYSTEM "../global.ent">
 
5
%global_ents;
 
6
]>
 
7
    <refentry id="functions.mysql_init" display-name="0"> <refmeta>
 
8
        <refentrytitle>mysql_init</refentrytitle>
 
9
      </refmeta>
 
10
      <refnamediv>
 
11
        <refname>mysql_init</refname>
 
12
        <refpurpose>Initialize a connection</refpurpose>
 
13
      </refnamediv>
 
14
      <refsect1 role="description">
 
15
        <methodsynopsis>
 
16
          <type>MYSQL *</type>
 
17
          <methodname>mysql_init</methodname>
 
18
           <methodparam><type>MYSQL *</type><parameter>mysql</parameter></methodparam>
 
19
 
 
20
        </methodsynopsis>
 
21
        <para>Prepares and initializes a MYSQL structure to be used with <function>mysql_real_connect()</function>.</para>
 
22
        <para>If <function>mysql_thread_init()</function> was not called before, <function>mysql_init()</function> will also initialize the thread subsystem for the current thread.</para>
 
23
      </refsect1>
 
24
      <refsect1 role="parameters">
 
25
        <title>Parameters</title>
 
26
          <variablelist>
 
27
           <varlistentry><term><parameter>mysql</parameter></term><listitem><para>A pointer to MYSQL or NULL. In case of passing a NULL pointer <function>mysql_init()</function> will allocate memory and return a pointer to a MYSQL structure.</para></listitem></varlistentry>
 
28
          </variablelist>
 
29
      </refsect1>
 
30
      <refsect1 role="returnvalue">
 
31
        <title>Return value</title>
 
32
        <para>A pointer to a MYSQL structure or NULL if an error occured.</para>
 
33
      </refsect1>
 
34
      <refsect1 role="notes">
 
35
        <note>
 
36
          <title></title>
 
37
          <para>Any subsequent calls to any mysql function (except <function>mysql_options()</function>) will fail until <function>mysql_real_connect()</function> was called.</para>
 
38
          <para>Memory allocated by <function>mysql_init()</function> must be freed with <function>mysql_close()</function>.</para>
 
39
        </note> 
 
40
      </refsect1>
 
41
      <refsect1 role="seealso">
 
42
        <title>See also</title>
 
43
        <para>
 
44
         <function>mysql_real_connect()</function>, <function>mysql_options()</function>, <function>mysql_thread_init()</function>, <function>mysql_close()</function>,
 
45
        </para>
 
46
      </refsect1>
 
47
    </refentry>