List:Commits« Previous MessageNext Message »
From:paul Date:November 17 2006 7:08pm
Subject:svn commit - mysqldoc@docsrva: r3974 - in trunk: . refman-5.0 refman-5.1
View as plain text  
Author: paul
Date: 2006-11-17 20:08:39 +0100 (Fri, 17 Nov 2006)
New Revision: 3974

Log:
 r15829@polar:  paul | 2006-11-17 13:07:16 -0600
 Replace "erroneous" example that doesn't really cause an error
 with one that does.


Modified:
   trunk/refman-5.0/database-administration.xml
   trunk/refman-5.1/database-administration.xml

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:15826
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:12168
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:11757
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:15829
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:12165
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:11757


Modified: trunk/refman-5.0/database-administration.xml
===================================================================
--- trunk/refman-5.0/database-administration.xml	2006-11-17 18:56:36 UTC (rev 3973)
+++ trunk/refman-5.0/database-administration.xml	2006-11-17 19:08:39 UTC (rev 3974)
Changed blocks: 1, Lines Added: 19, Lines Deleted: 10; 2146 bytes

@@ -10331,22 +10331,31 @@
 
             <para>
               Allow spaces between a function name and the
-              &lsquo;<literal>(</literal>&rsquo; character. This forces
-              all function names to be treated as reserved words. As a
-              result, if you want to access any database, table, or
-              column name that is a reserved word, you must quote it.
-              For example, because there is a <literal>USER()</literal>
-              function, the name of the <literal>user</literal> table in
-              the <literal>mysql</literal> database and the
-              <literal>User</literal> column in that table become
-              reserved, so you must quote them:
+              &lsquo;<literal>(</literal>&rsquo; character. This causes
+              function names to be treated as reserved words. As a
+              result, identifiers that are the same as function names
+              must be quoted as described in
+              <xref linkend="legal-names"/>. For example, because there
+              is a <literal>ABS()</literal> function, the use of
+              <literal>abs</literal> as a table name in the following
+              statement causes an error:
             </para>
 
 <programlisting>
-SELECT "User" FROM mysql."user";
+mysql> <userinput>CREATE TABLE abs (i INT);</userinput>
+ERROR 1064 (42000): You have an error in your SQL syntax
 </programlisting>
 
             <para>
+              The table name should be quoted:
+            </para>
+
+<programlisting>
+mysql> <userinput>CREATE TABLE `abs` (i INT);</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+            <para>
               The <literal>IGNORE_SPACE</literal> SQL mode applies to
               built-in functions, not to stored routines. it is always
               allowable to have spaces after a routine name, regardless


Modified: trunk/refman-5.1/database-administration.xml
===================================================================
--- trunk/refman-5.1/database-administration.xml	2006-11-17 18:56:36 UTC (rev 3973)
+++ trunk/refman-5.1/database-administration.xml	2006-11-17 19:08:39 UTC (rev 3974)
Changed blocks: 1, Lines Added: 19, Lines Deleted: 10; 2146 bytes

@@ -10513,22 +10513,31 @@
 
             <para>
               Allow spaces between a function name and the
-              &lsquo;<literal>(</literal>&rsquo; character. This forces
-              all function names to be treated as reserved words. As a
-              result, if you want to access any database, table, or
-              column name that is a reserved word, you must quote it.
-              For example, because there is a <literal>USER()</literal>
-              function, the name of the <literal>user</literal> table in
-              the <literal>mysql</literal> database and the
-              <literal>User</literal> column in that table become
-              reserved, so you must quote them:
+              &lsquo;<literal>(</literal>&rsquo; character. This causes
+              function names to be treated as reserved words. As a
+              result, identifiers that are the same as function names
+              must be quoted as described in
+              <xref linkend="legal-names"/>. For example, because there
+              is a <literal>ABS()</literal> function, the use of
+              <literal>abs</literal> as a table name in the following
+              statement causes an error:
             </para>
 
 <programlisting>
-SELECT "User" FROM mysql."user";
+mysql> <userinput>CREATE TABLE abs (i INT);</userinput>
+ERROR 1064 (42000): You have an error in your SQL syntax
 </programlisting>
 
             <para>
+              The table name should be quoted:
+            </para>
+
+<programlisting>
+mysql> <userinput>CREATE TABLE `abs` (i INT);</userinput>
+Query OK, 0 rows affected (0.00 sec)
+</programlisting>
+
+            <para>
               The <literal>IGNORE_SPACE</literal> SQL mode applies to
               built-in functions, not to stored routines. it is always
               allowable to have spaces after a routine name, regardless


Thread
svn commit - mysqldoc@docsrva: r3974 - in trunk: . refman-5.0 refman-5.1paul17 Nov