Author: jstephens
Date: 2010-10-05 10:31:26 +0200 (Tue, 05 Oct 2010)
New Revision: 22977
Log:
More de-gunking + some general revisions
Modified:
trunk/ndbapi/ndb-datafile.xml
trunk/ndbapi/ndb-dictionary.xml
trunk/ndbapi/ndb-element.xml
trunk/ndbapi/ndb-errors.xml
Modified: trunk/ndbapi/ndb-datafile.xml
===================================================================
--- trunk/ndbapi/ndb-datafile.xml 2010-10-05 07:43:53 UTC (rev 22976)
+++ trunk/ndbapi/ndb-datafile.xml 2010-10-05 08:31:26 UTC (rev 22977)
Changed blocks: 10, Lines Added: 55, Lines Deleted: 39; 4675 bytes
@@ -177,20 +177,20 @@
<para>
This diagram shows all the available methods of the
<literal>Datafile</literal> class:
-
- <mediaobject>
- <imageobject>
- <imagedata contentwidth="469" contentdepth="370" fileref="images/published/NdbDictionary-Object-Datafile-class.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase lang="en">Public methods of the
- <literal>Datafile</literal> class.</phrase>
- </textobject>
- </mediaobject>
</para>
</formalpara>
+ <mediaobject>
+ <imageobject>
+ <imagedata contentwidth="469" contentdepth="370" fileref="images/published/NdbDictionary-Object-Datafile-class.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Public methods of the
+ <literal>Datafile</literal> class.</phrase>
+ </textobject>
+ </mediaobject>
+
<section id="ndb-datafile-methods">
<title><literal>Datafile</literal> Methods</title>
@@ -225,7 +225,10 @@
<para>
To create a new instance:
+ </para>
+ </formalpara>
+
<programlisting>
Datafile
(
@@ -233,8 +236,10 @@
)
</programlisting>
- To create a copy of an existing <literal>Datafile</literal>
- instance:
+ <para>
+ To create a copy of an existing <literal>Datafile</literal>
+ instance:
+ </para>
<programlisting>
Datafile
@@ -242,10 +247,7 @@
const Datafile& <replaceable>datafile</replaceable>
)
</programlisting>
- </para>
- </formalpara>
-
<formalpara>
<title>Parameters</title>
@@ -648,7 +650,7 @@
<title>Return value</title>
<para>
- The is method returns the tablespace ID as an unsigned 32-bit
+ This method returns the tablespace ID as an unsigned 32-bit
integer.
</para>
@@ -687,7 +689,7 @@
<title>Description</title>
<para>
- This method retrieves the ID of the Cluster node on which the
+ This method retrieves the ID of the data node on which the
datafile resides.
</para>
@@ -1067,7 +1069,7 @@
<para>
<programlisting>
-const char* getPath
+const char* setPath
(
void
) const
@@ -1215,17 +1217,31 @@
<title>Signatures</title>
<para>
- <literal>setTablespace()</literal> can be invoked with either
- the name of the tablespace, as shown here:
+ <literal>setTablespace()</literal> can be invoked in either of
+ two ways, listed here:
+ </para>
+ </formalpara>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ Using the name of the tablespace, as shown here:
+ </para>
+
<programlisting>
void setTablespace
(
const char* <replaceable>name</replaceable>
)
</programlisting>
+ </listitem>
- Or with a reference to a <literal>Tablespace</literal> object.
+ <listitem>
+ <para>
+ Using a reference to a <literal>Tablespace</literal> object.
+ </para>
<programlisting>
void setTablespace
@@ -1233,9 +1249,9 @@
const class Tablespace& <replaceable>tablespace</replaceable>
)
</programlisting>
- </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -1244,27 +1260,27 @@
<para>
This method takes a single parameter, which can be either one
of the following:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The <replaceable>name</replaceable> of the tablespace
- (as a character pointer).
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- A reference <replaceable>tablespace</replaceable> to the
- corresponding <literal>Tablespace</literal> object.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The <replaceable>name</replaceable> of the tablespace (as a
+ character pointer).
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ A reference <replaceable>tablespace</replaceable> to the
+ corresponding <literal>Tablespace</literal> object.
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
Modified: trunk/ndbapi/ndb-dictionary.xml
===================================================================
--- trunk/ndbapi/ndb-dictionary.xml 2010-10-05 07:43:53 UTC (rev 22976)
+++ trunk/ndbapi/ndb-dictionary.xml 2010-10-05 08:31:26 UTC (rev 22977)
Changed blocks: 31, Lines Added: 262, Lines Deleted: 229; 20891 bytes
@@ -234,21 +234,20 @@
<para>
This diagram shows all the public members of the
<literal>Dictionary</literal> class and its subclasses:
-
- <mediaobject>
- <imageobject>
- <imagedata contentwidth="625" contentdepth="800" fileref="images/published/NdbDictionary-Dictionary-class.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase lang="en">Public members of the
- <literal>Dictionary</literal> class and its
- subclasses.</phrase>
- </textobject>
- </mediaobject>
</para>
</formalpara>
+ <mediaobject>
+ <imageobject>
+ <imagedata contentwidth="625" contentdepth="800" fileref="images/published/NdbDictionary-Dictionary-class.png" format="PNG"/>
+ </imageobject>
+ <textobject>
+ <phrase lang="en">Public members of the
+ <literal>Dictionary</literal> class and its subclasses.</phrase>
+ </textobject>
+ </mediaobject>
+
<section id="ndb-dictionary-methods">
<title><literal>Dictionary</literal> Methods</title>
@@ -326,17 +325,17 @@
<para>
The destructor takes no parameters and returns nothing.
+ </para>
+ </formalpara>
+
<programlisting>
protected ~Dictionary
(
void
)
</programlisting>
- </para>
- </formalpara>
-
<!--
<formalpara>
@@ -474,28 +473,31 @@
<para>
Two parameters are required:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The name of the index (<replaceable>iName</replaceable>)
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- The name of the table to which the index belongs
- (<replaceable>tName</replaceable>)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The name of the index (<replaceable>iName</replaceable>)
+ </para>
+ </listitem>
- </itemizedlist>
+ <listitem>
+ <para>
+ The name of the table to which the index belongs
+ (<replaceable>tName</replaceable>)
+ </para>
+ </listitem>
- Both are string values, represented by character pointers.
- </para>
+ </itemizedlist>
- </formalpara>
+ <para>
+ Both of these are string values, represented by character
+ pointers.
+ </para>
<formalpara>
@@ -630,16 +632,30 @@
<title>Signatures</title>
<para>
- Using the tablespace name:
+ This method can be invoked in either of ways, as show here:
+ </para>
+ </formalpara>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ Using the tablespace name:
+ </para>
+
<programlisting>
Tablespace getTablespace
(
const char* <replaceable>name</replaceable>
)
</programlisting>
+ </listitem>
- Using the tablespace ID:
+ <listitem>
+ <para>
+ Using the tablespace ID:
+ </para>
<programlisting>
Tablespace getTablespace
@@ -647,9 +663,9 @@
Uint32 <replaceable>id</replaceable>
)
</programlisting>
- </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -657,27 +673,27 @@
<para>
Either one of the following:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The <replaceable>name</replaceable> of the tablespace, a
- string (as a character pointer)
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- The unsigned 32-bit integer
- <replaceable>id</replaceable> of the tablespace
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The <replaceable>name</replaceable> of the tablespace, a
+ string (as a character pointer)
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ The unsigned 32-bit integer <replaceable>id</replaceable> of
+ the tablespace
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -829,28 +845,28 @@
<para>
This method must be invoked using two arguments, as shown
here:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The 32-bit unsigned integer
- <replaceable>nodeId</replaceable> of the data node where
- the datafile is located
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- The <replaceable>path</replaceable> to the datafile on
- the node's file system (string as character pointer)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The 32-bit unsigned integer
+ <replaceable>nodeId</replaceable> of the data node where the
+ datafile is located
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ The <replaceable>path</replaceable> to the datafile on the
+ node's file system (string as character pointer)
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -925,28 +941,28 @@
<para>
This method requires the following two arguments:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The <replaceable>nodeId</replaceable> of the data node
- where the undofile is located; this value is passed as a
- 32-bit unsigned integer
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- The <replaceable>path</replaceable> to the undofile on
- the node's file system (string as character pointer)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The <replaceable>nodeId</replaceable> of the data node where
+ the undofile is located; this value is passed as a 32-bit
+ unsigned integer
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ The <replaceable>path</replaceable> to the undofile on the
+ node's file system (string as character pointer)
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -1154,6 +1170,12 @@
<title>Signature</title>
<para>
+ This method can be invoked with or without a reference to a
+ table object:
+ </para>
+
+ </formalpara>
+
<programlisting>
int createIndex
(
@@ -1168,10 +1190,7 @@
const Table& <replaceable>table</replaceable>
)
</programlisting>
- </para>
- </formalpara>
-
<formalpara>
<title>Parameters</title>
@@ -1550,9 +1569,17 @@
<title>Signature</title>
<para>
- To create an <literal>NdbRecord</literal> for use in table
- operations:
+ The signature of this method depends on whether the resulting
+ NdbRecord is to be used in table or index operations:
+ </para>
+ </formalpara>
+
+ <para>
+ To create an <literal>NdbRecord</literal> for use in table
+ operations, use the following:
+ </para>
+
<programlisting>
NdbRecord* createRecord
(
@@ -1563,8 +1590,10 @@
)
</programlisting>
- To create an <literal>NdbRecord</literal> for use in index
- operations, you can use either of the following:
+ <para>
+ To create an <literal>NdbRecord</literal> for use in index
+ operations, you can use either of the following:
+ </para>
<programlisting>
NdbRecord* createRecord
@@ -1577,7 +1606,9 @@
)
</programlisting>
- or
+ <para>
+ or
+ </para>
<programlisting>
NdbRecord* createRecord
@@ -1588,10 +1619,7 @@
Uint32 <replaceable>elementSize</replaceable>
)
</programlisting>
- </para>
- </formalpara>
-
<formalpara>
<title>Parameters</title>
@@ -1599,55 +1627,53 @@
<para>
<literal>Dictionary::createRecord()</literal> takes the
following parameters:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- If this <literal>NdbRecord</literal> is to be used with
- an index, a pointer to the corresponding
- <literal>Index</literal> object. If the
- <literal>NdbRecord</literal> is to be used with a table,
- this parameter is omitted. (See
- <xref linkend="ndb-index"/>.)
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- A pointer to a <literal>Table</literal> object
- representing the table to be scanned. If the
- <literal>Ndbrecord</literal> produced is to be used with
- an index, then this optionally specifies the table
- containing that index. (See
- <xref linkend="ndb-table"/>.)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ If this <literal>NdbRecord</literal> is to be used with an
+ index, a pointer to the corresponding
+ <literal>Index</literal> object. If the
+ <literal>NdbRecord</literal> is to be used with a table,
+ this parameter is omitted. (See
+ <xref linkend="ndb-index"/>.)
+ </para>
+ </listitem>
- <listitem>
- <para>
- A <literal>RecordSpecification</literal> used to
- describe a column. (See
- <xref linkend="ndb-recordspecification"/>.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A pointer to a <literal>Table</literal> object representing
+ the table to be scanned. If the <literal>Ndbrecord</literal>
+ produced is to be used with an index, then this optionally
+ specifies the table containing that index. (See
+ <xref linkend="ndb-table"/>.)
+ </para>
+ </listitem>
- <listitem>
- <para>
- The <replaceable>length</replaceable> of the record.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A <literal>RecordSpecification</literal> used to describe a
+ column. (See <xref linkend="ndb-recordspecification"/>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- The size of the elements making up this record.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The <replaceable>length</replaceable> of the record.
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ The size of the elements making up this record.
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -1841,7 +1867,7 @@
<para>
This method drops an index given an instance of
- <literal>Index</literal> and possibly an optional instance of
+ <literal>Index</literal>, and possibly an optional instance of
<literal>Table</literal>.
</para>
@@ -1875,37 +1901,39 @@
<title>Parameters</title>
<para>
- <itemizedlist>
+ This method takes two parameters, one of which is optional:
+ </para>
- <listitem>
- <formalpara>
+ </formalpara>
- <title>Required</title>
+ <itemizedlist>
- <para>
- A reference to an <literal>Index</literal> object.
- </para>
+ <listitem>
+ <formalpara>
- </formalpara>
- </listitem>
+ <title>Required</title>
- <listitem>
- <formalpara>
+ <para>
+ A reference to an <literal>Index</literal> object.
+ </para>
- <title>Optional</title>
+ </formalpara>
+ </listitem>
- <para>
- A reference to a <literal>Table</literal> object.
- </para>
+ <listitem>
+ <formalpara>
- </formalpara>
- </listitem>
+ <title>Optional</title>
- </itemizedlist>
- </para>
+ <para>
+ A reference to a <literal>Table</literal> object.
+ </para>
- </formalpara>
+ </formalpara>
+ </listitem>
+ </itemizedlist>
+
<formalpara>
<title>Return value</title>
@@ -1978,32 +2006,32 @@
<para>
This method takes two parameters:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The <replaceable>name</replaceable> of the event to be
- dropped, as a string.
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- By default, <literal>dropEvent()</literal> fails if the
- event specified does not exist. You can override this
- behavior by passing any nonzero value for the (optional)
- <replaceable>force</replaceable> argument; in this case
- no check is made as to whether there actually is such an
- event, and an error is returned only if the event exists
- but it was for whatever reason not possible to drop it.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The <replaceable>name</replaceable> of the event to be
+ dropped, as a string.
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ By default, <literal>dropEvent()</literal> fails if the
+ event specified does not exist. You can override this
+ behavior by passing any nonzero value for the (optional)
+ <replaceable>force</replaceable> argument; in this case no
+ check is made as to whether there actually is such an event,
+ and an error is returned only if the event exists but it was
+ for whatever reason not possible to drop it.
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
@@ -2125,8 +2153,8 @@
<title>Description</title>
<para>
- This method drops a logfile group, given an instance of
- <literal>LogfileGroup</literal>.
+ Given an instance of <literal>LogfileGroup</literal>, this
+ method drops the corresponding log file group.
</para>
</formalpara>
@@ -2201,7 +2229,7 @@
<title>Description</title>
<para>
- This method drops a datafile, given a
+ This method drops a data file, given a
<literal>Datafile</literal> object.
</para>
@@ -2277,7 +2305,7 @@
<title>Description</title>
<para>
- This method drops an undofile, given an
+ This method drops an undo file, given an
<literal>Undofile</literal> object.
</para>
@@ -2440,6 +2468,13 @@
<title>Signature</title>
<para>
+ Prior to MySQL Cluster NDB 6.2.19, MySQL Cluster NDB 6.3.29,
+ and MySQL Cluster NDB 7.0.10, this method had only the
+ following signature:
+ </para>
+
+ </formalpara>
+
<programlisting>
int listObjects
(
@@ -2448,9 +2483,11 @@
) const
</programlisting>
- Beginning with MySQL Cluster NDB 6.2.19, MySQL Cluster NDB
- 6.3.29, and MySQL Cluster NDB 7.0.10 (Bug #48851), this method
- has the following additional signature:
+ <para>
+ Beginning with MySQL Cluster NDB 6.2.19, MySQL Cluster NDB
+ 6.3.29, and MySQL Cluster NDB 7.0.10 (see Bug#48851), this
+ method has the following additional signature:
+ </para>
<programlisting>
int listObjects
@@ -2460,15 +2497,13 @@
bool <replaceable>fullyQualified</replaceable>
) const
</programlisting>
- </para>
- </formalpara>
-
<note>
<para>
A non-<literal>const</literal> version of this method, shown
here, was removed in MySQL Cluster NDB 6.2.19, MySQL Cluster
- NDB 6.3.28, and MySQL Cluster NDB 7.0.9. (Bug #47798)
+ NDB 6.3.28, and MySQL Cluster NDB 7.0.9 (see Bug#47798):
+ </para>
<programlisting>
int listObjects
@@ -2477,7 +2512,6 @@
Object::Type <replaceable>type</replaceable> = Object::TypeUndefined
)
</programlisting>
- </para>
</note>
<formalpara>
@@ -2581,7 +2615,8 @@
<para>
The non-<literal>const</literal> version of this method, shown
here, was removed in MySQL Cluster NDB 6.2.19, MySQL Cluster
- NDB 6.3.28, and MySQL Cluster NDB 7.0.9. (Bug #47798)
+ NDB 6.3.28, and MySQL Cluster NDB 7.0.9 (see Bug#47798):
+ </para>
<programlisting>
int listIndexes
@@ -2590,7 +2625,6 @@
const char* <replaceable>table</replaceable>
)
</programlisting>
- </para>
</warning>
<formalpara>
@@ -2598,31 +2632,30 @@
<title>Parameters</title>
<para>
- <literal>listIndexes()</literal> takes two arguments:
+ <literal>listIndexes()</literal> takes two arguments, both of
+ which are required:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- A reference to the <literal>List</literal> that contains
- the indexes following the call to the method
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- The name of the <replaceable>table</replaceable> whose
- indexes are to be listed
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A reference to the <literal>List</literal> that contains the
+ indexes following the call to the method
+ </para>
+ </listitem>
- </itemizedlist>
+ <listitem>
+ <para>
+ The name of the <replaceable>table</replaceable> whose
+ indexes are to be listed
+ </para>
+ </listitem>
- Both of these arguments are required.
- </para>
+ </itemizedlist>
- </formalpara>
-
<formalpara>
<title>Return value</title>
@@ -2688,7 +2721,8 @@
<para>
The non-<literal>const</literal> version of this method, shown
here, was removed in MySQL Cluster NDB 6.2.19, MySQL Cluster
- NDB 6.3.28, and MySQL Cluster NDB 7.0.9. (Bug #47798)
+ NDB 6.3.28, and MySQL Cluster NDB 7.0.9 (see Bug#47798):
+ </para>
<programlisting>
int listEvents
@@ -2696,7 +2730,6 @@
List& <replaceable>list</replaceable>
) const
</programlisting>
- </para>
</warning>
<formalpara>
@@ -2925,27 +2958,27 @@
<para>
The <literal>removeCachedIndex()</literal> requires two
arguments:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- The name of the <replaceable>index</replaceable> to be
- removed from the cache
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- The name of the <replaceable>table</replaceable> in
- which the index is found
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The name of the <replaceable>index</replaceable> to be
+ removed from the cache
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ <listitem>
+ <para>
+ The name of the <replaceable>table</replaceable> in which
+ the index is found
+ </para>
+ </listitem>
- </formalpara>
+ </itemizedlist>
<formalpara>
Modified: trunk/ndbapi/ndb-element.xml
===================================================================
--- trunk/ndbapi/ndb-element.xml 2010-10-05 07:43:53 UTC (rev 22976)
+++ trunk/ndbapi/ndb-element.xml 2010-10-05 08:31:26 UTC (rev 22977)
Changed blocks: 1, Lines Added: 64, Lines Deleted: 64; 5394 bytes
@@ -55,74 +55,74 @@
<para>
An <literal>Element</literal> has the attributes shown in the
following table:
-
- <informaltable>
- <tgroup cols="4">
- <colspec colwidth="25*"/>
- <colspec colwidth="25*"/>
- <colspec colwidth="25*"/>
- <colspec colwidth="25*"/>
- <thead>
- <row>
- <entry>Attribute</entry>
- <entry>Type</entry>
- <entry>Initial Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>id</literal></entry>
- <entry><literal>unsigned int</literal></entry>
- <entry><literal>0</literal></entry>
- <entry>The object's ID</entry>
- </row>
- <row>
- <entry><literal>type</literal></entry>
- <entry><literal>Object::Type</literal></entry>
- <entry><literal>Object::TypeUndefined</literal></entry>
- <entry>The object's type—see <xref linkend="ndb-object-type"/> for
- possible values</entry>
- </row>
- <row>
- <entry><literal>state</literal></entry>
- <entry><literal>Object::State</literal></entry>
- <entry><literal>Object::StateUndefined</literal></entry>
- <entry>The object's state—see <xref linkend="ndb-object-state"/> for
- possible values</entry>
- </row>
- <row>
- <entry><literal>store</literal></entry>
- <entry><literal>Object::Store</literal></entry>
- <entry><literal>Object::StoreUndefined</literal></entry>
- <entry>How the object is stored—see <xref linkend="ndb-object-store"/>
- for possible values</entry>
- </row>
- <row>
- <entry><literal>database</literal></entry>
- <entry><literal>char*</literal></entry>
- <entry><literal>0</literal></entry>
- <entry>The database in which the object is found</entry>
- </row>
- <row>
- <entry><literal>schema</literal></entry>
- <entry><literal>char*</literal></entry>
- <entry><literal>0</literal></entry>
- <entry>The schema in which the object is found</entry>
- </row>
- <row>
- <entry><literal>name</literal></entry>
- <entry><literal>char*</literal></entry>
- <entry><literal>0</literal></entry>
- <entry>The object's name</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
</para>
</formalpara>
+ <informaltable>
+ <tgroup cols="4">
+ <colspec colwidth="25*"/>
+ <colspec colwidth="25*"/>
+ <colspec colwidth="25*"/>
+ <colspec colwidth="25*"/>
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ <entry>Initial Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>id</literal></entry>
+ <entry><literal>unsigned int</literal></entry>
+ <entry><literal>0</literal></entry>
+ <entry>The object's ID</entry>
+ </row>
+ <row>
+ <entry><literal>type</literal></entry>
+ <entry><literal>Object::Type</literal></entry>
+ <entry><literal>Object::TypeUndefined</literal></entry>
+ <entry>The object's type—see <xref linkend="ndb-object-type"/> for
+ possible values</entry>
+ </row>
+ <row>
+ <entry><literal>state</literal></entry>
+ <entry><literal>Object::State</literal></entry>
+ <entry><literal>Object::StateUndefined</literal></entry>
+ <entry>The object's state—see <xref linkend="ndb-object-state"/> for
+ possible values</entry>
+ </row>
+ <row>
+ <entry><literal>store</literal></entry>
+ <entry><literal>Object::Store</literal></entry>
+ <entry><literal>Object::StoreUndefined</literal></entry>
+ <entry>How the object is stored—see <xref linkend="ndb-object-store"/>
+ for possible values</entry>
+ </row>
+ <row>
+ <entry><literal>database</literal></entry>
+ <entry><literal>char*</literal></entry>
+ <entry><literal>0</literal></entry>
+ <entry>The database in which the object is found</entry>
+ </row>
+ <row>
+ <entry><literal>schema</literal></entry>
+ <entry><literal>char*</literal></entry>
+ <entry><literal>0</literal></entry>
+ <entry>The schema in which the object is found</entry>
+ </row>
+ <row>
+ <entry><literal>name</literal></entry>
+ <entry><literal>char*</literal></entry>
+ <entry><literal>0</literal></entry>
+ <entry>The object's name</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
<note>
<para>
For a graphical representation of this class and its parent-child
Modified: trunk/ndbapi/ndb-errors.xml
===================================================================
--- trunk/ndbapi/ndb-errors.xml 2010-10-05 07:43:53 UTC (rev 22976)
+++ trunk/ndbapi/ndb-errors.xml 2010-10-05 08:31:26 UTC (rev 22977)
Changed blocks: 11, Lines Added: 252, Lines Deleted: 230; 19719 bytes
@@ -29,47 +29,49 @@
The following sections list the values of <literal>MGM</literal>
errors by type. There are six types of <literal>MGM</literal>
errors:
+ </para>
- <orderedlist>
+ <orderedlist>
- <listitem>
- <para>
- request errors
- </para>
- </listitem>
+ <listitem>
+ <para>
+ request errors
+ </para>
+ </listitem>
- <listitem>
- <para>
- node ID allocation errors
- </para>
- </listitem>
+ <listitem>
+ <para>
+ node ID allocation errors
+ </para>
+ </listitem>
- <listitem>
- <para>
- service errors
- </para>
- </listitem>
+ <listitem>
+ <para>
+ service errors
+ </para>
+ </listitem>
- <listitem>
- <para>
- backup errors
- </para>
- </listitem>
+ <listitem>
+ <para>
+ backup errors
+ </para>
+ </listitem>
- <listitem>
- <para>
- single user mode errors
- </para>
- </listitem>
+ <listitem>
+ <para>
+ single user mode errors
+ </para>
+ </listitem>
- <listitem>
- <para>
- general usage errors
- </para>
- </listitem>
+ <listitem>
+ <para>
+ general usage errors
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
+ <para>
There is only one general usage error.
</para>
@@ -361,23 +363,23 @@
<para>
NDB API errors can be generated in either of two ways:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- When an operation is defined
- </para>
- </listitem>
+ <listitem>
+ <para>
+ When an operation is defined
+ </para>
+ </listitem>
- <listitem>
- <para>
- When an operation is executed
- </para>
- </listitem>
+ <listitem>
+ <para>
+ When an operation is executed
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
<formalpara>
@@ -402,38 +404,39 @@
transaction of which they are a part to be aborted unless the
<literal>AO_IgnoreError</literal> abort option is set for the
operation.
+ </para>
- <important>
- <para>
- If you have worked with older versions of the NDB API, you
- should be aware that, beginning with MySQL Cluster NDB
- 6.2.0, the <literal>AbortOption</literal> type is a member
- of <literal>NdbOperation</literal>. See
- <xref linkend="ndb-ndboperation-abortoption"/>, for more
- information.
- </para>
- </important>
+ </formalpara>
- By default, read operations are run with
- <literal>AO_IgnoreError</literal>, and write operations are
- run with <literal>AbortOnError</literal>, but this can be
- overridden by the user. When an error during execution causes
- a transaction to be aborted, the <literal>execute()</literal>
- method returns a failure return code. If an error is ignored
- due to <literal>AO_IgnoreError</literal> being set on the
- operation, the <literal>execute()</literal> method returns a
- success code, and the user must examine all operations for
- failure using <literal>NdbOperation::getNdbError()</literal>.
- For this reason, the return value of
- <literal>getNdbError()</literal> should usually be checked,
- even if <literal>execute()</literal> returns success. If the
- client application does not keep track of
- <literal>NdbOperation</literal> objects during execution, then
- <literal>NdbTransaction::getNextCompletedOperation()</literal>
- can be used to iterate over them.
+ <important>
+ <para>
+ If you have worked with older versions of the NDB API, you
+ should be aware that, beginning with MySQL Cluster NDB 6.2.0,
+ the <literal>AbortOption</literal> type is a member of
+ <literal>NdbOperation</literal>. See
+ <xref linkend="ndb-ndboperation-abortoption"/>, for more
+ information.
</para>
+ </important>
- </formalpara>
+ <para>
+ By default, read operations are run with
+ <literal>AO_IgnoreError</literal>, and write operations are run
+ with <literal>AbortOnError</literal>, but this can be overridden
+ by the user. When an error during execution causes a transaction
+ to be aborted, the <literal>execute()</literal> method returns a
+ failure return code. If an error is ignored due to
+ <literal>AO_IgnoreError</literal> being set on the operation,
+ the <literal>execute()</literal> method returns a success code,
+ and the user must examine all operations for failure using
+ <literal>NdbOperation::getNdbError()</literal>. For this reason,
+ the return value of <literal>getNdbError()</literal> should
+ usually be checked, even if <literal>execute()</literal> returns
+ success. If the client application does not keep track of
+ <literal>NdbOperation</literal> objects during execution, then
+ <literal>NdbTransaction::getNextCompletedOperation()</literal>
+ can be used to iterate over them.
+ </para>
<para>
You should also be aware that use of <literal>NdbBlob</literal>
@@ -519,35 +522,35 @@
<literal>NdbTransaction</literal> object for errors via
<literal>NdbTransaction::getNdbError()</literal> if they return
an error code:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>setNull()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>setNull()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>truncate()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>truncate()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>readData()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>readData()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>writeData()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>writeData()</literal>
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
<formalpara>
@@ -557,72 +560,74 @@
In general, it is possible for an error to occur during
execution (resulting in a failure return code) when calling
any of the following methods:
+ </para>
- <itemizedlist>
+ </formalpara>
- <listitem>
- <para>
- <literal>NdbTransaction::execute()</literal>
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>NdbBlob::setNull()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>NdbTransaction::execute()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>NdbBlob::truncate()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>NdbBlob::setNull()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>NdbBlob::readData()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>NdbBlob::truncate()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>NdbBlob::writeData()</literal>
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>NdbBlob::readData()</literal>
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>NdbScanOperation::nextResult()</literal>
- </para>
+ <listitem>
+ <para>
+ <literal>NdbBlob::writeData()</literal>
+ </para>
+ </listitem>
- <note>
- <para>
- This method does <emphasis>not</emphasis> perform an
- implicit <literal>execute()</literal> call. The
- <literal>NdbBlob</literal> methods can cause other
- defined operations to be executed when these methods
- are called; however, <literal>nextResult()</literal>
- calls do not do so.
- </para>
- </note>
- </listitem>
+ <listitem>
+ <para>
+ <literal>NdbScanOperation::nextResult()</literal>
+ </para>
- </itemizedlist>
+ <note>
+ <para>
+ This method does <emphasis>not</emphasis> perform an
+ implicit <literal>execute()</literal> call. The
+ <literal>NdbBlob</literal> methods can cause other defined
+ operations to be executed when these methods are called;
+ however, <literal>nextResult()</literal> calls do not do
+ so.
+ </para>
+ </note>
+ </listitem>
- If this happens, the
- <literal>NdbTransaction::getNdbError()</literal> method should
- be called to identify the first error that occurred. When
- operations are batched, and there are
- <literal>IgnoreError</literal> operations in the batch, there
- may be multiple operations with errors in the transaction.
- These can be found by using
- <literal>NdbTransaction::getNextCompletedOperation()</literal>
- to iterate over the set of completed operations, calling
- <literal>NdbOperation::getNdbError()</literal> for each
- operation.
- </para>
+ </itemizedlist>
- </formalpara>
+ <para>
+ If this happens, the
+ <literal>NdbTransaction::getNdbError()</literal> method should
+ be called to identify the first error that occurred. When
+ operations are batched, and there are
+ <literal>IgnoreError</literal> operations in the batch, there
+ may be multiple operations with errors in the transaction. These
+ can be found by using
+ <literal>NdbTransaction::getNextCompletedOperation()</literal>
+ to iterate over the set of completed operations, calling
+ <literal>NdbOperation::getNdbError()</literal> for each
+ operation.
+ </para>
<para>
When <literal>IgnoreError</literal> has been set on any
@@ -648,23 +653,28 @@
We begin by executing a transaction which may have batched
operations and a mix of <literal>AO_IgnoreError</literal> and
<literal>AbortOnError</literal> abort options:
+ </para>
+ </formalpara>
+
<programlisting>
int execResult= NdbTransaction.execute(<replaceable>args</replaceable>);
</programlisting>
- <note>
- <para>
- For the number and permitted values of
- <replaceable>args</replaceable>, see
- <xref linkend="ndb-ndbtransaction-execute"/>.
- </para>
- </note>
+ <note>
+ <para>
+ For the number and permitted values of
+ <replaceable>args</replaceable>, see
+ <xref linkend="ndb-ndbtransaction-execute"/>.
+ </para>
+ </note>
- Next, because errors on <literal>AO_IgnoreError</literal>
- operations do not affect execResult—that is, the value
- returned by <literal>execute()</literal>—we check for
- errors on the transaction:
+ <para>
+ Next, because errors on <literal>AO_IgnoreError</literal>
+ operations do not affect execResult—that is, the value
+ returned by <literal>execute()</literal>—we check for
+ errors on the transaction:
+ </para>
<programlisting>
NdbError err= NdbTransaction.getNdbError();
@@ -673,60 +683,63 @@
{
</programlisting>
- An nonzero value for the error code means that an error was
- raised on the transaction. This could be due to any of the
- following conditions:
+ <para>
+ An nonzero value for the error code means that an error was
+ raised on the transaction. This could be due to any of the
+ following conditions:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- A transaction-wide error, such as a data node failure,
- that caused the transaction to be aborted
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A transaction-wide error, such as a data node failure, that
+ caused the transaction to be aborted
+ </para>
+ </listitem>
- <listitem>
- <para>
- A single operation-specific error, such as a constraint
- violation, that caused the transaction to be aborted
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A single operation-specific error, such as a constraint
+ violation, that caused the transaction to be aborted
+ </para>
+ </listitem>
- <listitem>
- <para>
- A single operation-specific ignored error, such as no
- data found, that did not cause the transaction to be
- aborted
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A single operation-specific ignored error, such as no data
+ found, that did not cause the transaction to be aborted
+ </para>
+ </listitem>
- <listitem>
- <para>
- The first of many operation-specific ignored errors,
- such as no data found when batching, that did not cause
- the transaction to be aborted
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The first of many operation-specific ignored errors, such as
+ no data found when batching, that did not cause the
+ transaction to be aborted
+ </para>
+ </listitem>
- <listitem>
- <para>
- First of a number of operation-specific ignored errors
- such as no data found (when batching) before an aborting
- operation error (transaction aborted)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ First of a number of operation-specific ignored errors such
+ as no data found (when batching) before an aborting
+ operation error (transaction aborted)
+ </para>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
<programlisting>
if (execResult != 0)
{
</programlisting>
- The transaction has been aborted. The recommended strategy for
- handling the error in this case is to test the transaction
- error status and take appropriate action based on its value:
+ <para>
+ The transaction has been aborted. The recommended strategy for
+ handling the error in this case is to test the transaction error
+ status and take appropriate action based on its value:
+ </para>
<programlisting>
switch (err.status)
@@ -741,10 +754,12 @@
}
</programlisting>
- Since the transaction was aborted, it is generally necessary
- to iterate over the completed operations (if any) and find the
- errors raised by each only if you wish to do so for reporting
- purposes.
+ <para>
+ Since the transaction was aborted, it is generally necessary to
+ iterate over the completed operations (if any) and find the
+ errors raised by each only if you wish to do so for reporting
+ purposes.
+ </para>
<programlisting>
}
@@ -752,40 +767,46 @@
{
</programlisting>
- The transaction itself was not aborted, but there must be one
- or more ignored errors. In this case, you should iterate over
- the operations to determine what happened and handle the cause
- accordingly.
+ <para>
+ The transaction itself was not aborted, but there must be one or
+ more ignored errors. In this case, you should iterate over the
+ operations to determine what happened and handle the cause
+ accordingly.
+ </para>
<programlisting>
}
}
</programlisting>
- To handle a <literal>NdbScanOperation::nextResult()</literal>
- which returns <literal>-1</literal>, indicating that the
- operation failed (omitting cases where the operation was
- successful):
+ <para>
+ To handle a <literal>NdbScanOperation::nextResult()</literal>
+ which returns <literal>-1</literal>, indicating that the
+ operation failed (omitting cases where the operation was
+ successful):
+ </para>
<programlisting>
int nextrc= NdbScanOperation.nextResult(<replaceable>args</replaceable>);
</programlisting>
- <note>
- <para>
- For the number and permitted values of
- <replaceable>args</replaceable>, see
- <xref linkend="ndb-ndbscanoperation-nextresult"/>.
- </para>
- </note>
+ <note>
+ <para>
+ For the number and permitted values of
+ <replaceable>args</replaceable>, see
+ <xref linkend="ndb-ndbscanoperation-nextresult"/>.
+ </para>
+ </note>
<programlisting>
if (nextrc == -1)
{
</programlisting>
- First, you should check the
- <literal>NdbScanOperation</literal> object for any errors:
+ <para>
+ First, you should check the <literal>NdbScanOperation</literal>
+ object for any errors:
+ </para>
<programlisting>
NdbError err= NdbScanOperation.getNdbError();
@@ -794,15 +815,19 @@
{
</programlisting>
- No error was found in the scan operation; the error must
- belong to the transaction as whole.
+ <para>
+ No error was found in the scan operation; the error must belong
+ to the transaction as whole.
+ </para>
<programlisting>
}
err= NdbTransaction.getNdbError();
</programlisting>
- Now you can handle the error based on the error status:
+ <para>
+ Now you can handle the error based on the error status:
+ </para>
<programlisting>
switch (err.status)
@@ -817,10 +842,7 @@
}
}
</programlisting>
- </para>
- </formalpara>
-
<para>
For information about NDB API error classification and status
codes, see <xref linkend="ndb-error-classifications"/>. While
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r22977 - trunk/ndbapi | jon.stephens | 5 Oct |