List:Commits« Previous MessageNext Message »
From:paul Date:August 31 2006 1:49am
Subject:svn commit - mysqldoc@docsrva: r3169 - in trunk: . refman-4.1 refman-5.0 refman-5.1
View as plain text  
Author: paul
Date: 2006-08-31 03:49:30 +0200 (Thu, 31 Aug 2006)
New Revision: 3169

Log:
 r14164@frost:  paul | 2006-08-30 20:48:58 -0500
 Add information to distinguish errno and SQLSTATE values.


Modified:
   trunk/refman-4.1/apis.xml
   trunk/refman-4.1/error-handling.xml
   trunk/refman-5.0/apis.xml
   trunk/refman-5.0/error-handling.xml
   trunk/refman-5.1/apis.xml
   trunk/refman-5.1/error-handling.xml

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:13274
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14162
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:9971
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:13274
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14164
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:9971


Modified: trunk/refman-4.1/apis.xml
===================================================================
--- trunk/refman-4.1/apis.xml	2006-08-30 23:26:41 UTC (rev 3168)
+++ trunk/refman-4.1/apis.xml	2006-08-31 01:49:30 UTC (rev 3169)
Changed blocks: 2, Lines Added: 36, Lines Deleted: 3; 2266 bytes

@@ -3003,6 +3003,22 @@
         </para>
 
         <para>
+          MySQL-specific error numbers returned by
+          <literal>mysql_errno()</literal> differ from SQLSTATE values
+          returned by <literal>mysql_sqlstate()</literal>. For example,
+          the <command>mysql</command> client program displays errors
+          using the following format, where <literal>1146</literal> is
+          the <literal>mysql_errno()</literal> value and
+          <literal>'42S02'</literal> is the corresponding
+          <literal>mysql_sqlstate()</literal> value:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+        <para>
           <emphasis role="bold">Return Values</emphasis>
         </para>
 

@@ -7594,12 +7610,29 @@
         </para>
 
         <para>
-          Note that not all MySQL errors are yet mapped to SQLSTATE's.
-          The value <literal>'HY000'</literal> (general error) is used
-          for unmapped errors.
+          SQLSTATE values returned by
+          <literal>mysql_sqlstate()</literal> differ from MySQL-specific
+          error numbers returned by <literal>mysql_errno()</literal>.
+          For example, the <command>mysql</command> client program
+          displays errors using the following format, where
+          <literal>1146</literal> is the
+          <literal>mysql_errno()</literal> value and
+          <literal>'42S02'</literal> is the corresponding
+          <literal>mysql_sqlstate()</literal> value:
         </para>
 
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
         <para>
+          Not all MySQL error numbers are mapped to SQLSTATE error
+          codes. The value <literal>'HY000'</literal> (general error) is
+          used for unmapped error numbers.
+        </para>
+
+        <para>
           This function was added in MySQL 4.1.1.
         </para>
 


Modified: trunk/refman-4.1/error-handling.xml
===================================================================
--- trunk/refman-4.1/error-handling.xml	2006-08-30 23:26:41 UTC (rev 3168)
+++ trunk/refman-4.1/error-handling.xml	2006-08-31 01:49:30 UTC (rev 3169)
Changed blocks: 1, Lines Added: 44, Lines Deleted: 0; 1823 bytes

@@ -29,6 +29,50 @@
     <title>Server Error Codes and Messages</title>
 
     <para>
+      MySQL programs have access to several types of error information
+      when the server returns an error. For example, the
+      <command>mysql</command> client program displays errors using the
+      following format:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+    <para>
+      The message displayed contains three types of information:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          A numeric error value (<literal>1146</literal>). This number
+          is MySQL-specific and is not portable to other database
+          systems.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A five-character SQLSTATE value (<literal>'42S02'</literal>).
+          The values are specified by ANSI SQL and ODBC and are more
+          standardized. Not all MySQL error numbers are mapped to
+          SQLSTATE error codes. The value <literal>'HY000'</literal>
+          (general error) is used for unmapped errors.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A string that provides a textual description of the error.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
       Server error information comes from the following source files.
       For details about the way that error information is defined, see
       the MySQL Internals manual, available at


Modified: trunk/refman-5.0/apis.xml
===================================================================
--- trunk/refman-5.0/apis.xml	2006-08-30 23:26:41 UTC (rev 3168)
+++ trunk/refman-5.0/apis.xml	2006-08-31 01:49:30 UTC (rev 3169)
Changed blocks: 2, Lines Added: 35, Lines Deleted: 2; 2131 bytes

@@ -2976,6 +2976,22 @@
         </para>
 
         <para>
+          MySQL-specific error numbers returned by
+          <literal>mysql_errno()</literal> differ from SQLSTATE values
+          returned by <literal>mysql_sqlstate()</literal>. For example,
+          the <command>mysql</command> client program displays errors
+          using the following format, where <literal>1146</literal> is
+          the <literal>mysql_errno()</literal> value and
+          <literal>'42S02'</literal> is the corresponding
+          <literal>mysql_sqlstate()</literal> value:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+        <para>
           <emphasis role="bold">Return Values</emphasis>
         </para>
 

@@ -7177,9 +7193,26 @@
         </para>
 
         <para>
-          Note that not all MySQL errors are mapped to SQLSTATE error
+          SQLSTATE values returned by
+          <literal>mysql_sqlstate()</literal> differ from MySQL-specific
+          error numbers returned by <literal>mysql_errno()</literal>.
+          For example, the <command>mysql</command> client program
+          displays errors using the following format, where
+          <literal>1146</literal> is the
+          <literal>mysql_errno()</literal> value and
+          <literal>'42S02'</literal> is the corresponding
+          <literal>mysql_sqlstate()</literal> value:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+        <para>
+          Not all MySQL error numbers are mapped to SQLSTATE error
           codes. The value <literal>'HY000'</literal> (general error) is
-          used for unmapped errors.
+          used for unmapped error numbers.
         </para>
 
         <para>


Modified: trunk/refman-5.0/error-handling.xml
===================================================================
--- trunk/refman-5.0/error-handling.xml	2006-08-30 23:26:41 UTC (rev 3168)
+++ trunk/refman-5.0/error-handling.xml	2006-08-31 01:49:30 UTC (rev 3169)
Changed blocks: 1, Lines Added: 44, Lines Deleted: 0; 1823 bytes

@@ -29,6 +29,50 @@
     <title>Server Error Codes and Messages</title>
 
     <para>
+      MySQL programs have access to several types of error information
+      when the server returns an error. For example, the
+      <command>mysql</command> client program displays errors using the
+      following format:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+    <para>
+      The message displayed contains three types of information:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          A numeric error value (<literal>1146</literal>). This number
+          is MySQL-specific and is not portable to other database
+          systems.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A five-character SQLSTATE value (<literal>'42S02'</literal>).
+          The values are specified by ANSI SQL and ODBC and are more
+          standardized. Not all MySQL error numbers are mapped to
+          SQLSTATE error codes. The value <literal>'HY000'</literal>
+          (general error) is used for unmapped errors.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A string that provides a textual description of the error.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
       Server error information comes from the following source files.
       For details about the way that error information is defined, see
       the MySQL Internals manual, available at


Modified: trunk/refman-5.1/apis.xml
===================================================================
--- trunk/refman-5.1/apis.xml	2006-08-30 23:26:41 UTC (rev 3168)
+++ trunk/refman-5.1/apis.xml	2006-08-31 01:49:30 UTC (rev 3169)
Changed blocks: 2, Lines Added: 35, Lines Deleted: 2; 2131 bytes

@@ -2968,6 +2968,22 @@
         </para>
 
         <para>
+          MySQL-specific error numbers returned by
+          <literal>mysql_errno()</literal> differ from SQLSTATE values
+          returned by <literal>mysql_sqlstate()</literal>. For example,
+          the <command>mysql</command> client program displays errors
+          using the following format, where <literal>1146</literal> is
+          the <literal>mysql_errno()</literal> value and
+          <literal>'42S02'</literal> is the corresponding
+          <literal>mysql_sqlstate()</literal> value:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+        <para>
           <emphasis role="bold">Return Values</emphasis>
         </para>
 

@@ -7626,9 +7642,26 @@
         </para>
 
         <para>
-          Note that not all MySQL errors are mapped to SQLSTATE error
+          SQLSTATE values returned by
+          <literal>mysql_sqlstate()</literal> differ from MySQL-specific
+          error numbers returned by <literal>mysql_errno()</literal>.
+          For example, the <command>mysql</command> client program
+          displays errors using the following format, where
+          <literal>1146</literal> is the
+          <literal>mysql_errno()</literal> value and
+          <literal>'42S02'</literal> is the corresponding
+          <literal>mysql_sqlstate()</literal> value:
+        </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+        <para>
+          Not all MySQL error numbers are mapped to SQLSTATE error
           codes. The value <literal>'HY000'</literal> (general error) is
-          used for unmapped errors.
+          used for unmapped error numbers.
         </para>
 
         <para>


Modified: trunk/refman-5.1/error-handling.xml
===================================================================
--- trunk/refman-5.1/error-handling.xml	2006-08-30 23:26:41 UTC (rev 3168)
+++ trunk/refman-5.1/error-handling.xml	2006-08-31 01:49:30 UTC (rev 3169)
Changed blocks: 1, Lines Added: 44, Lines Deleted: 0; 1823 bytes

@@ -29,6 +29,50 @@
     <title>Server Error Codes and Messages</title>
 
     <para>
+      MySQL programs have access to several types of error information
+      when the server returns an error. For example, the
+      <command>mysql</command> client program displays errors using the
+      following format:
+    </para>
+
+<programlisting>
+shell&gt; <userinput>SELECT * FROM no_such_table;</userinput>
+ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
+</programlisting>
+
+    <para>
+      The message displayed contains three types of information:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          A numeric error value (<literal>1146</literal>). This number
+          is MySQL-specific and is not portable to other database
+          systems.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A five-character SQLSTATE value (<literal>'42S02'</literal>).
+          The values are specified by ANSI SQL and ODBC and are more
+          standardized. Not all MySQL error numbers are mapped to
+          SQLSTATE error codes. The value <literal>'HY000'</literal>
+          (general error) is used for unmapped errors.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          A string that provides a textual description of the error.
+        </para>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
       Server error information comes from the following source files.
       For details about the way that error information is defined, see
       the MySQL Internals manual, available at


Thread
svn commit - mysqldoc@docsrva: r3169 - in trunk: . refman-4.1 refman-5.0 refman-5.1paul31 Aug