Author: paul
Date: 2007-12-08 01:39:43 +0100 (Sat, 08 Dec 2007)
New Revision: 9208
Log:
r34045@arctic: paul | 2007-12-07 18:33:28 -0600
Sync translations.
Modified:
trunk/it/refman-5.1/apis-c.xml
trunk/it/refman-5.1/apis.xml
trunk/it/refman-5.1/connectors-apis.xml
trunk/it/refman-5.1/data-types.xml
trunk/it/refman-5.1/errors-problems-core.xml
trunk/it/refman-5.1/events.xml
trunk/it/refman-5.1/internationalization.xml
trunk/it/refman-5.1/triggers.xml
trunk/it/refman-5.1/tutorial.xml
trunk/it/refman-5.1/versions.ent
trunk/it/refman-5.1/views.xml
trunk/pt/refman-5.1/apis-c.xml
trunk/pt/refman-5.1/connectors-apis.xml
trunk/pt/refman-5.1/data-types.xml
trunk/pt/refman-5.1/errors-problems-core.xml
trunk/pt/refman-5.1/events.xml
trunk/pt/refman-5.1/internationalization.xml
trunk/pt/refman-5.1/triggers.xml
trunk/pt/refman-5.1/tutorial.xml
trunk/pt/refman-5.1/versions.ent
trunk/pt/refman-5.1/views.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:34044
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:27855
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:22582
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:34045
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:27855
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:22582
Modified: trunk/it/refman-5.1/apis-c.xml
===================================================================
--- trunk/it/refman-5.1/apis-c.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/apis-c.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 665 bytes
@@ -37,8 +37,8 @@
communicate with the MySQL server. This means that, for example, you
can take advantage of many of the same environment variables that
are used by other client programs, because they are referenced from
- the library. See <xref linkend="programs"/>, for a
- list of these variables.
+ the library. See <xref linkend="programs"/>, for a list of these
+ variables.
</para>
<para>
Modified: trunk/it/refman-5.1/apis.xml
===================================================================
--- trunk/it/refman-5.1/apis.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/apis.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 1, Lines Added: 8, Lines Deleted: 8; 1661 bytes
@@ -48,20 +48,20 @@
libreria <literal>libmysqld</literal> (il server incorporato).
</para>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-libmysqld.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-libmysqld.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-c.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-c.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-php.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-php.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-perl.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-perl.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-cplusplus.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-cplusplus.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-python.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-python.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-tcl.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-tcl.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-eiffel.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-eiffel.xml"/>
</chapter>
Modified: trunk/it/refman-5.1/connectors-apis.xml
===================================================================
--- trunk/it/refman-5.1/connectors-apis.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/connectors-apis.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 4, Lines Added: 21, Lines Deleted: 23; 4147 bytes
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY % all.entities SYSTEM "all-entities.ent">
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<chapter id="connectors-apis">
@@ -39,11 +37,11 @@
</indexterm>
<indexterm>
- <primary><literal>mysqlclient</literal> library</primary>
+ <primary>mysqlclient library</primary>
</indexterm>
<indexterm>
- <primary><literal>mysqld</literal> library</primary>
+ <primary>mysqld library</primary>
</indexterm>
<indexterm>
@@ -53,12 +51,12 @@
<indexterm>
<primary>library</primary>
- <secondary><literal>mysqlclient</literal></secondary>
+ <secondary>mysqlclient</secondary>
</indexterm>
<indexterm>
<primary>library</primary>
- <secondary><literal>mysqld</literal></secondary>
+ <secondary>mysqld</secondary>
</indexterm>
<para>
@@ -219,34 +217,34 @@
</itemizedlist>
- <xi:include href="../refman-common/connector-odbc.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-odbc.xml"/>
- <xi:include href="../refman-common/connector-net.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-net.xml"/>
- <xi:include href="../refman-common/connector-vstudioplugin.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-vstudioplugin.xml"/>
- <xi:include href="../refman-common/connector-j.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-j.xml"/>
- <xi:include href="../refman-common/connector-mxj.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-mxj.xml"/>
- <xi:include href="../refman-common/connector-php.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-php.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-c.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-c.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-libmysqld.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-libmysqld.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-progutils.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-progutils.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-php.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-php.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-perl.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-perl.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-cplusplus.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-cplusplus.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-python.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-python.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-tcl.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-tcl.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-eiffel.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-eiffel.xml"/>
</chapter>
Modified: trunk/it/refman-5.1/data-types.xml
===================================================================
--- trunk/it/refman-5.1/data-types.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/data-types.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 14, Lines Added: 64, Lines Deleted: 30; 8744 bytes
@@ -561,9 +561,9 @@
<listitem>
<para>
In
-
<literal>MIN(<replaceable>col_name</replaceable>)</literal>
+ <function
role="sql">MIN(<replaceable>col_name</replaceable>)</function>
or
-
<literal>MAX(<replaceable>col_name</replaceable>)</literal>,
+ <function
role="sql">MAX(<replaceable>col_name</replaceable>)</function>,
where <replaceable>col_name</replaceable> refers to
a <literal>BIGINT</literal> column.
</para>
@@ -1403,7 +1403,7 @@
<remark role="help-topic" condition="VARCHAR"/>
<remark role="help-keywords">
- NATIONAL VARYING CHARACTER VARCHARACTER
+ NATIONAL VARYING CHARACTER VARCHARACTER NVARCHAR
</remark>
<remark role="help-description-begin"/>
@@ -1426,6 +1426,14 @@
</indexterm>
<indexterm>
+ <primary>NATIONAL VARCHAR data type</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>NVARCHAR data type</primary>
+ </indexterm>
+
+ <indexterm>
<primary>data type</primary>
<secondary>VARCHAR</secondary>
</indexterm>
@@ -1445,6 +1453,16 @@
<secondary>VARCHARACTER</secondary>
</indexterm>
+ <indexterm>
+ <primary>data type</primary>
+ <secondary>NATIONAL VARCHAR</secondary>
+ </indexterm>
+
+ <indexterm>
+ <primary>data type</primary>
+ <secondary>NVARCHAR</secondary>
+ </indexterm>
+
<literal>[NATIONAL] VARCHAR(<replaceable>M</replaceable>)
[CHARACTER SET <replaceable>charset_name</replaceable>]
[COLLATE
@@ -1484,7 +1502,14 @@
<para>
<literal>VARCHAR</literal> is shorthand for
- <literal>CHARACTER VARYING</literal>.
+ <literal>CHARACTER VARYING</literal>. <literal>NATIONAL
+ VARCHAR</literal> is the standard SQL way to define that a
+ <literal>VARCHAR</literal> column should use some predefined
+ character set. MySQL 4.1 and up uses <literal>utf8</literal>
+ as this predefined character set.
+ <xref linkend="charset-national"/>.
+ <literal>NVARCHAR</literal> is shorthand for
+ <literal>NATIONAL VARCHAR</literal>.
</para>
<remark role="help-description-end"/>
@@ -1929,10 +1954,11 @@
for a column. With one exception, the default value must be a
constant; it cannot be a function or an expression. This means,
for example, that you cannot set the default for a date column
- to be the value of a function such as <literal>NOW()</literal>
- or <literal>CURRENT_DATE</literal>. The exception is that you
- can specify <literal>CURRENT_TIMESTAMP</literal> as the default
- for a <literal>TIMESTAMP</literal> column. See
+ to be the value of a function such as
+ <function role="sql">NOW()</function> or
+ <literal>CURRENT_DATE</literal>. The exception is that you can
+ specify <literal>CURRENT_TIMESTAMP</literal> as the default for
+ a <literal>TIMESTAMP</literal> column. See
<xref linkend="timestamp"/>.
</para>
@@ -2499,8 +2525,8 @@
MySQL 5.1.18, a <literal>DATE</literal> value is coerced to the
<literal>DATETIME</literal> type by adding the time portion as
<literal>'00:00:00'</literal>. To mimic the old behavior, use the
- <literal>CAST()</literal> function to perform the comparison in
- the following way:
+ <function role="sql">CAST()</function> function to perform the
+ comparison in the following way:
</para>
<programlisting>
@@ -2811,7 +2837,7 @@
As the result of a function that returns a value that is
acceptable in a <literal>DATETIME</literal>,
<literal>DATE</literal>, or
<literal>TIMESTAMP</literal>
- context, such as <literal>NOW()</literal> or
+ context, such as <function role="sql">NOW()</function> or
<literal>CURRENT_DATE</literal>.
</para>
</listitem>
@@ -2841,18 +2867,24 @@
</para>
<para>
- Conversion of <literal>DATETIME</literal> values to numeric form
- (for example, by adding <literal>+0</literal>) results in a
- double value with a microseconds part of
- <literal>.000000</literal>:
+ Conversion of <literal>TIME</literal> or
+ <literal>DATETIME</literal> values to numeric form (for example,
+ by adding <literal>+0</literal>) results in a double value with
+ a microseconds part of <literal>.000000</literal>:
</para>
<programlisting>
+mysql> <userinput>SELECT CURTIME(), CURTIME()+0;</userinput>
++-----------+---------------+
+| CURTIME() | CURTIME()+0 |
++-----------+---------------+
+| 10:41:36 | 104136.000000 |
++-----------+---------------+
mysql> <userinput>SELECT NOW(), NOW()+0;</userinput>
+---------------------+-----------------------+
| NOW() | NOW()+0 |
+---------------------+-----------------------+
-| 2007-04-23 14:21:52 | 20070423142152.000000 |
+| 2007-11-30 10:41:47 | 20071130104147.000000 |
+---------------------+-----------------------+
</programlisting>
@@ -3262,11 +3294,12 @@
<para>
<literal>CURRENT_TIMESTAMP</literal> or any of its
synonyms (<literal>CURRENT_TIMESTAMP()</literal>,
- <literal>NOW()</literal>,
<literal>LOCALTIME</literal>,
- <literal>LOCALTIME()</literal>,
+ <function role="sql">NOW()</function>,
+ <literal>LOCALTIME</literal>,
+ <function role="sql">LOCALTIME()</function>,
<literal>LOCALTIMESTAMP</literal>, or
- <literal>LOCALTIMESTAMP()</literal>) can be used in the
- <literal>DEFAULT</literal> and <literal>ON
+ <function role="sql">LOCALTIMESTAMP()</function>) can be
+ used in the <literal>DEFAULT</literal> and <literal>ON
UPDATE</literal> clauses. They all mean <quote>the current
timestamp.</quote> (<literal>UTC_TIMESTAMP</literal> is
not allowed. Its range of values does not align with those
@@ -3350,7 +3383,7 @@
<listitem>
<para>
- <literal>NOW()</literal> or
+ <function role="sql">NOW()</function> or
<literal>CURRENT_TIMESTAMP</literal> is inserted into the
column
</para>
@@ -3665,7 +3698,7 @@
<para>
As the result of a function that returns a value that is
acceptable in a <literal>YEAR</literal> context, such as
- <literal>NOW()</literal>.
+ <function role="sql">NOW()</function>.
</para>
</listitem>
@@ -3808,12 +3841,13 @@
</para>
<para>
- Some functions like <literal>MIN()</literal> and
- <literal>MAX()</literal> convert a
<literal>YEAR</literal> to a
- number. This means that a value with a two-digit year does not
- work properly with these functions. The fix in this case is to
- convert the <literal>TIMESTAMP</literal> or
- <literal>YEAR</literal> to four-digit year format.
+ Some functions like <function role="sql">MIN()</function> and
+ <function role="sql">MAX()</function> convert a
+ <literal>YEAR</literal> to a number. This means that a value
+ with a two-digit year does not work properly with these
+ functions. The fix in this case is to convert the
+ <literal>TIMESTAMP</literal> or <literal>YEAR</literal>
to
+ four-digit year format.
</para>
</section>
@@ -4396,8 +4430,8 @@
you want more than <literal>max_sort_length</literal> bytes
to be significant is to convert the column value into a
fixed-length object. The standard way to do this is with the
- <literal>SUBSTRING()</literal> function. For example, the
- following statement causes 2000 bytes of the
+ <function role="sql">SUBSTRING()</function> function. For
+ example, the following statement causes 2000 bytes of the
<literal>comment</literal> column to be taken into account
for sorting:
</para>
Modified: trunk/it/refman-5.1/errors-problems-core.xml
===================================================================
--- trunk/it/refman-5.1/errors-problems-core.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/errors-problems-core.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 37, Lines Added: 303, Lines Deleted: 284; 35735 bytes
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY % all.entities SYSTEM "all-entities.ent">
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<appendix id="error-handling">
@@ -25,7 +23,7 @@
list displays client program messages.
</para>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -467,8 +465,8 @@
You are using Linux and one server thread has died (dumped
core). In this case, you must kill the other
<command>mysqld</command> threads (for example, with
- <literal>kill</literal> or with the
- <literal>mysql_zap</literal> script) before you can
+ <command>kill</command> or with the
+ <command>mysql_zap</command> script) before you can
restart the MySQL server. See <xref linkend="crashing"/>.
</para>
</listitem>
@@ -778,7 +776,8 @@
Reset the password to pre-4.1 style for each user that
needs to use a pre-4.1 client program. This can be done
using the <literal>SET PASSWORD</literal> statement and
- the <literal>OLD_PASSWORD()</literal> function:
+ the <function role="sql">OLD_PASSWORD()</function>
+ function:
</para>
<programlisting>
@@ -836,8 +835,9 @@
For each account record displayed by the query, use
the <literal>Host</literal> and
<literal>User</literal> values and assign a password
- using the <literal>OLD_PASSWORD()</literal> function
- and either <literal>SET PASSWORD</literal> or
+ using the
+ <function role="sql">OLD_PASSWORD()</function>
+ function and either <literal>SET PASSWORD</literal> or
<literal>UPDATE</literal>, as described earlier.
</para>
</listitem>
@@ -981,8 +981,7 @@
with MySQL 5.1.15, its default value is 151 to improve
performance when MySQL is used with the Apache Web server.
(Previously, the default was 100.) If you need to support more
- connections, you should restart <command>mysqld</command> with
- a larger value for this variable.
+ connections, you should set a larger value for this variable.
</para>
<formalpara role="mnmas">
@@ -994,7 +993,7 @@
on dynamically configuring the
<literal>max_connections</literal> variable — avoiding
failed connection attempts. For more information, see
- <ulink url="&base-url-enterprise;advisors.html" />.
+ <ulink url="&base-url-enterprise;advisors.html"/>.
</para>
</formalpara>
@@ -1046,9 +1045,9 @@
If not, correct the query and try again. Otherwise, you can
invoke <command>mysql</command> with the
<option>--quick</option> option. This causes it to use the
- <literal>mysql_use_result()</literal> C API function to
- retrieve the result set, which places less of a load on the
- client (but more on the server).
+ <function role="capi">mysql_use_result()</function> C API
+ function to retrieve the result set, which places less of a
+ load on the client (but more on the server).
</para>
</section>
@@ -1151,10 +1150,10 @@
<para>
You got a timeout from the TCP/IP connection on the client
side. This may happen if you have been using the commands:
- <literal>mysql_options(...,
- MYSQL_OPT_READ_TIMEOUT,...)</literal> or
- <literal>mysql_options(...,
- MYSQL_OPT_WRITE_TIMEOUT,...)</literal>. In this case
+ <function role="capi">mysql_options(...,
+ MYSQL_OPT_READ_TIMEOUT,...)</function> or
+ <function role="capi">mysql_options(...,
+ MYSQL_OPT_WRITE_TIMEOUT,...)</function>. In this case
increasing the timeout may help solve the problem.
</para>
</listitem>
@@ -1194,9 +1193,9 @@
<para>
The solution to this is to either do a
- <literal>mysql_ping</literal> on the connection if there
- has been a long time since the last query (this is what
- <literal>MyODBC</literal> does) or set
+ <function role="capi">mysql_ping()</function> on the
+ connection if there has been a long time since the last
+ query (this is what <literal>MyODBC</literal> does) or set
<literal>wait_timeout</literal> on the
<command>mysqld</command> server so high that it in
practice never times out.
@@ -1485,7 +1484,8 @@
<listitem>
<para>
The client program did not call
- <literal>mysql_close()</literal> before exiting.
+ <function role="capi">mysql_close()</function> before
+ exiting.
</para>
</listitem>
@@ -1842,7 +1842,7 @@
<listitem>
<para>
- If your large table is read-only, you can use
+ If your large table is read only, you can use
<command>myisampack</command> to compress it.
<command>myisampack</command> usually compresses a
table by at least 50%, so you can have, in effect,
@@ -1977,12 +1977,14 @@
<para>
This can happen, for example, if you are using
- <literal>mysql_use_result()</literal> and try to execute a new
- query before you have called
- <literal>mysql_free_result()</literal>. It can also happen if
- you try to execute two queries that return data without
- calling <literal>mysql_use_result()</literal> or
- <literal>mysql_store_result()</literal> in between.
+ <function role="capi">mysql_use_result()</function> and try to
+ execute a new query before you have called
+ <function role="capi">mysql_free_result()</function>. It can
+ also happen if you try to execute two queries that return data
+ without calling
+ <function role="capi">mysql_use_result()</function> or
+ <function role="capi">mysql_store_result()</function> in
+ between.
</para>
</section>
@@ -2031,12 +2033,9 @@
<listitem>
<para>
- The account has an old password (eight characters long)
- and you didn't start <command>mysqld</command> with the
- <option>--old-protocol</option> option. Update the account
- in the <literal>user</literal> table to have a new
- password or restart <command>mysqld</command> with the
- <option>--old-protocol</option> option.
+ The account has an old password (eight characters long).
+ Update the account in the <literal>user</literal> table to
+ have a new password.
</para>
</listitem>
@@ -2048,10 +2047,11 @@
You have specified a password in the
<literal>user</literal> table without using the
- <literal>PASSWORD()</literal> function. Use
+ <function role="sql">PASSWORD()</function> function. Use
<command>mysql</command> to update the account in the
<literal>user</literal> table with a new password, making
- sure to use the <literal>PASSWORD()</literal> function:
+ sure to use the <function role="sql">PASSWORD()</function>
+ function:
</para>
<programlisting>
@@ -2567,98 +2567,103 @@
<para>
If you set a <literal>root</literal> password previously, but
have forgotten what it was, you can set a new password. The
- following procedure is for Windows systems. The procedure for
- Unix systems is given later in this section.
+ next two sections show procedures for Windows and Unix
+ systems, respectively.
</para>
- <para>
- The procedure under Windows:
- </para>
+ <section id="resetting-permissions-windows">
- <orderedlist>
+ <title>Resetting the Root Password on Windows Systems</title>
- <listitem>
- <para>
- Log on to your system as Administrator.
- </para>
- </listitem>
+ <para>
+ The procedure for resetting the MySQL root account's
+ password on Windows is as follows:
+ </para>
- <listitem>
- <para>
- Stop the MySQL server if it is running. For a server that
- is running as a Windows service, go to the Services
- manager:
- </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Log on to your system as Administrator.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Stop the MySQL server if it is running. For a server
+ that is running as a Windows service, go to the Services
+ manager:
+ </para>
+
<programlisting>
Start Menu -> Control Panel -> Administrative Tools -> Services
</programlisting>
- <para>
- Then find the MySQL service in the list, and stop it.
- </para>
+ <para>
+ Then find the MySQL service in the list, and stop it.
+ </para>
- <para>
- If your server is not running as a service, you may need
- to use the Task Manager to force it to stop.
- </para>
- </listitem>
+ <para>
+ If your server is not running as a service, you may need
+ to use the Task Manager to force it to stop.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Create a text file and place the following command within
- it on a single line:
- </para>
+ <listitem>
+ <para>
+ Create a text file and place the following command
+ within it on a single line:
+ </para>
<programlisting>
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
</programlisting>
- <para>
- Save the file with any name. For this example the file
- will be <filename>C:\mysql-init.txt</filename>.
- </para>
- </listitem>
+ <para>
+ Save the file with any name. For this example the file
+ will be <filename>C:\mysql-init.txt</filename>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Open a console window to get to the DOS command prompt:
- </para>
+ <listitem>
+ <para>
+ Open a console window to get to the DOS command prompt:
+ </para>
<programlisting>
Start Menu -> Run -> cmd
</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- We are assuming that you installed MySQL to
- <filename>C:\mysql</filename>. If you installed MySQL to
- another location, adjust the following commands
- accordingly.
- </para>
+ <listitem>
+ <para>
+ We are assuming that you installed MySQL to
+ <filename>C:\mysql</filename>. If you installed MySQL to
+ another location, adjust the following commands
+ accordingly.
+ </para>
- <para>
- At the DOS command prompt, execute this command:
- </para>
+ <para>
+ At the DOS command prompt, execute this command:
+ </para>
<programlisting>
C:\> <userinput>C:\mysql\bin\mysqld
--init-file=C:\mysql-init.txt</userinput>
</programlisting>
- <para>
- The contents of the file named by the
- <option>--init-file</option> option are executed at server
- startup, changing the <literal>root</literal> password.
- After the server has started successfully, you should
- delete <filename>C:\mysql-init.txt</filename>.
- </para>
+ <para>
+ The contents of the file named by the
+ <option>--init-file</option> option are executed at
+ server startup, changing the <literal>root</literal>
+ password. After the server has started successfully, you
+ should delete <filename>C:\mysql-init.txt</filename>.
+ </para>
- <para>
- If you install MySQL using the MySQL Installation Wizard,
- you may need to specify a <option>--defaults-file</option>
- option:
- </para>
+ <para>
+ If you install MySQL using the MySQL Installation
+ Wizard, you may need to specify a
+ <option>--defaults-file</option> option:
+ </para>
<programlisting>
C:\> <userinput>"C:\Program Files\MySQL\MySQL Server
¤t-series;\bin\mysqld.exe"</userinput>
@@ -2666,176 +2671,182 @@
<userinput>--init-file=C:\mysql-init.txt</userinput>
</programlisting>
- <para>
- The appropriate <option>--defaults-file</option> setting
- can be found using the Services Manager:
- </para>
+ <para>
+ The appropriate <option>--defaults-file</option> setting
+ can be found using the Services Manager:
+ </para>
<programlisting>
Start Menu -> Control Panel -> Administrative Tools -> Services
</programlisting>
- <para>
- Find the MySQL service in the list, right-click on it, and
- choose the <literal>Properties</literal> option. The
- <literal>Path to executable</literal> field contains the
- <option>--defaults-file</option> setting.
- </para>
- </listitem>
+ <para>
+ Find the MySQL service in the list, right-click on it,
+ and choose the <literal>Properties</literal> option. The
+ <literal>Path to executable</literal> field contains the
+ <option>--defaults-file</option> setting.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Stop the MySQL server, then restart it in normal mode
- again. If you run the server as a service, start it from
- the Windows Services window. If you start the server
- manually, use whatever command you normally use.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Stop the MySQL server, then restart it in normal mode
+ again. If you run the server as a service, start it from
+ the Windows Services window. If you start the server
+ manually, use whatever command you normally use.
+ </para>
+ </listitem>
- <listitem>
- <para>
- You should be able to connect using the new password.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ You should be able to connect using the new password.
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- In a Unix environment, the procedure for resetting the
- <literal>root</literal> password is as follows:
- </para>
+ </section>
- <formalpara role ="mnmas">
+ <section id="resetting-permissions-unix">
- <title>MySQL Enterprise</title>
+ <title>Resetting the Root Password on Unix Systems</title>
+ <formalpara role="mnmas">
+
+ <title>MySQL Enterprise</title>
+
+ <para>
+ For expert advice on security-related issues, subscribe to
+ the MySQL Enterprise Monitor. For more information, see
+ <ulink url="&base-url-enterprise;advisors.html"/>.
+ </para>
+
+ </formalpara>
+
<para>
- For expert advice on security-related issues, subscribe to
- the MySQL Enterprise Monitor. For more information, see
- <ulink url="&base-url-enterprise;advisors.html"/>.
+ In a Unix environment, the procedure for resetting the MySQL
+ <literal>root</literal> password is as follows:
</para>
- </formalpara>
+ <orderedlist>
- <orderedlist>
+ <listitem>
+ <para>
+ Log on to your system as either the Unix
+ <literal>root</literal> user or as the same user that
+ the <command>mysqld</command> server runs as.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Log on to your system as either the Unix
- <literal>root</literal> user or as the same user that the
- <command>mysqld</command> server runs as.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Locate the <filename>.pid</filename> file that contains
+ the server's process ID. The exact location and name of
+ this file depend on your distribution, hostname, and
+ configuration. Common locations are
+ <filename>/var/lib/mysql/</filename>,
+ <filename>/var/run/mysqld/</filename>, and
+ <filename>/usr/local/mysql/data/</filename>. Generally,
+ the filename has the extension of
+ <filename>.pid</filename> and begins with either
+ <filename>mysqld</filename> or your system's hostname.
+ </para>
- <listitem>
- <para>
- Locate the <filename>.pid</filename> file that contains
- the server's process ID. The exact location and name of
- this file depend on your distribution, hostname, and
- configuration. Common locations are
- <filename>/var/lib/mysql/</filename>,
- <filename>/var/run/mysqld/</filename>, and
- <filename>/usr/local/mysql/data/</filename>. Generally,
- the filename has the extension of
- <filename>.pid</filename> and begins with either
- <filename>mysqld</filename> or your system's hostname.
- </para>
+ <para>
+ You can stop the MySQL server by sending a normal
+ <literal>kill</literal> (not <literal>kill
-9</literal>)
+ to the <command>mysqld</command> process, using the
+ pathname of the <filename>.pid</filename> file in the
+ following command:
+ </para>
- <para>
- You can stop the MySQL server by sending a normal
- <literal>kill</literal> (not <literal>kill
-9</literal>)
- to the <command>mysqld</command> process, using the
- pathname of the <filename>.pid</filename> file in the
- following command:
- </para>
-
<programlisting>
shell> <userinput>kill `cat
/mysql-data-directory/host_name.pid`</userinput>
</programlisting>
- <para>
- Note the use of backticks rather than forward quotes with
- the <literal>cat</literal> command; these cause the output
- of <literal>cat</literal> to be substituted into the
- <literal>kill</literal> command.
- </para>
- </listitem>
+ <para>
+ Note the use of backticks rather than forward quotes
+ with the <literal>cat</literal> command; these cause the
+ output of <literal>cat</literal> to be substituted into
+ the <literal>kill</literal> command.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Create a text file and place the following command within
- it on a single line:
- </para>
+ <listitem>
+ <para>
+ Create a text file and place the following command
+ within it on a single line:
+ </para>
<programlisting>
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
</programlisting>
- <para>
- Save the file with any name. For this example the file
- will be <filename>~/mysql-init</filename>.
- </para>
- </listitem>
+ <para>
+ Save the file with any name. For this example the file
+ will be <filename>~/mysql-init</filename>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Restart the MySQL server with the special
- <option>--init-file=~/mysql-init</option> option:
- </para>
+ <listitem>
+ <para>
+ Restart the MySQL server with the special
+ <option>--init-file=~/mysql-init</option> option:
+ </para>
<programlisting>
shell> <userinput>mysqld_safe --init-file=~/mysql-init
&</userinput>
</programlisting>
- <para>
- The contents of the init-file are executed at server
- startup, changing the root password. After the server has
- started successfully you should delete
- <filename>~/mysql-init</filename>.
- </para>
- </listitem>
+ <para>
+ The contents of the init-file are executed at server
+ startup, changing the root password. After the server
+ has started successfully you should delete
+ <filename>~/mysql-init</filename>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- You should be able to connect using the new password.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ You should be able to connect using the new password.
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- Alternatively, on any platform, you can set the new password
- using the <command>mysql</command> client(but this approach is
- less secure):
- </para>
+ <para>
+ Alternatively, on any platform, you can set the new password
+ using the <command>mysql</command> client(but this approach
+ is less secure):
+ </para>
- <orderedlist>
+ <orderedlist>
- <listitem>
- <para>
- Stop <command>mysqld</command> and restart it with the
- <option>--skip-grant-tables --user=root</option> options
- (Windows users omit the <option>--user=root</option>
- portion).
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Stop <command>mysqld</command> and restart it with the
+ <option>--skip-grant-tables --user=root</option> options
+ (Windows users omit the <option>--user=root</option>
+ portion).
+ </para>
+ </listitem>
- <listitem>
- <para>
- Connect to the <command>mysqld</command> server with this
- command:
- </para>
+ <listitem>
+ <para>
+ Connect to the <command>mysqld</command> server with
+ this command:
+ </para>
<programlisting>
shell> <userinput>mysql -u root</userinput>
</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Issue the following statements in the
- <command>mysql</command> client:
- </para>
+ <listitem>
+ <para>
+ Issue the following statements in the
+ <command>mysql</command> client:
+ </para>
<programlisting>
mysql> <userinput>UPDATE mysql.user SET
Password=PASSWORD('<replaceable>newpwd</replaceable>')</userinput>
@@ -2843,21 +2854,23 @@
mysql> <userinput>FLUSH PRIVILEGES;</userinput>
</programlisting>
- <para>
- Replace
<quote><replaceable>newpwd</replaceable></quote>
- with the actual <literal>root</literal> password that you
- want to use.
- </para>
- </listitem>
+ <para>
+ Replace
<quote><replaceable>newpwd</replaceable></quote>
+ with the actual <literal>root</literal> password that
+ you want to use.
+ </para>
+ </listitem>
- <listitem>
- <para>
- You should be able to connect using the new password.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ You should be able to connect using the new password.
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
+ </section>
+
</section>
<section id="crashing">
@@ -3304,7 +3317,7 @@
TABLE</literal>, the old table is left unchanged.
</para>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -3424,13 +3437,13 @@
<title>How to Protect or Change the MySQL Unix Socket File</title>
<indexterm>
- <primary><literal>mysql.sock</literal></primary>
+ <primary>mysql.sock</primary>
<secondary>protection</secondary>
</indexterm>
<indexterm>
<primary>deletion</primary>
- <secondary><literal>mysql.sock</literal></secondary>
+ <secondary>mysql.sock</secondary>
</indexterm>
<para>
@@ -3673,7 +3686,7 @@
<indexterm>
<primary>problems</primary>
- <secondary><literal>DATE</literal> columns</secondary>
+ <secondary>DATE columns</secondary>
</indexterm>
<para>
@@ -3739,7 +3752,7 @@
<para>
When you use any other comparison method than those just
listed, such as <literal>IN</literal> or
- <literal>STRCMP()</literal>.
+ <function role="sql">STRCMP()</function>.
</para>
</listitem>
@@ -3794,8 +3807,8 @@
</programlisting>
<para>
- <literal>STRCMP()</literal> is a string function, so it
- converts <literal>idate</literal> to a string in
+ <function role="sql">STRCMP()</function> is a string function,
+ so it converts <literal>idate</literal> to a string in
<literal>'YYYY-MM-DD'</literal> format and performs a string
comparison. It does not convert <literal>'20030505'</literal>
to the date <literal>'2003-05-05'</literal> and perform a date
@@ -3857,7 +3870,7 @@
<title>Problems with <literal>NULL</literal>
Values</title>
<indexterm>
- <primary><literal>NULL</literal> values</primary>
+ <primary>NULL values</primary>
<secondary>vs. empty values</secondary>
</indexterm>
@@ -3890,8 +3903,9 @@
<para>
To help with <literal>NULL</literal> handling, you can use the
- <literal>IS NULL</literal> and <literal>IS NOT
NULL</literal>
- operators and the <literal>IFNULL()</literal> function.
+ <function role="sqlop">IS NULL</function> and
+ <function role="sqlop">IS NOT NULL</function> operators and
+ the <function role="sql">IFNULL()</function> function.
</para>
<para>
@@ -3922,9 +3936,9 @@
<para>
To look for <literal>NULL</literal> values, you must use the
- <literal>IS NULL</literal> test. The following statements show
- how to find the <literal>NULL</literal> phone number and the
- empty phone number:
+ <function role="sqlop">IS NULL</function> test. The following
+ statements show how to find the <literal>NULL</literal> phone
+ number and the empty phone number:
</para>
<programlisting>
@@ -3975,14 +3989,16 @@
<para>
Aggregate (summary) functions such as
- <literal>COUNT()</literal>, <literal>MIN()</literal>,
and
- <literal>SUM()</literal> ignore <literal>NULL</literal>
- values. The exception to this is <literal>COUNT(*)</literal>,
- which counts rows and not individual column values. For
- example, the following statement produces two counts. The
- first is a count of the number of rows in the table, and the
- second is a count of the number of non-<literal>NULL</literal>
- values in the <literal>age</literal> column:
+ <function role="sql">COUNT()</function>,
+ <function role="sql">MIN()</function>, and
+ <function role="sql">SUM()</function> ignore
+ <literal>NULL</literal> values. The exception to this is
+ <function role="sql">COUNT(*)</function>, which counts rows
+ and not individual column values. For example, the following
+ statement produces two counts. The first is a count of the
+ number of rows in the table, and the second is a count of the
+ number of non-<literal>NULL</literal> values in the
+ <literal>age</literal> column:
</para>
<programlisting>
@@ -3990,23 +4006,23 @@
</programlisting>
<indexterm>
- <primary><literal>TIMESTAMP</literal></primary>
- <secondary>and <literal>NULL</literal>
values</secondary>
+ <primary>TIMESTAMP</primary>
+ <secondary>and NULL values</secondary>
</indexterm>
<indexterm>
- <primary><literal>AUTO_INCREMENT</literal></primary>
- <secondary>and <literal>NULL</literal>
values</secondary>
+ <primary>AUTO_INCREMENT</primary>
+ <secondary>and NULL values</secondary>
</indexterm>
<indexterm>
- <primary><literal>NULL</literal> values</primary>
- <secondary>and <literal>TIMESTAMP</literal>
columns</secondary>
+ <primary>NULL values</primary>
+ <secondary>and TIMESTAMP columns</secondary>
</indexterm>
<indexterm>
- <primary><literal>NULL</literal> values</primary>
- <secondary>and <literal>AUTO_INCREMENT</literal>
columns</secondary>
+ <primary>NULL values</primary>
+ <secondary>and AUTO_INCREMENT columns</secondary>
</indexterm>
<para>
@@ -4014,8 +4030,9 @@
values specially. If you insert <literal>NULL</literal> into a
<literal>TIMESTAMP</literal> column, the current date and time
is inserted. If you insert <literal>NULL</literal> into an
- integer column that has the <literal>AUTO_INCREMENT</literal>
- attribute, the next number in the sequence is inserted.
+ integer or floating-point column that has the
+ <literal>AUTO_INCREMENT</literal> attribute, the next number
+ in the sequence is inserted.
</para>
</section>
@@ -4145,7 +4162,7 @@
<xref linkend="show-variables"/>.
</para>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -4498,7 +4515,7 @@
</itemizedlist>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -4886,8 +4903,9 @@
<literal>lower_case_table_names=2</literal> (which enables
MySQL to remember the case used for databases and table
names), MySQL does not remember the case used for database
- names for the function <literal>DATABASE()</literal> or
- within the various logs (on case-insensitive systems).
+ names for the function
+ <function role="sql">DATABASE()</function> or within the
+ various logs (on case-insensitive systems).
</para>
</listitem>
@@ -4911,8 +4929,8 @@
<para>
<literal>DISTINCT</literal> with <literal>ORDER
BY</literal> doesn't work inside
- <literal>GROUP_CONCAT()</literal> if you don't use all and
- only those columns that are in the
+ <function role="sql">GROUP_CONCAT()</function> if you
+ don't use all and only those columns that are in the
<literal>DISTINCT</literal> list.
</para>
</listitem>
@@ -5181,12 +5199,12 @@
depends on the function. The general rule is that bit
functions are performed with <literal>BIGINT</literal>
precision, <literal>IF</literal> and
- <literal>ELT()</literal> with
<literal>BIGINT</literal> or
- <literal>DOUBLE</literal> precision, and the rest with
- <literal>DOUBLE</literal> precision. You should try to
- avoid using unsigned long long values if they resolve to
- be larger than 63 bits (9223372036854775807) for anything
- other than bit fields.
+ <function role="sql">ELT()</function> with
+ <literal>BIGINT</literal> or
<literal>DOUBLE</literal>
+ precision, and the rest with <literal>DOUBLE</literal>
+ precision. You should try to avoid using unsigned long
+ long values if they resolve to be larger than 63 bits
+ (9223372036854775807) for anything other than bit fields.
</para>
</listitem>
@@ -5199,8 +5217,9 @@
<listitem>
<para>
- In <literal>MIN()</literal>,
<literal>MAX()</literal>, and
- other aggregate functions, MySQL currently compares
+ In <function role="sql">MIN()</function>,
+ <function role="sql">MAX()</function>, and other aggregate
+ functions, MySQL currently compares
<literal>ENUM</literal> and <literal>SET</literal>
columns
by their string value rather than by the string's relative
position in the set.
@@ -5437,7 +5456,7 @@
Include list of server error messages:
</remark>
- <xi:include href="errmsgs-server.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="errmsgs-server.xml"/>
</section>
@@ -5480,7 +5499,7 @@
Include list of client error messages:
</remark>
- <xi:include href="errmsgs-client.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="errmsgs-client.xml"/>
</section>
Modified: trunk/it/refman-5.1/events.xml
===================================================================
--- trunk/it/refman-5.1/events.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/events.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 14, Lines Added: 23, Lines Deleted: 24; 6041 bytes
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY % all.entities SYSTEM "all-entities.ent">
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<chapter id="events">
@@ -264,7 +262,7 @@
<indexterm>
<primary>Event Scheduler</primary>
- <secondary>and <literal>SHOW
PROCESSLIST</literal></secondary>
+ <secondary>and SHOW PROCESSLIST</secondary>
</indexterm>
<para>
@@ -500,7 +498,7 @@
<para>
MySQL 5.1.6 and later provides an <literal>EVENTS</literal> table
in the <literal>INFORMATION_SCHEMA</literal> database. This table
- can be queried to obtian information about scheduled events which
+ can be queried to obtain information about scheduled events which
have been defined on the server. See
<xref linkend="events-metadata"/>, and
<xref linkend="events-table"/>, for more information.
@@ -584,7 +582,7 @@
</indexterm>
<indexterm>
- <primary><literal>ALTER EVENT</literal></primary>
+ <primary>ALTER EVENT</primary>
</indexterm>
<remark role="help-topic" condition="ALTER EVENT"/>
@@ -601,8 +599,8 @@
[DEFINER = { <replaceable>user</replaceable> | CURRENT_USER }]
<replaceable>event_name</replaceable>
[ON SCHEDULE <replaceable>schedule</replaceable>]
- [RENAME TO <replaceable>new_event_name</replaceable>]
[ON COMPLETION [NOT] PRESERVE]
+ [RENAME TO <replaceable>new_event_name</replaceable>]
[ENABLE | DISABLE | DISABLE ON SLAVE]
[COMMENT '<replaceable>comment</replaceable>']
[DO <replaceable>sql_statement</replaceable>]
@@ -811,7 +809,7 @@
</indexterm>
<indexterm>
- <primary><literal>CREATE EVENT</literal></primary>
+ <primary>CREATE EVENT</primary>
</indexterm>
<remark role="help-topic" condition="CREATE EVENT"/>
@@ -954,8 +952,9 @@
format (the same format used in the <literal>GRANT</literal>
statement). The <replaceable>user_name</replaceable> and
<replaceable>host_name</replaceable> values both are required.
- <literal>CURRENT_USER</literal> also can be given as
- <literal>CURRENT_USER()</literal>. The default
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ also can be given as
+ <function role="sql">CURRENT_USER()</function>. The default
<literal>DEFINER</literal> value is the user who executes the
<literal>CREATE TRIGGER</literal> statement. (This is the same
as <literal>DEFINER = CURRENT_USER</literal>.)
@@ -1360,7 +1359,7 @@
<title><literal>DROP EVENT</literal> Syntax</title>
<indexterm>
- <primary><literal>DROP EVENT</literal></primary>
+ <primary>DROP EVENT</primary>
</indexterm>
<indexterm>
@@ -1485,7 +1484,7 @@
<indexterm>
<primary>Event Scheduler</primary>
- <secondary>and <command>mysqladmin
debug</command></secondary>
+ <secondary>and mysqladmin debug</secondary>
</indexterm>
<para>
@@ -1666,8 +1665,8 @@
</programlisting>
<indexterm>
- <primary><literal>EVENTS</literal></primary>
- <secondary><literal>INFORMATION_SCHEMA</literal>
table</secondary>
+ <primary>EVENTS</primary>
+ <secondary>INFORMATION_SCHEMA table</secondary>
</indexterm>
<para>
@@ -1792,7 +1791,7 @@
</para>
<indexterm>
- <primary><literal>mysql.event</literal> table</primary>
+ <primary>mysql.event table</primary>
</indexterm>
<para>
@@ -2008,9 +2007,9 @@
non-zero length of time is required to create events and to
signal their execution — events may be delayed by as much
as 1 or 2 seconds. However, the time shown in the
- <literal>INFORMATION_SCHEMA.EVENTS</literal> table's
+ <literal>INFORMATION_SCHEMA.EVENTS</literal> table's
<literal>LAST_EXECUTED</literal> column or the
- <literal>mysql.event</literal> table's
+ <literal>mysql.event</literal> table's
<literal>last_executed</literal> column is always accurate to
within one second of the time the event was actually executed.
(See also Bug #16522.)
@@ -2025,8 +2024,8 @@
<para>
Each execution of the statements contained in the body of an
event takes place in a new connection; thus, these statements
- has no effect in a given user session on the server's
- statement counts such as <literal>Com_select</literal> and
+ has no effect in a given user session on the server's statement
+ counts such as <literal>Com_select</literal> and
<literal>Com_insert</literal> that are displayed by
<literal>SHOW STATUS</literal>. However, such counts
<emphasis>are</emphasis> updated in the global scope. (Bug
@@ -2040,10 +2039,10 @@
<title>Visibility of events belonging to other users</title>
<para>
- Prior to MySQL 5.1.12, you could not view another user's
- events in the <literal>INFORMATION_SCHEMA.EVENTS</literal>
- table. In other words, any query made against this table was
- treated as though it contained the condition <literal>DEFINER =
+ Prior to MySQL 5.1.12, you could not view another user's events
+ in the <literal>INFORMATION_SCHEMA.EVENTS</literal> table. In
+ other words, any query made against this table was treated as
+ though it contained the condition <literal>DEFINER =
CURRENT_USER()</literal> in the <literal>WHERE</literal>
clause.
</para>
Modified: trunk/it/refman-5.1/internationalization.xml
===================================================================
--- trunk/it/refman-5.1/internationalization.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/internationalization.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 24, Lines Added: 142, Lines Deleted: 100; 19819 bytes
@@ -766,8 +766,10 @@
Every <quote>character</quote> column (that is, a column of
type <literal>CHAR</literal>,
<literal>VARCHAR</literal>, or
<literal>TEXT</literal>) has a column character set and a
- column collation. Column definition syntax has optional
- clauses for specifying the column character set and collation:
+ column collation. Column definition syntax for <literal>CREATE
+ TABLE</literal> and <literal>ALTER TABLE</literal> has
+ optional clauses for specifying the column character set and
+ collation:
</para>
<programlisting>
@@ -776,7 +778,7 @@
</programlisting>
<para>
- Example:
+ Examples:
</para>
<programlisting>
@@ -784,9 +786,19 @@
(
column1 VARCHAR(5) CHARACTER SET latin1 COLLATE latin1_german1_ci
);
+
+ALTER TABLE Table1 MODIFY
+ column1 VARCHAR(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci;
</programlisting>
<para>
+ If you convert a column from one character set to another,
+ <literal>ALTER TABLE</literal> attempts to map the data
+ values, but if the character sets are incompatible, there may
+ be data loss.
+ </para>
+
+ <para>
MySQL chooses the column character set and collation in the
following manner:
</para>
@@ -893,10 +905,11 @@
<replaceable>X</replaceable>.</quote> Because this has
confused people in the past, we emphasize that an introducer
does not change the string to the introducer character set
- like <literal>CONVERT()</literal> would do. It does not change
- the string's value, although padding may occur. The introducer
- is just a signal. An introducer is also legal before standard
- hex literal and numeric hex literal notation
+ like <function role="sql">CONVERT()</function> would do. It
+ does not change the string's value, although padding may
+ occur. The introducer is just a signal. An introducer is also
+ legal before standard hex literal and numeric hex literal
+ notation
(<literal>x'<replaceable>literal</replaceable>'</literal> and
<literal>0x<replaceable>nnnn</replaceable></literal>).
</para>
@@ -1009,8 +1022,9 @@
NAMES</literal> (which changes
<literal>character_set_connection</literal>, as discussed in
<xref linkend="charset-connection"/>), and display the
- resulting strings using the <literal>HEX()</literal> function
- so that the exact string contents can be seen.
+ resulting strings using the
+ <function role="sql">HEX()</function> function so that the
+ exact string contents can be seen.
</para>
<para>
@@ -1670,8 +1684,9 @@
<para>
The <literal>COLLATE</literal> clause has high precedence
- (higher than <literal>||</literal>), so the following two
- expressions are equivalent:
+ (higher than
+ <function role="sqlop" condition="operator_or">||</function>),
+ so the following two expressions are equivalent:
</para>
<programlisting>
@@ -1706,8 +1721,9 @@
<para>
<literal>BINARY
<replaceable>str</replaceable></literal> is
- shorthand for <literal>CAST(<replaceable>str</replaceable> AS
- BINARY)</literal>.
+ shorthand for
+ <function role="sql">CAST(<replaceable>str</replaceable> AS
+ BINARY)</function>.
</para>
<para>
@@ -1829,8 +1845,9 @@
<listitem>
<para>
A <quote>system constant</quote> (the string returned by
- functions such as <literal>USER()</literal> or
- <literal>VERSION()</literal>) has a coercibility of 3.
+ functions such as <function role="sql">USER()</function>
+ or <function role="sql">VERSION()</function>) has a
+ coercibility of 3.
</para>
</listitem>
@@ -1946,8 +1963,9 @@
</informaltable>
<para>
- The <literal>COERCIBILITY()</literal> function can be used to
- determine the coercibility of a string expression:
+ The <function role="sql">COERCIBILITY()</function> function
+ can be used to determine the coercibility of a string
+ expression:
</para>
<programlisting>
@@ -2292,7 +2310,7 @@
<para>
Functions with one string argument inherit the repertoire of
their argument. The result of
-
<literal>UPPER(_utf8'<replaceable>abc</replaceable>')</literal>
+ <function
role="sql">UPPER(_utf8'<replaceable>abc</replaceable>')</function>
has <literal>ASCII</literal> repertoire, because its
argument has <literal>ASCII</literal> repertoire.
</para>
@@ -2354,7 +2372,7 @@
<quote>widest</quote> argument repertoire for the result
repertoire (<literal>UNICODE</literal> is wider than
<literal>ASCII</literal>). Consider the following
- <literal>CONCAT()</literal> calls:
+ <function role="sql">CONCAT()</function> calls:
</para>
<programlisting>
@@ -2424,32 +2442,40 @@
string result as output, the output's character set and
collation are the same as those of the principal input value.
For example,
- <literal>UPPER(<replaceable>X</replaceable>)</literal>
returns
- a string whose character string and collation are the same as
- that of <replaceable>X</replaceable>. The same applies for
- <literal>INSTR()</literal>, <literal>LCASE()</literal>,
- <literal>LOWER()</literal>, <literal>LTRIM()</literal>,
- <literal>MID()</literal>, <literal>REPEAT()</literal>,
- <literal>REPLACE()</literal>,
<literal>REVERSE()</literal>,
- <literal>RIGHT()</literal>, <literal>RPAD()</literal>,
- <literal>RTRIM()</literal>,
<literal>SOUNDEX()</literal>,
- <literal>SUBSTRING()</literal>,
<literal>TRIM()</literal>,
- <literal>UCASE()</literal>, and
<literal>UPPER()</literal>.
+ <function
role="sql">UPPER(<replaceable>X</replaceable>)</function>
+ returns a string whose character string and collation are the
+ same as that of <replaceable>X</replaceable>. The same applies
+ for <function role="sql">INSTR()</function>,
+ <function role="sql">LCASE()</function>,
+ <function role="sql">LOWER()</function>,
+ <function role="sql">LTRIM()</function>,
+ <function role="sql">MID()</function>,
+ <function role="sql">REPEAT()</function>,
+ <function role="sql">REPLACE()</function>,
+ <function role="sql">REVERSE()</function>,
+ <function role="sql">RIGHT()</function>,
+ <function role="sql">RPAD()</function>,
+ <function role="sql">RTRIM()</function>,
+ <function role="sql">SOUNDEX()</function>,
+ <function role="sql">SUBSTRING()</function>,
+ <function role="sql">TRIM()</function>,
+ <function role="sql">UCASE()</function>, and
+ <function role="sql">UPPER()</function>.
</para>
<para>
- Note: The <literal>REPLACE()</literal> function, unlike all
- other functions, always ignores the collation of the string
- input and performs a case-sensitive comparison.
+ Note: The <function role="sql">REPLACE()</function> function,
+ unlike all other functions, always ignores the collation of
+ the string input and performs a case-sensitive comparison.
</para>
<para>
If a string input or function result is a binary string, the
string has no character set or collation. This can be checked
- by using the <literal>CHARSET()</literal> and
- <literal>COLLATION()</literal> functions, both of which return
- <literal>binary</literal> to indicate that their argument is a
- binary string:
+ by using the <function role="sql">CHARSET()</function> and
+ <function role="sql">COLLATION()</function> functions, both of
+ which return <literal>binary</literal> to indicate that their
+ argument is a binary string:
</para>
<programlisting>
@@ -2507,10 +2533,13 @@
For example, with <literal>CASE ... WHEN a THEN b WHEN b THEN
c COLLATE <replaceable>X</replaceable> END</literal>, the
resulting collation is <replaceable>X</replaceable>. The same
- applies for <literal>UNION</literal>,
<literal>||</literal>,
- <literal>CONCAT()</literal>, <literal>ELT()</literal>,
- <literal>GREATEST()</literal>, <literal>IF()</literal>,
and
- <literal>LEAST()</literal>.
+ applies for <literal>UNION</literal>,
+ <function role="sqlop" condition="operator_or">||</function>,
+ <function role="sql">CONCAT()</function>,
+ <function role="sql">ELT()</function>,
+ <function role="sql">GREATEST()</function>,
+ <function role="sql">IF()</function>, and
+ <function role="sql">LEAST()</function>.
</para>
<para>
@@ -2519,16 +2548,19 @@
operations are defined by the
<literal>character_set_connection</literal> and
<literal>collation_connection</literal> system variables. This
- applies only to <literal>CAST()</literal>,
- <literal>CONV()</literal>, <literal>FORMAT()</literal>,
- <literal>HEX()</literal>, and
<literal>SPACE()</literal>.
+ applies only to <function role="sql">CAST()</function>,
+ <function role="sql">CONV()</function>,
+ <function role="sql">FORMAT()</function>,
+ <function role="sql">HEX()</function>, and
+ <function role="sql">SPACE()</function>.
</para>
<para>
If you are uncertain about the character set or collation of
the result returned by a string function, you can use the
- <literal>CHARSET()</literal> or
<literal>COLLATE()</literal>
- function to find out:
+ <function role="sql">CHARSET()</function> or
+ <function role="sql">COLLATION()</function> function to find
+ out:
</para>
<programlisting>
@@ -2544,11 +2576,12 @@
<section id="charset-convert">
- <title><literal>CONVERT()</literal> and
<literal>CAST()</literal></title>
+ <title><function role="sql">CONVERT()</function> and
+ <function role="sql">CAST()</function></title>
<para>
- <literal>CONVERT()</literal> provides a way to convert data
- between different character sets. The syntax is:
+ <function role="sql">CONVERT()</function> provides a way to
+ convert data between different character sets. The syntax is:
</para>
<programlisting>
@@ -2571,13 +2604,13 @@
</programlisting>
<para>
- <literal>CONVERT(... USING ...)</literal> is implemented
- according to the standard SQL specification.
+ <function role="sql">CONVERT(... USING ...)</function> is
+ implemented according to the standard SQL specification.
</para>
<para>
- You may also use <literal>CAST()</literal> to convert a string
- to a different character set. The syntax is:
+ You may also use <function role="sql">CAST()</function> to
+ convert a string to a different character set. The syntax is:
</para>
<programlisting>
@@ -2593,22 +2626,23 @@
</programlisting>
<para>
- If you use <literal>CAST()</literal> without specifying
- <literal>CHARACTER SET</literal>, the resulting character set
- and collation are defined by the
+ If you use <function role="sql">CAST()</function> without
+ specifying <literal>CHARACTER SET</literal>, the resulting
+ character set and collation are defined by the
<literal>character_set_connection</literal> and
<literal>collation_connection</literal> system variables. If
- you use <literal>CAST()</literal> with <literal>CHARACTER SET
- X</literal>, the resulting character set and collation are
- <literal>X</literal> and the default collation of
- <literal>X</literal>.
+ you use <function role="sql">CAST()</function> with
+ <literal>CHARACTER SET X</literal>, the resulting character
+ set and collation are <literal>X</literal> and the default
+ collation of <literal>X</literal>.
</para>
<para>
You may not use a <literal>COLLATE</literal> clause inside a
- <literal>CAST()</literal>, but you may use it outside. That
- is, <literal>CAST(... COLLATE ...)</literal> is illegal, but
- <literal>CAST(...) COLLATE ...</literal> is legal.
+ <function role="sql">CAST()</function>, but you may use it
+ outside. That is, <function role="sql">CAST(... COLLATE
+ ...)</function> is illegal, but <function role="sql">CAST(...)
+ COLLATE ...</function> is legal.
</para>
<para>
@@ -2931,11 +2965,13 @@
<para>
The metadata requirements mean that the return values of the
- <literal>USER()</literal>,
<literal>CURRENT_USER()</literal>,
- <literal>SESSION_USER()</literal>,
- <literal>SYSTEM_USER()</literal>,
<literal>DATABASE()</literal>,
- and <literal>VERSION()</literal> functions have the UTF-8
- character set by default.
+ <function role="sql">USER()</function>,
+ <function role="sql">CURRENT_USER()</function>,
+ <function role="sql">SESSION_USER()</function>,
+ <function role="sql">SYSTEM_USER()</function>,
+ <function role="sql">DATABASE()</function>, and
+ <function role="sql">VERSION()</function> functions have the
+ UTF-8 character set by default.
</para>
<para>
@@ -2989,9 +3025,10 @@
</para>
<para>
- If you are using (for example) the <literal>USER()</literal>
- function for comparison or assignment within a single statement,
- don't worry. MySQL performs some automatic conversion for you.
+ If you are using (for example) the
+ <function role="sql">USER()</function> function for comparison
+ or assignment within a single statement, don't worry. MySQL
+ performs some automatic conversion for you.
</para>
<programlisting>
@@ -3009,10 +3046,11 @@
</programlisting>
<para>
- This works because the contents of <literal>USER()</literal> are
- automatically converted to <literal>latin1</literal> before the
- assignment. Automatic conversion is not fully implemented yet,
- but should work correctly in a later version.
+ This works because the contents of
+ <function role="sql">USER()</function> are automatically
+ converted to <literal>latin1</literal> before the assignment.
+ Automatic conversion is not fully implemented yet, but should
+ work correctly in a later version.
</para>
<para>
@@ -3560,25 +3598,27 @@
</remark>
<para>
- The most significant feature in
- <literal>utf8_unicode_ci</literal> is that it supports
- expansions; that is, when one character compares as equal to
- combinations of other characters. For example, in German and
- some other languages
<quote><literal>ß</literal></quote> is
- equal to <quote><literal>ss</literal></quote>.
+ For any Unicode character set, operations performed using the
+ <literal>_general_ci</literal> collation are faster than those
+ for the <literal>_unicode_ci</literal> collation. For example,
+ comparisons for the <literal>utf8_general_ci</literal>
+ collation are faster, but slightly less correct, than
+ comparisons for <literal>utf8_unicode_ci</literal>. The reason
+ for this is that <literal>utf8_unicode_ci</literal> supports
+ mappings such as expansions; that is, when one character
+ compares as equal to combinations of other characters. For
+ example, in German and some other languages
+ <quote><literal>ß</literal></quote> is equal to
+ <quote><literal>ss</literal></quote>.
+ <literal>utf8_unicode_ci</literal> also supports contractions
+ and ignorable characters. <literal>utf8_general_ci</literal>
+ is a legacy collation that does not support expansions,
+ contractions, or ignorable characters. It can make only
+ one-to-one comparisons between characters.
</para>
<para>
- <literal>utf8_general_ci</literal> is a legacy collation that
- does not support expansions. It can make only one-to-one
- comparisons between characters. This means that comparisons
- for the <literal>utf8_general_ci</literal> collation are
- faster, but slightly less correct, than comparisons for
- <literal>utf8_unicode_ci</literal>.
- </para>
-
- <para>
- For example, the following equalities hold in both
+ To further illustrate, the following equalities hold in both
<literal>utf8_general_ci</literal> and
<literal>utf8_unicode_ci</literal> (for the effect this has in
comparisons or when doing searches, see
@@ -5938,14 +5978,15 @@
<para>
The current session time zone setting affects display and storage
of time values that are zone-sensitive. This includes the values
- displayed by functions such as <literal>NOW()</literal> or
- <literal>CURTIME()</literal>, and values stored in and retrieved
- from <literal>TIMESTAMP</literal> columns. Values for
- <literal>TIMESTAMP</literal> columns are converted from the
+ displayed by functions such as
+ <function role="sql">NOW()</function> or
+ <function role="sql">CURTIME()</function>, and values stored in
+ and retrieved from <literal>TIMESTAMP</literal> columns. Values
+ for <literal>TIMESTAMP</literal> columns are converted from the
current time zone to UTC for storage, and from UTC to the current
time zone for retrieval. The current time zone setting does not
affect values displayed by functions such as
- <literal>UTC_TIMESTAMP()</literal> or values in
+ <function role="sql">UTC_TIMESTAMP()</function> or values in
<literal>DATE</literal>, <literal>TIME</literal>, or
<literal>DATETIME</literal> columns.
</para>
@@ -6313,8 +6354,9 @@
<literal>lc_time_names</literal> system variable controls the
language used to display day and month names and abbreviations.
This variable affects the output from the
- <literal>DATE_FORMAT()</literal>,
<literal>DAYNAME()</literal> and
- <literal>MONTHNAME()</literal> functions.
+ <function role="sql">DATE_FORMAT()</function>,
+ <function role="sql">DAYNAME()</function> and
+ <function role="sql">MONTHNAME()</function> functions.
</para>
<para>
@@ -6625,8 +6667,8 @@
<para>
<literal>lc_time_names</literal> currently does not affect the
- <literal>STR_TO_DATE()</literal> or
- <literal>GET_FORMAT()</literal> function.
+ <function role="sql">STR_TO_DATE()</function> or
+ <function role="sql">GET_FORMAT()</function> function.
</para>
</section>
Modified: trunk/it/refman-5.1/triggers.xml
===================================================================
--- trunk/it/refman-5.1/triggers.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/triggers.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 4, Lines Added: 13, Lines Deleted: 4; 2000 bytes
@@ -359,8 +359,9 @@
format (the same format used in the <literal>GRANT</literal>
statement). The <replaceable>user_name</replaceable> and
<replaceable>host_name</replaceable> values both are required.
- <literal>CURRENT_USER</literal> also can be given as
- <literal>CURRENT_USER()</literal>. The default
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ also can be given as
+ <function role="sql">CURRENT_USER()</function>. The default
<literal>DEFINER</literal> value is the user who executes the
<literal>CREATE TRIGGER</literal> statement. (This is the same as
<literal>DEFINER = CURRENT_USER</literal>.)
@@ -380,8 +381,8 @@
If you do not have the <literal>SUPER</literal> privilege, the
only legal <replaceable>user</replaceable> value is your own
account, either specified literally or by using
- <literal>CURRENT_USER</literal>. You cannot set the definer to
- some other account.
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>.
+ You cannot set the definer to some other account.
</para>
</listitem>
@@ -532,6 +533,10 @@
clause was added in MySQL 5.1.14.
</para>
+ <para>
+ Triggers for a table are also dropped if you drop the table.
+ </para>
+
<remark role="help-description-end"/>
<note>
@@ -692,6 +697,10 @@
</programlisting>
<para>
+ Triggers for a table are also dropped if you drop the table.
+ </para>
+
+ <para>
Trigger names exist in the schema namespace, meaning that all
triggers must have unique names within a schema. Triggers in
different schemas can have the same name.
Modified: trunk/it/refman-5.1/tutorial.xml
===================================================================
--- trunk/it/refman-5.1/tutorial.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/tutorial.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 10, Lines Added: 47, Lines Deleted: 36; 7229 bytes
@@ -1397,8 +1397,9 @@
</programlisting>
<para>
- The preceding query uses the <literal>AND</literal> logical
- operator. There is also an <literal>OR</literal> operator:
+ The preceding query uses the
+ <function role="sqlop">AND</function> logical operator. There
+ is also an <function role="sqlop">OR</function> operator:
</para>
<programlisting>
@@ -1413,11 +1414,12 @@
</programlisting>
<para>
- <literal>AND</literal> and <literal>OR</literal> may be
- intermixed, although <literal>AND</literal> has higher
- precedence than <literal>OR</literal>. If you use both
- operators, it is a good idea to use parentheses to indicate
- explicitly how conditions should be grouped:
+ <function role="sqlop">AND</function> and
+ <function role="sqlop">OR</function> may be intermixed,
+ although <function role="sqlop">AND</function> has higher
+ precedence than <function role="sqlop">OR</function>. If you
+ use both operators, it is a good idea to use parentheses to
+ indicate explicitly how conditions should be grouped:
</para>
<programlisting>
@@ -1725,15 +1727,17 @@
</programlisting>
<para>
- Here, <literal>YEAR()</literal> pulls out the year part of a
- date and <literal>RIGHT()</literal> pulls off the rightmost
- five characters that represent the <literal>MM-DD</literal>
- (calendar year) part of the date. The part of the expression
- that compares the <literal>MM-DD</literal> values evaluates to
- 1 or 0, which adjusts the year difference down a year if
- <literal>CURDATE()</literal> occurs earlier in the year than
- <literal>birth</literal>. The full expression is somewhat
- ungainly, so an <emphasis>alias</emphasis>
+ Here, <function role="sql">YEAR()</function> pulls out the
+ year part of a date and
+ <function role="sql">RIGHT()</function> pulls off the
+ rightmost five characters that represent the
+ <literal>MM-DD</literal> (calendar year) part of the date. The
+ part of the expression that compares the
+ <literal>MM-DD</literal> values evaluates to 1 or 0, which
+ adjusts the year difference down a year if
+ <function role="sql">CURDATE()</function> occurs earlier in
+ the year than <literal>birth</literal>. The full expression is
+ somewhat ungainly, so an <emphasis>alias</emphasis>
(<literal>age</literal>) is used to make the output column
label more meaningful.
</para>
@@ -1829,11 +1833,13 @@
irrelevant; you simply want to extract the month part of the
<literal>birth</literal> column. MySQL provides several
functions for extracting parts of dates, such as
- <literal>YEAR()</literal>, <literal>MONTH()</literal>,
and
- <literal>DAYOFMONTH()</literal>.
<literal>MONTH()</literal> is
- the appropriate function here. To see how it works, run a
- simple query that displays the value of both
- <literal>birth</literal> and
<literal>MONTH(birth)</literal>:
+ <function role="sql">YEAR()</function>,
+ <function role="sql">MONTH()</function>, and
+ <function role="sql">DAYOFMONTH()</function>.
+ <function role="sql">MONTH()</function> is the appropriate
+ function here. To see how it works, run a simple query that
+ displays the value of both <literal>birth</literal> and
+ <literal>MONTH(birth)</literal>:
</para>
<programlisting>
@@ -1883,9 +1889,10 @@
current month is, so that you do not have to use the number
for a particular month. <literal>DATE_ADD()</literal> allows
you to add a time interval to a given date. If you add a month
- to the value of <literal>CURDATE()</literal>, then extract the
- month part with <literal>MONTH()</literal>, the result
- produces the month in which to look for birthdays:
+ to the value of <function role="sql">CURDATE()</function>,
+ then extract the month part with
+ <function role="sql">MONTH()</function>, the result produces
+ the month in which to look for birthdays:
</para>
<programlisting>
@@ -1911,9 +1918,10 @@
<literal>1</literal> and <literal>12</literal>. And
<literal>MOD(something,12)</literal> returns a number between
<literal>0</literal> and <literal>11</literal>. So the
- addition has to be after the <literal>MOD()</literal>,
- otherwise we would go from November (<literal>11</literal>) to
- January (<literal>1</literal>).
+ addition has to be after the
+ <function role="sql">MOD()</function>, otherwise we would go
+ from November (<literal>11</literal>) to January
+ (<literal>1</literal>).
</para>
</section>
@@ -1952,8 +1960,10 @@
<para>
Clearly you get no meaningful results from these comparisons.
- Use the <literal>IS NULL</literal> and <literal>IS NOT
- NULL</literal> operators instead:
+ Use the <function role="sqlop">IS NULL</function> and
+ <function
+role="sqlop">IS NOT NULL</function> operators
+ instead:
</para>
<programlisting>
@@ -2795,7 +2805,7 @@
You have previously seen <literal>SHOW DATABASES</literal>, which
lists the databases managed by the server. To find out which
database is currently selected, use the
- <literal>DATABASE()</literal> function:
+ <function role="sql">DATABASE()</function> function:
</para>
<programlisting>
@@ -3570,13 +3580,14 @@
</indexterm>
<para>
- An <literal>OR</literal> using a single key is well optimized,
- as is the handling of <literal>AND</literal>.
+ An <function role="sqlop">OR</function> using a single key is
+ well optimized, as is the handling of
+ <function role="sqlop">AND</function>.
</para>
<para>
The one tricky case is that of searching on two different keys
- combined with <literal>OR</literal>:
+ combined with <function role="sqlop">OR</function>:
</para>
<programlisting>
@@ -3770,9 +3781,9 @@
<literal>AUTO_INCREMENT</literal> on a secondary column in a
multiple-column index. In this case, the generated value for the
<literal>AUTO_INCREMENT</literal> column is calculated as
- <literal>MAX(<replaceable>auto_increment_column</replaceable>)
+
- 1 WHERE
- prefix=<replaceable>given-prefix</replaceable></literal>. This
+ <function
role="sql">MAX(<replaceable>auto_increment_column</replaceable>)
+ + 1 WHERE
+ prefix=<replaceable>given-prefix</replaceable></function>. This
is useful when you want to put data into ordered groups.
</para>
Modified: trunk/it/refman-5.1/versions.ent
===================================================================
--- trunk/it/refman-5.1/versions.ent 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/versions.ent 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 1, Lines Added: 3, Lines Deleted: 3; 1058 bytes
@@ -6,6 +6,6 @@
<!ENTITY title-refman-previous "MySQL 5.0 Reference Manual"><!-- Title of Manual
previous edition -->
<!ENTITY current-series "5.1"><!-- Current MySQL release series -->
<!ENTITY previous-series "5.0"><!-- Previous MySQL release series -->
-<!ENTITY next-series "5.2"><!-- Next MySQL release series -->
-<!ENTITY current-version "5.1.22-rc"><!-- Current MySQL version - update with
new releases -->
-<!ENTITY current-maturity "beta"><!-- Current maturity level: alpha, beta,
release candidate, production -->
+<!ENTITY next-series "6.0"><!-- Next MySQL release series -->
+<!ENTITY current-version "5.1.23-rc"><!-- Current MySQL version - update with
new releases -->
+<!ENTITY current-maturity "release candidate"><!-- Current maturity level:
alpha, beta, release candidate, production -->
Modified: trunk/it/refman-5.1/views.xml
===================================================================
--- trunk/it/refman-5.1/views.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/it/refman-5.1/views.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 12, Lines Added: 88, Lines Deleted: 64; 12011 bytes
@@ -148,24 +148,41 @@
<remark role="help-description-begin"/>
<para>
- This statement creates a new view, or replaces an existing one if
- the <literal>OR REPLACE</literal> clause is given. If the view
- does not exist, <literal>CREATE OR REPLACE VIEW</literal> is the
- same as <literal>CREATE VIEW</literal>. If the view does exist,
- <literal>CREATE OR REPLACE VIEW</literal> is the same as
- <literal>ALTER VIEW</literal>. The
- <replaceable>select_statement</replaceable> is a
+ The <literal>CREATE VIEW</literal> statement creates a new view,
+ or replaces an existing one if the <literal>OR REPLACE</literal>
+ clause is given. If the view does not exist, <literal>CREATE OR
+ REPLACE VIEW</literal> is the same as <literal>CREATE
+ VIEW</literal>. If the view does exist, <literal>CREATE OR REPLACE
+ VIEW</literal> is the same as <literal>ALTER VIEW</literal>.
+ </para>
+
+ <para>
+ The <replaceable>select_statement</replaceable> is a
<literal>SELECT</literal> statement that provides the definition
- of the view. The statement can select from base tables or other
- views.
+ of the view. (When you select from the view, you select in effect
+ using the <literal>SELECT</literal> statement.)
+ <replaceable>select_statement</replaceable> can select from base
+ tables or other views.
</para>
<para>
- This statement requires the <literal>CREATE VIEW</literal>
- privilege for the view, and some privilege for each column
- selected by the <literal>SELECT</literal> statement. For columns
- used elsewhere in the <literal>SELECT</literal> statement you must
- have the <literal>SELECT</literal> privilege. If the <literal>OR
+ The <literal>ALGORITHM</literal> clause affects how MySQL
+ processes the view. The <literal>DEFINER</literal> and
+ <literal>SQL SECURITY</literal> clauses specify the security
+ context to be used when checking access privileges at view
+ invocation time. The <literal>WITH CHECK OPTION</literal> clause
+ can be given to constrain inserts or updates to rows in tables
+ referenced by the view. These clauses are described later in this
+ section.
+ </para>
+
+ <para>
+ The <literal>CREATE VIEW</literal> statement requires the
+ <literal>CREATE VIEW</literal> privilege for the view, and some
+ privilege for each column selected by the
+ <literal>SELECT</literal> statement. For columns used elsewhere in
+ the <literal>SELECT</literal> statement you must have the
+ <literal>SELECT</literal> privilege. If the <literal>OR
REPLACE</literal> clause is present, you must also have the
<literal>DROP</literal> privilege for the view.
</para>
@@ -369,23 +386,13 @@
</para>
<para>
- <literal>CURRENT_USER</literal> also can be given as
- <literal>CURRENT_USER()</literal>.
- </para>
-
- <para>
- Within a stored routine that is defined with the <literal>SQL
- SECURITY DEFINER</literal> characteristic,
- <literal>CURRENT_USER</literal> returns the routine creator. This
- also affects a view defined within such a routine, if the view
- definition contains a <literal>DEFINER</literal> value of
- <literal>CURRENT_USER</literal>.
- </para>
-
- <para>
The default <literal>DEFINER</literal> value is the user who
- executes the <literal>CREATE VIEW</literal> statement. (This is
- the same as <literal>DEFINER = CURRENT_USER</literal>.) If a
+ executes the <literal>CREATE VIEW</literal> statement. This is the
+ same as specifying <literal>DEFINER = CURRENT_USER</literal>
+ explicitly.
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ also can be given as
+ <function role="sql">CURRENT_USER()</function>. If a
<replaceable>user</replaceable> value is given, it should be a
MySQL account in
<literal>'<replaceable>user_name</replaceable>'@'<replaceable>host_name</replaceable>'</literal>
@@ -408,8 +415,8 @@
If you do not have the <literal>SUPER</literal> privilege, the
only legal <replaceable>user</replaceable> value is your own
account, either specified literally or by using
- <literal>CURRENT_USER</literal>. You cannot set the definer to
- some other account.
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>.
+ You cannot set the definer to some other account.
</para>
</listitem>
@@ -424,13 +431,26 @@
</itemizedlist>
<para>
+ Within a stored routine that is defined with the <literal>SQL
+ SECURITY DEFINER</literal> characteristic,
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ returns the routine creator. This also affects a view defined
+ within such a routine, if the view definition contains a
+ <literal>DEFINER</literal> value of
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>.
+ </para>
+
+ <para>
The <literal>SQL SECURITY</literal> characteristic determines
which MySQL account to use when checking access privileges for the
- view when the view is executed. The legal characteristic values
- are <literal>DEFINER</literal> and
<literal>INVOKER</literal>.
- These indicate that the view must be executable by the user who
- defined it or invoked it, respectively. The default <literal>SQL
- SECURITY</literal> value is <literal>DEFINER</literal>.
+ view when a statement is executed that references the view. The
+ legal characteristic values are <literal>DEFINER</literal> and
+ <literal>INVOKER</literal>. These indicate that the required
+ privileges must be held by the user who defined or invoked the
+ view, respectively. The default <literal>SQL SECURITY</literal>
+ value is <literal>DEFINER</literal>. If the value is
+ <literal>DEFINER</literal> but the definer account does not exist
+ when the view is referenced, an error occurs.
</para>
<para>
@@ -445,7 +465,9 @@
<para>
At view definition time, the view creator must have the
privileges needed to use the top-level objects accessed by the
- view. For example, if the view definition refers to a stored
+ view. For example, if the view definition refers to table
+ columns, the creator must have privileges for the columns, as
+ described previously. If the definition refers to a stored
function, only the privileges needed to invoke the function
can be checked. The privileges required when the function runs
can be checked only as it executes: For different invocations
@@ -456,8 +478,8 @@
<listitem>
<para>
- At view execution time, privileges for objects accessed by the
- view are checked against the privileges held by the view
+ When a view is referenced, privileges for objects accessed by
+ the view are checked against the privileges held by the view
creator or invoker, depending on whether the <literal>SQL
SECURITY</literal> characteristic is
<literal>DEFINER</literal> or
<literal>INVOKER</literal>,
@@ -467,7 +489,7 @@
<listitem>
<para>
- If view execution causes execution of a stored function,
+ If reference to a view causes execution of a stored function,
privilege checking for statements executed within the function
depend on whether the function is defined with a <literal>SQL
SECURITY</literal> characteristic of
@@ -518,10 +540,10 @@
<literal>f()</literal> executes. This might mean that privileges
are needed for <literal>p1()</literal> or
<literal>p2()</literal>,
depending on the execution path within <literal>f()</literal>.
- Those privileges need to be checked at runtime, and the user who
- must possess the privileges is determined by the <literal>SQL
- SECURITY</literal> values of the function <literal>f()</literal>
- and the view <literal>v</literal>.
+ Those privileges must be checked at runtime, and the user who must
+ possess the privileges is determined by the <literal>SQL
+ SECURITY</literal> values of the view <literal>v</literal> and
the
+ function <literal>f()</literal>.
</para>
<para>
@@ -532,24 +554,23 @@
</para>
<para>
- If you invoke a view that was created before MySQL 5.0.13/5.1.2,
- it is treated as though it was created with a <literal>SQL
- SECURITY DEFINER</literal> clause and with a
- <literal>DEFINER</literal> value that is the same as your account.
- However, because the actual definer is unknown, MySQL issues a
- warning. To make the warning go away, it is sufficient to
- re-create the view so that the view definition includes a
- <literal>DEFINER</literal> clause.
+ If you invoke a view that was created before MySQL 5.1.2, it is
+ treated as though it was created with a <literal>SQL SECURITY
+ DEFINER</literal> clause and with a <literal>DEFINER</literal>
+ value that is the same as your account. However, because the
+ actual definer is unknown, MySQL issues a warning. To make the
+ warning go away, it is sufficient to re-create the view so that
+ the view definition includes a <literal>DEFINER</literal> clause.
</para>
<para>
The optional <literal>ALGORITHM</literal> clause is a MySQL
- extension to standard SQL. <literal>ALGORITHM</literal> takes
- three values: <literal>MERGE</literal>,
- <literal>TEMPTABLE</literal>, or
<literal>UNDEFINED</literal>. The
- default algorithm is <literal>UNDEFINED</literal> if no
- <literal>ALGORITHM</literal> clause is present. The algorithm
- affects how MySQL processes the view.
+ extension to standard SQL. It affects how MySQL processes the
+ view. <literal>ALGORITHM</literal> takes three values:
+ <literal>MERGE</literal>, <literal>TEMPTABLE</literal>, or
+ <literal>UNDEFINED</literal>. The default algorithm is
+ <literal>UNDEFINED</literal> if no
<literal>ALGORITHM</literal>
+ clause is present.
</para>
<para>
@@ -693,9 +714,10 @@
that <literal>vc1 < 100</literal> becomes <literal>c1
<
100</literal> and the view <literal>WHERE</literal> clause is
added to the statement <literal>WHERE</literal> clause using an
- <literal>AND</literal> connective (and parentheses are added to
- make sure the parts of the clause are executed with correct
- precedence). The resulting statement to be executed becomes:
+ <function role="sqlop">AND</function> connective (and parentheses
+ are added to make sure the parts of the clause are executed with
+ correct precedence). The resulting statement to be executed
+ becomes:
</para>
<programlisting>
@@ -724,7 +746,8 @@
<listitem>
<para>
Aggregate functions (<function role="sql">SUM()</function>,
- <literal>MIN()</literal>, <literal>MAX()</literal>,
+ <function role="sql">MIN()</function>,
+ <function role="sql">MAX()</function>,
<function role="sql">COUNT()</function>, and so forth)
</para>
</listitem>
@@ -784,7 +807,8 @@
<listitem>
<para>
Aggregate functions (<function role="sql">SUM()</function>,
- <literal>MIN()</literal>, <literal>MAX()</literal>,
+ <function role="sql">MIN()</function>,
+ <function role="sql">MAX()</function>,
<function role="sql">COUNT()</function>, and so forth)
</para>
</listitem>
Modified: trunk/pt/refman-5.1/apis-c.xml
===================================================================
--- trunk/pt/refman-5.1/apis-c.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/apis-c.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 665 bytes
@@ -37,8 +37,8 @@
communicate with the MySQL server. This means that, for example, you
can take advantage of many of the same environment variables that
are used by other client programs, because they are referenced from
- the library. See <xref linkend="programs"/>, for a
- list of these variables.
+ the library. See <xref linkend="programs"/>, for a list of these
+ variables.
</para>
<para>
Modified: trunk/pt/refman-5.1/connectors-apis.xml
===================================================================
--- trunk/pt/refman-5.1/connectors-apis.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/connectors-apis.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 4, Lines Added: 21, Lines Deleted: 23; 4147 bytes
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY % all.entities SYSTEM "all-entities.ent">
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<chapter id="connectors-apis">
@@ -39,11 +37,11 @@
</indexterm>
<indexterm>
- <primary><literal>mysqlclient</literal> library</primary>
+ <primary>mysqlclient library</primary>
</indexterm>
<indexterm>
- <primary><literal>mysqld</literal> library</primary>
+ <primary>mysqld library</primary>
</indexterm>
<indexterm>
@@ -53,12 +51,12 @@
<indexterm>
<primary>library</primary>
- <secondary><literal>mysqlclient</literal></secondary>
+ <secondary>mysqlclient</secondary>
</indexterm>
<indexterm>
<primary>library</primary>
- <secondary><literal>mysqld</literal></secondary>
+ <secondary>mysqld</secondary>
</indexterm>
<para>
@@ -219,34 +217,34 @@
</itemizedlist>
- <xi:include href="../refman-common/connector-odbc.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-odbc.xml"/>
- <xi:include href="../refman-common/connector-net.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-net.xml"/>
- <xi:include href="../refman-common/connector-vstudioplugin.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-vstudioplugin.xml"/>
- <xi:include href="../refman-common/connector-j.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-j.xml"/>
- <xi:include href="../refman-common/connector-mxj.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-mxj.xml"/>
- <xi:include href="../refman-common/connector-php.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../refman-common/connector-php.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-c.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-c.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-libmysqld.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-libmysqld.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-progutils.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-progutils.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-php.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-php.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-perl.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-perl.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-cplusplus.xml"
/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="apis-cplusplus.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-python.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-python.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-tcl.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-tcl.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-eiffel.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="apis-eiffel.xml"/>
</chapter>
Modified: trunk/pt/refman-5.1/data-types.xml
===================================================================
--- trunk/pt/refman-5.1/data-types.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/data-types.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 14, Lines Added: 64, Lines Deleted: 30; 8744 bytes
@@ -561,9 +561,9 @@
<listitem>
<para>
In
-
<literal>MIN(<replaceable>col_name</replaceable>)</literal>
+ <function
role="sql">MIN(<replaceable>col_name</replaceable>)</function>
or
-
<literal>MAX(<replaceable>col_name</replaceable>)</literal>,
+ <function
role="sql">MAX(<replaceable>col_name</replaceable>)</function>,
where <replaceable>col_name</replaceable> refers to
a <literal>BIGINT</literal> column.
</para>
@@ -1403,7 +1403,7 @@
<remark role="help-topic" condition="VARCHAR"/>
<remark role="help-keywords">
- NATIONAL VARYING CHARACTER VARCHARACTER
+ NATIONAL VARYING CHARACTER VARCHARACTER NVARCHAR
</remark>
<remark role="help-description-begin"/>
@@ -1426,6 +1426,14 @@
</indexterm>
<indexterm>
+ <primary>NATIONAL VARCHAR data type</primary>
+ </indexterm>
+
+ <indexterm>
+ <primary>NVARCHAR data type</primary>
+ </indexterm>
+
+ <indexterm>
<primary>data type</primary>
<secondary>VARCHAR</secondary>
</indexterm>
@@ -1445,6 +1453,16 @@
<secondary>VARCHARACTER</secondary>
</indexterm>
+ <indexterm>
+ <primary>data type</primary>
+ <secondary>NATIONAL VARCHAR</secondary>
+ </indexterm>
+
+ <indexterm>
+ <primary>data type</primary>
+ <secondary>NVARCHAR</secondary>
+ </indexterm>
+
<literal>[NATIONAL] VARCHAR(<replaceable>M</replaceable>)
[CHARACTER SET <replaceable>charset_name</replaceable>]
[COLLATE
@@ -1484,7 +1502,14 @@
<para>
<literal>VARCHAR</literal> is shorthand for
- <literal>CHARACTER VARYING</literal>.
+ <literal>CHARACTER VARYING</literal>. <literal>NATIONAL
+ VARCHAR</literal> is the standard SQL way to define that a
+ <literal>VARCHAR</literal> column should use some predefined
+ character set. MySQL 4.1 and up uses <literal>utf8</literal>
+ as this predefined character set.
+ <xref linkend="charset-national"/>.
+ <literal>NVARCHAR</literal> is shorthand for
+ <literal>NATIONAL VARCHAR</literal>.
</para>
<remark role="help-description-end"/>
@@ -1929,10 +1954,11 @@
for a column. With one exception, the default value must be a
constant; it cannot be a function or an expression. This means,
for example, that you cannot set the default for a date column
- to be the value of a function such as <literal>NOW()</literal>
- or <literal>CURRENT_DATE</literal>. The exception is that you
- can specify <literal>CURRENT_TIMESTAMP</literal> as the default
- for a <literal>TIMESTAMP</literal> column. See
+ to be the value of a function such as
+ <function role="sql">NOW()</function> or
+ <literal>CURRENT_DATE</literal>. The exception is that you can
+ specify <literal>CURRENT_TIMESTAMP</literal> as the default for
+ a <literal>TIMESTAMP</literal> column. See
<xref linkend="timestamp"/>.
</para>
@@ -2499,8 +2525,8 @@
MySQL 5.1.18, a <literal>DATE</literal> value is coerced to the
<literal>DATETIME</literal> type by adding the time portion as
<literal>'00:00:00'</literal>. To mimic the old behavior, use the
- <literal>CAST()</literal> function to perform the comparison in
- the following way:
+ <function role="sql">CAST()</function> function to perform the
+ comparison in the following way:
</para>
<programlisting>
@@ -2811,7 +2837,7 @@
As the result of a function that returns a value that is
acceptable in a <literal>DATETIME</literal>,
<literal>DATE</literal>, or
<literal>TIMESTAMP</literal>
- context, such as <literal>NOW()</literal> or
+ context, such as <function role="sql">NOW()</function> or
<literal>CURRENT_DATE</literal>.
</para>
</listitem>
@@ -2841,18 +2867,24 @@
</para>
<para>
- Conversion of <literal>DATETIME</literal> values to numeric form
- (for example, by adding <literal>+0</literal>) results in a
- double value with a microseconds part of
- <literal>.000000</literal>:
+ Conversion of <literal>TIME</literal> or
+ <literal>DATETIME</literal> values to numeric form (for example,
+ by adding <literal>+0</literal>) results in a double value with
+ a microseconds part of <literal>.000000</literal>:
</para>
<programlisting>
+mysql> <userinput>SELECT CURTIME(), CURTIME()+0;</userinput>
++-----------+---------------+
+| CURTIME() | CURTIME()+0 |
++-----------+---------------+
+| 10:41:36 | 104136.000000 |
++-----------+---------------+
mysql> <userinput>SELECT NOW(), NOW()+0;</userinput>
+---------------------+-----------------------+
| NOW() | NOW()+0 |
+---------------------+-----------------------+
-| 2007-04-23 14:21:52 | 20070423142152.000000 |
+| 2007-11-30 10:41:47 | 20071130104147.000000 |
+---------------------+-----------------------+
</programlisting>
@@ -3262,11 +3294,12 @@
<para>
<literal>CURRENT_TIMESTAMP</literal> or any of its
synonyms (<literal>CURRENT_TIMESTAMP()</literal>,
- <literal>NOW()</literal>,
<literal>LOCALTIME</literal>,
- <literal>LOCALTIME()</literal>,
+ <function role="sql">NOW()</function>,
+ <literal>LOCALTIME</literal>,
+ <function role="sql">LOCALTIME()</function>,
<literal>LOCALTIMESTAMP</literal>, or
- <literal>LOCALTIMESTAMP()</literal>) can be used in the
- <literal>DEFAULT</literal> and <literal>ON
+ <function role="sql">LOCALTIMESTAMP()</function>) can be
+ used in the <literal>DEFAULT</literal> and <literal>ON
UPDATE</literal> clauses. They all mean <quote>the current
timestamp.</quote> (<literal>UTC_TIMESTAMP</literal> is
not allowed. Its range of values does not align with those
@@ -3350,7 +3383,7 @@
<listitem>
<para>
- <literal>NOW()</literal> or
+ <function role="sql">NOW()</function> or
<literal>CURRENT_TIMESTAMP</literal> is inserted into the
column
</para>
@@ -3665,7 +3698,7 @@
<para>
As the result of a function that returns a value that is
acceptable in a <literal>YEAR</literal> context, such as
- <literal>NOW()</literal>.
+ <function role="sql">NOW()</function>.
</para>
</listitem>
@@ -3808,12 +3841,13 @@
</para>
<para>
- Some functions like <literal>MIN()</literal> and
- <literal>MAX()</literal> convert a
<literal>YEAR</literal> to a
- number. This means that a value with a two-digit year does not
- work properly with these functions. The fix in this case is to
- convert the <literal>TIMESTAMP</literal> or
- <literal>YEAR</literal> to four-digit year format.
+ Some functions like <function role="sql">MIN()</function> and
+ <function role="sql">MAX()</function> convert a
+ <literal>YEAR</literal> to a number. This means that a value
+ with a two-digit year does not work properly with these
+ functions. The fix in this case is to convert the
+ <literal>TIMESTAMP</literal> or <literal>YEAR</literal>
to
+ four-digit year format.
</para>
</section>
@@ -4396,8 +4430,8 @@
you want more than <literal>max_sort_length</literal> bytes
to be significant is to convert the column value into a
fixed-length object. The standard way to do this is with the
- <literal>SUBSTRING()</literal> function. For example, the
- following statement causes 2000 bytes of the
+ <function role="sql">SUBSTRING()</function> function. For
+ example, the following statement causes 2000 bytes of the
<literal>comment</literal> column to be taken into account
for sorting:
</para>
Modified: trunk/pt/refman-5.1/errors-problems-core.xml
===================================================================
--- trunk/pt/refman-5.1/errors-problems-core.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/errors-problems-core.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 37, Lines Added: 303, Lines Deleted: 284; 35735 bytes
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY % all.entities SYSTEM "all-entities.ent">
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<appendix id="error-handling">
@@ -25,7 +23,7 @@
list displays client program messages.
</para>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -467,8 +465,8 @@
You are using Linux and one server thread has died (dumped
core). In this case, you must kill the other
<command>mysqld</command> threads (for example, with
- <literal>kill</literal> or with the
- <literal>mysql_zap</literal> script) before you can
+ <command>kill</command> or with the
+ <command>mysql_zap</command> script) before you can
restart the MySQL server. See <xref linkend="crashing"/>.
</para>
</listitem>
@@ -778,7 +776,8 @@
Reset the password to pre-4.1 style for each user that
needs to use a pre-4.1 client program. This can be done
using the <literal>SET PASSWORD</literal> statement and
- the <literal>OLD_PASSWORD()</literal> function:
+ the <function role="sql">OLD_PASSWORD()</function>
+ function:
</para>
<programlisting>
@@ -836,8 +835,9 @@
For each account record displayed by the query, use
the <literal>Host</literal> and
<literal>User</literal> values and assign a password
- using the <literal>OLD_PASSWORD()</literal> function
- and either <literal>SET PASSWORD</literal> or
+ using the
+ <function role="sql">OLD_PASSWORD()</function>
+ function and either <literal>SET PASSWORD</literal> or
<literal>UPDATE</literal>, as described earlier.
</para>
</listitem>
@@ -981,8 +981,7 @@
with MySQL 5.1.15, its default value is 151 to improve
performance when MySQL is used with the Apache Web server.
(Previously, the default was 100.) If you need to support more
- connections, you should restart <command>mysqld</command> with
- a larger value for this variable.
+ connections, you should set a larger value for this variable.
</para>
<formalpara role="mnmas">
@@ -994,7 +993,7 @@
on dynamically configuring the
<literal>max_connections</literal> variable — avoiding
failed connection attempts. For more information, see
- <ulink url="&base-url-enterprise;advisors.html" />.
+ <ulink url="&base-url-enterprise;advisors.html"/>.
</para>
</formalpara>
@@ -1046,9 +1045,9 @@
If not, correct the query and try again. Otherwise, you can
invoke <command>mysql</command> with the
<option>--quick</option> option. This causes it to use the
- <literal>mysql_use_result()</literal> C API function to
- retrieve the result set, which places less of a load on the
- client (but more on the server).
+ <function role="capi">mysql_use_result()</function> C API
+ function to retrieve the result set, which places less of a
+ load on the client (but more on the server).
</para>
</section>
@@ -1151,10 +1150,10 @@
<para>
You got a timeout from the TCP/IP connection on the client
side. This may happen if you have been using the commands:
- <literal>mysql_options(...,
- MYSQL_OPT_READ_TIMEOUT,...)</literal> or
- <literal>mysql_options(...,
- MYSQL_OPT_WRITE_TIMEOUT,...)</literal>. In this case
+ <function role="capi">mysql_options(...,
+ MYSQL_OPT_READ_TIMEOUT,...)</function> or
+ <function role="capi">mysql_options(...,
+ MYSQL_OPT_WRITE_TIMEOUT,...)</function>. In this case
increasing the timeout may help solve the problem.
</para>
</listitem>
@@ -1194,9 +1193,9 @@
<para>
The solution to this is to either do a
- <literal>mysql_ping</literal> on the connection if there
- has been a long time since the last query (this is what
- <literal>MyODBC</literal> does) or set
+ <function role="capi">mysql_ping()</function> on the
+ connection if there has been a long time since the last
+ query (this is what <literal>MyODBC</literal> does) or set
<literal>wait_timeout</literal> on the
<command>mysqld</command> server so high that it in
practice never times out.
@@ -1485,7 +1484,8 @@
<listitem>
<para>
The client program did not call
- <literal>mysql_close()</literal> before exiting.
+ <function role="capi">mysql_close()</function> before
+ exiting.
</para>
</listitem>
@@ -1842,7 +1842,7 @@
<listitem>
<para>
- If your large table is read-only, you can use
+ If your large table is read only, you can use
<command>myisampack</command> to compress it.
<command>myisampack</command> usually compresses a
table by at least 50%, so you can have, in effect,
@@ -1977,12 +1977,14 @@
<para>
This can happen, for example, if you are using
- <literal>mysql_use_result()</literal> and try to execute a new
- query before you have called
- <literal>mysql_free_result()</literal>. It can also happen if
- you try to execute two queries that return data without
- calling <literal>mysql_use_result()</literal> or
- <literal>mysql_store_result()</literal> in between.
+ <function role="capi">mysql_use_result()</function> and try to
+ execute a new query before you have called
+ <function role="capi">mysql_free_result()</function>. It can
+ also happen if you try to execute two queries that return data
+ without calling
+ <function role="capi">mysql_use_result()</function> or
+ <function role="capi">mysql_store_result()</function> in
+ between.
</para>
</section>
@@ -2031,12 +2033,9 @@
<listitem>
<para>
- The account has an old password (eight characters long)
- and you didn't start <command>mysqld</command> with the
- <option>--old-protocol</option> option. Update the account
- in the <literal>user</literal> table to have a new
- password or restart <command>mysqld</command> with the
- <option>--old-protocol</option> option.
+ The account has an old password (eight characters long).
+ Update the account in the <literal>user</literal> table to
+ have a new password.
</para>
</listitem>
@@ -2048,10 +2047,11 @@
You have specified a password in the
<literal>user</literal> table without using the
- <literal>PASSWORD()</literal> function. Use
+ <function role="sql">PASSWORD()</function> function. Use
<command>mysql</command> to update the account in the
<literal>user</literal> table with a new password, making
- sure to use the <literal>PASSWORD()</literal> function:
+ sure to use the <function role="sql">PASSWORD()</function>
+ function:
</para>
<programlisting>
@@ -2567,98 +2567,103 @@
<para>
If you set a <literal>root</literal> password previously, but
have forgotten what it was, you can set a new password. The
- following procedure is for Windows systems. The procedure for
- Unix systems is given later in this section.
+ next two sections show procedures for Windows and Unix
+ systems, respectively.
</para>
- <para>
- The procedure under Windows:
- </para>
+ <section id="resetting-permissions-windows">
- <orderedlist>
+ <title>Resetting the Root Password on Windows Systems</title>
- <listitem>
- <para>
- Log on to your system as Administrator.
- </para>
- </listitem>
+ <para>
+ The procedure for resetting the MySQL root account's
+ password on Windows is as follows:
+ </para>
- <listitem>
- <para>
- Stop the MySQL server if it is running. For a server that
- is running as a Windows service, go to the Services
- manager:
- </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Log on to your system as Administrator.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Stop the MySQL server if it is running. For a server
+ that is running as a Windows service, go to the Services
+ manager:
+ </para>
+
<programlisting>
Start Menu -> Control Panel -> Administrative Tools -> Services
</programlisting>
- <para>
- Then find the MySQL service in the list, and stop it.
- </para>
+ <para>
+ Then find the MySQL service in the list, and stop it.
+ </para>
- <para>
- If your server is not running as a service, you may need
- to use the Task Manager to force it to stop.
- </para>
- </listitem>
+ <para>
+ If your server is not running as a service, you may need
+ to use the Task Manager to force it to stop.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Create a text file and place the following command within
- it on a single line:
- </para>
+ <listitem>
+ <para>
+ Create a text file and place the following command
+ within it on a single line:
+ </para>
<programlisting>
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
</programlisting>
- <para>
- Save the file with any name. For this example the file
- will be <filename>C:\mysql-init.txt</filename>.
- </para>
- </listitem>
+ <para>
+ Save the file with any name. For this example the file
+ will be <filename>C:\mysql-init.txt</filename>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Open a console window to get to the DOS command prompt:
- </para>
+ <listitem>
+ <para>
+ Open a console window to get to the DOS command prompt:
+ </para>
<programlisting>
Start Menu -> Run -> cmd
</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- We are assuming that you installed MySQL to
- <filename>C:\mysql</filename>. If you installed MySQL to
- another location, adjust the following commands
- accordingly.
- </para>
+ <listitem>
+ <para>
+ We are assuming that you installed MySQL to
+ <filename>C:\mysql</filename>. If you installed MySQL to
+ another location, adjust the following commands
+ accordingly.
+ </para>
- <para>
- At the DOS command prompt, execute this command:
- </para>
+ <para>
+ At the DOS command prompt, execute this command:
+ </para>
<programlisting>
C:\> <userinput>C:\mysql\bin\mysqld
--init-file=C:\mysql-init.txt</userinput>
</programlisting>
- <para>
- The contents of the file named by the
- <option>--init-file</option> option are executed at server
- startup, changing the <literal>root</literal> password.
- After the server has started successfully, you should
- delete <filename>C:\mysql-init.txt</filename>.
- </para>
+ <para>
+ The contents of the file named by the
+ <option>--init-file</option> option are executed at
+ server startup, changing the <literal>root</literal>
+ password. After the server has started successfully, you
+ should delete <filename>C:\mysql-init.txt</filename>.
+ </para>
- <para>
- If you install MySQL using the MySQL Installation Wizard,
- you may need to specify a <option>--defaults-file</option>
- option:
- </para>
+ <para>
+ If you install MySQL using the MySQL Installation
+ Wizard, you may need to specify a
+ <option>--defaults-file</option> option:
+ </para>
<programlisting>
C:\> <userinput>"C:\Program Files\MySQL\MySQL Server
¤t-series;\bin\mysqld.exe"</userinput>
@@ -2666,176 +2671,182 @@
<userinput>--init-file=C:\mysql-init.txt</userinput>
</programlisting>
- <para>
- The appropriate <option>--defaults-file</option> setting
- can be found using the Services Manager:
- </para>
+ <para>
+ The appropriate <option>--defaults-file</option> setting
+ can be found using the Services Manager:
+ </para>
<programlisting>
Start Menu -> Control Panel -> Administrative Tools -> Services
</programlisting>
- <para>
- Find the MySQL service in the list, right-click on it, and
- choose the <literal>Properties</literal> option. The
- <literal>Path to executable</literal> field contains the
- <option>--defaults-file</option> setting.
- </para>
- </listitem>
+ <para>
+ Find the MySQL service in the list, right-click on it,
+ and choose the <literal>Properties</literal> option. The
+ <literal>Path to executable</literal> field contains the
+ <option>--defaults-file</option> setting.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Stop the MySQL server, then restart it in normal mode
- again. If you run the server as a service, start it from
- the Windows Services window. If you start the server
- manually, use whatever command you normally use.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Stop the MySQL server, then restart it in normal mode
+ again. If you run the server as a service, start it from
+ the Windows Services window. If you start the server
+ manually, use whatever command you normally use.
+ </para>
+ </listitem>
- <listitem>
- <para>
- You should be able to connect using the new password.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ You should be able to connect using the new password.
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- In a Unix environment, the procedure for resetting the
- <literal>root</literal> password is as follows:
- </para>
+ </section>
- <formalpara role ="mnmas">
+ <section id="resetting-permissions-unix">
- <title>MySQL Enterprise</title>
+ <title>Resetting the Root Password on Unix Systems</title>
+ <formalpara role="mnmas">
+
+ <title>MySQL Enterprise</title>
+
+ <para>
+ For expert advice on security-related issues, subscribe to
+ the MySQL Enterprise Monitor. For more information, see
+ <ulink url="&base-url-enterprise;advisors.html"/>.
+ </para>
+
+ </formalpara>
+
<para>
- For expert advice on security-related issues, subscribe to
- the MySQL Enterprise Monitor. For more information, see
- <ulink url="&base-url-enterprise;advisors.html"/>.
+ In a Unix environment, the procedure for resetting the MySQL
+ <literal>root</literal> password is as follows:
</para>
- </formalpara>
+ <orderedlist>
- <orderedlist>
+ <listitem>
+ <para>
+ Log on to your system as either the Unix
+ <literal>root</literal> user or as the same user that
+ the <command>mysqld</command> server runs as.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Log on to your system as either the Unix
- <literal>root</literal> user or as the same user that the
- <command>mysqld</command> server runs as.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Locate the <filename>.pid</filename> file that contains
+ the server's process ID. The exact location and name of
+ this file depend on your distribution, hostname, and
+ configuration. Common locations are
+ <filename>/var/lib/mysql/</filename>,
+ <filename>/var/run/mysqld/</filename>, and
+ <filename>/usr/local/mysql/data/</filename>. Generally,
+ the filename has the extension of
+ <filename>.pid</filename> and begins with either
+ <filename>mysqld</filename> or your system's hostname.
+ </para>
- <listitem>
- <para>
- Locate the <filename>.pid</filename> file that contains
- the server's process ID. The exact location and name of
- this file depend on your distribution, hostname, and
- configuration. Common locations are
- <filename>/var/lib/mysql/</filename>,
- <filename>/var/run/mysqld/</filename>, and
- <filename>/usr/local/mysql/data/</filename>. Generally,
- the filename has the extension of
- <filename>.pid</filename> and begins with either
- <filename>mysqld</filename> or your system's hostname.
- </para>
+ <para>
+ You can stop the MySQL server by sending a normal
+ <literal>kill</literal> (not <literal>kill
-9</literal>)
+ to the <command>mysqld</command> process, using the
+ pathname of the <filename>.pid</filename> file in the
+ following command:
+ </para>
- <para>
- You can stop the MySQL server by sending a normal
- <literal>kill</literal> (not <literal>kill
-9</literal>)
- to the <command>mysqld</command> process, using the
- pathname of the <filename>.pid</filename> file in the
- following command:
- </para>
-
<programlisting>
shell> <userinput>kill `cat
/mysql-data-directory/host_name.pid`</userinput>
</programlisting>
- <para>
- Note the use of backticks rather than forward quotes with
- the <literal>cat</literal> command; these cause the output
- of <literal>cat</literal> to be substituted into the
- <literal>kill</literal> command.
- </para>
- </listitem>
+ <para>
+ Note the use of backticks rather than forward quotes
+ with the <literal>cat</literal> command; these cause the
+ output of <literal>cat</literal> to be substituted into
+ the <literal>kill</literal> command.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Create a text file and place the following command within
- it on a single line:
- </para>
+ <listitem>
+ <para>
+ Create a text file and place the following command
+ within it on a single line:
+ </para>
<programlisting>
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
</programlisting>
- <para>
- Save the file with any name. For this example the file
- will be <filename>~/mysql-init</filename>.
- </para>
- </listitem>
+ <para>
+ Save the file with any name. For this example the file
+ will be <filename>~/mysql-init</filename>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Restart the MySQL server with the special
- <option>--init-file=~/mysql-init</option> option:
- </para>
+ <listitem>
+ <para>
+ Restart the MySQL server with the special
+ <option>--init-file=~/mysql-init</option> option:
+ </para>
<programlisting>
shell> <userinput>mysqld_safe --init-file=~/mysql-init
&</userinput>
</programlisting>
- <para>
- The contents of the init-file are executed at server
- startup, changing the root password. After the server has
- started successfully you should delete
- <filename>~/mysql-init</filename>.
- </para>
- </listitem>
+ <para>
+ The contents of the init-file are executed at server
+ startup, changing the root password. After the server
+ has started successfully you should delete
+ <filename>~/mysql-init</filename>.
+ </para>
+ </listitem>
- <listitem>
- <para>
- You should be able to connect using the new password.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ You should be able to connect using the new password.
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- Alternatively, on any platform, you can set the new password
- using the <command>mysql</command> client(but this approach is
- less secure):
- </para>
+ <para>
+ Alternatively, on any platform, you can set the new password
+ using the <command>mysql</command> client(but this approach
+ is less secure):
+ </para>
- <orderedlist>
+ <orderedlist>
- <listitem>
- <para>
- Stop <command>mysqld</command> and restart it with the
- <option>--skip-grant-tables --user=root</option> options
- (Windows users omit the <option>--user=root</option>
- portion).
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Stop <command>mysqld</command> and restart it with the
+ <option>--skip-grant-tables --user=root</option> options
+ (Windows users omit the <option>--user=root</option>
+ portion).
+ </para>
+ </listitem>
- <listitem>
- <para>
- Connect to the <command>mysqld</command> server with this
- command:
- </para>
+ <listitem>
+ <para>
+ Connect to the <command>mysqld</command> server with
+ this command:
+ </para>
<programlisting>
shell> <userinput>mysql -u root</userinput>
</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Issue the following statements in the
- <command>mysql</command> client:
- </para>
+ <listitem>
+ <para>
+ Issue the following statements in the
+ <command>mysql</command> client:
+ </para>
<programlisting>
mysql> <userinput>UPDATE mysql.user SET
Password=PASSWORD('<replaceable>newpwd</replaceable>')</userinput>
@@ -2843,21 +2854,23 @@
mysql> <userinput>FLUSH PRIVILEGES;</userinput>
</programlisting>
- <para>
- Replace
<quote><replaceable>newpwd</replaceable></quote>
- with the actual <literal>root</literal> password that you
- want to use.
- </para>
- </listitem>
+ <para>
+ Replace
<quote><replaceable>newpwd</replaceable></quote>
+ with the actual <literal>root</literal> password that
+ you want to use.
+ </para>
+ </listitem>
- <listitem>
- <para>
- You should be able to connect using the new password.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ You should be able to connect using the new password.
+ </para>
+ </listitem>
- </orderedlist>
+ </orderedlist>
+ </section>
+
</section>
<section id="crashing">
@@ -3304,7 +3317,7 @@
TABLE</literal>, the old table is left unchanged.
</para>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -3424,13 +3437,13 @@
<title>How to Protect or Change the MySQL Unix Socket File</title>
<indexterm>
- <primary><literal>mysql.sock</literal></primary>
+ <primary>mysql.sock</primary>
<secondary>protection</secondary>
</indexterm>
<indexterm>
<primary>deletion</primary>
- <secondary><literal>mysql.sock</literal></secondary>
+ <secondary>mysql.sock</secondary>
</indexterm>
<para>
@@ -3673,7 +3686,7 @@
<indexterm>
<primary>problems</primary>
- <secondary><literal>DATE</literal> columns</secondary>
+ <secondary>DATE columns</secondary>
</indexterm>
<para>
@@ -3739,7 +3752,7 @@
<para>
When you use any other comparison method than those just
listed, such as <literal>IN</literal> or
- <literal>STRCMP()</literal>.
+ <function role="sql">STRCMP()</function>.
</para>
</listitem>
@@ -3794,8 +3807,8 @@
</programlisting>
<para>
- <literal>STRCMP()</literal> is a string function, so it
- converts <literal>idate</literal> to a string in
+ <function role="sql">STRCMP()</function> is a string function,
+ so it converts <literal>idate</literal> to a string in
<literal>'YYYY-MM-DD'</literal> format and performs a string
comparison. It does not convert <literal>'20030505'</literal>
to the date <literal>'2003-05-05'</literal> and perform a date
@@ -3857,7 +3870,7 @@
<title>Problems with <literal>NULL</literal>
Values</title>
<indexterm>
- <primary><literal>NULL</literal> values</primary>
+ <primary>NULL values</primary>
<secondary>vs. empty values</secondary>
</indexterm>
@@ -3890,8 +3903,9 @@
<para>
To help with <literal>NULL</literal> handling, you can use the
- <literal>IS NULL</literal> and <literal>IS NOT
NULL</literal>
- operators and the <literal>IFNULL()</literal> function.
+ <function role="sqlop">IS NULL</function> and
+ <function role="sqlop">IS NOT NULL</function> operators and
+ the <function role="sql">IFNULL()</function> function.
</para>
<para>
@@ -3922,9 +3936,9 @@
<para>
To look for <literal>NULL</literal> values, you must use the
- <literal>IS NULL</literal> test. The following statements show
- how to find the <literal>NULL</literal> phone number and the
- empty phone number:
+ <function role="sqlop">IS NULL</function> test. The following
+ statements show how to find the <literal>NULL</literal> phone
+ number and the empty phone number:
</para>
<programlisting>
@@ -3975,14 +3989,16 @@
<para>
Aggregate (summary) functions such as
- <literal>COUNT()</literal>, <literal>MIN()</literal>,
and
- <literal>SUM()</literal> ignore <literal>NULL</literal>
- values. The exception to this is <literal>COUNT(*)</literal>,
- which counts rows and not individual column values. For
- example, the following statement produces two counts. The
- first is a count of the number of rows in the table, and the
- second is a count of the number of non-<literal>NULL</literal>
- values in the <literal>age</literal> column:
+ <function role="sql">COUNT()</function>,
+ <function role="sql">MIN()</function>, and
+ <function role="sql">SUM()</function> ignore
+ <literal>NULL</literal> values. The exception to this is
+ <function role="sql">COUNT(*)</function>, which counts rows
+ and not individual column values. For example, the following
+ statement produces two counts. The first is a count of the
+ number of rows in the table, and the second is a count of the
+ number of non-<literal>NULL</literal> values in the
+ <literal>age</literal> column:
</para>
<programlisting>
@@ -3990,23 +4006,23 @@
</programlisting>
<indexterm>
- <primary><literal>TIMESTAMP</literal></primary>
- <secondary>and <literal>NULL</literal>
values</secondary>
+ <primary>TIMESTAMP</primary>
+ <secondary>and NULL values</secondary>
</indexterm>
<indexterm>
- <primary><literal>AUTO_INCREMENT</literal></primary>
- <secondary>and <literal>NULL</literal>
values</secondary>
+ <primary>AUTO_INCREMENT</primary>
+ <secondary>and NULL values</secondary>
</indexterm>
<indexterm>
- <primary><literal>NULL</literal> values</primary>
- <secondary>and <literal>TIMESTAMP</literal>
columns</secondary>
+ <primary>NULL values</primary>
+ <secondary>and TIMESTAMP columns</secondary>
</indexterm>
<indexterm>
- <primary><literal>NULL</literal> values</primary>
- <secondary>and <literal>AUTO_INCREMENT</literal>
columns</secondary>
+ <primary>NULL values</primary>
+ <secondary>and AUTO_INCREMENT columns</secondary>
</indexterm>
<para>
@@ -4014,8 +4030,9 @@
values specially. If you insert <literal>NULL</literal> into a
<literal>TIMESTAMP</literal> column, the current date and time
is inserted. If you insert <literal>NULL</literal> into an
- integer column that has the <literal>AUTO_INCREMENT</literal>
- attribute, the next number in the sequence is inserted.
+ integer or floating-point column that has the
+ <literal>AUTO_INCREMENT</literal> attribute, the next number
+ in the sequence is inserted.
</para>
</section>
@@ -4145,7 +4162,7 @@
<xref linkend="show-variables"/>.
</para>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -4498,7 +4515,7 @@
</itemizedlist>
- <formalpara role ="mnmas">
+ <formalpara role="mnmas">
<title>MySQL Enterprise</title>
@@ -4886,8 +4903,9 @@
<literal>lower_case_table_names=2</literal> (which enables
MySQL to remember the case used for databases and table
names), MySQL does not remember the case used for database
- names for the function <literal>DATABASE()</literal> or
- within the various logs (on case-insensitive systems).
+ names for the function
+ <function role="sql">DATABASE()</function> or within the
+ various logs (on case-insensitive systems).
</para>
</listitem>
@@ -4911,8 +4929,8 @@
<para>
<literal>DISTINCT</literal> with <literal>ORDER
BY</literal> doesn't work inside
- <literal>GROUP_CONCAT()</literal> if you don't use all and
- only those columns that are in the
+ <function role="sql">GROUP_CONCAT()</function> if you
+ don't use all and only those columns that are in the
<literal>DISTINCT</literal> list.
</para>
</listitem>
@@ -5181,12 +5199,12 @@
depends on the function. The general rule is that bit
functions are performed with <literal>BIGINT</literal>
precision, <literal>IF</literal> and
- <literal>ELT()</literal> with
<literal>BIGINT</literal> or
- <literal>DOUBLE</literal> precision, and the rest with
- <literal>DOUBLE</literal> precision. You should try to
- avoid using unsigned long long values if they resolve to
- be larger than 63 bits (9223372036854775807) for anything
- other than bit fields.
+ <function role="sql">ELT()</function> with
+ <literal>BIGINT</literal> or
<literal>DOUBLE</literal>
+ precision, and the rest with <literal>DOUBLE</literal>
+ precision. You should try to avoid using unsigned long
+ long values if they resolve to be larger than 63 bits
+ (9223372036854775807) for anything other than bit fields.
</para>
</listitem>
@@ -5199,8 +5217,9 @@
<listitem>
<para>
- In <literal>MIN()</literal>,
<literal>MAX()</literal>, and
- other aggregate functions, MySQL currently compares
+ In <function role="sql">MIN()</function>,
+ <function role="sql">MAX()</function>, and other aggregate
+ functions, MySQL currently compares
<literal>ENUM</literal> and <literal>SET</literal>
columns
by their string value rather than by the string's relative
position in the set.
@@ -5437,7 +5456,7 @@
Include list of server error messages:
</remark>
- <xi:include href="errmsgs-server.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="errmsgs-server.xml"/>
</section>
@@ -5480,7 +5499,7 @@
Include list of client error messages:
</remark>
- <xi:include href="errmsgs-client.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="errmsgs-client.xml"/>
</section>
Modified: trunk/pt/refman-5.1/events.xml
===================================================================
--- trunk/pt/refman-5.1/events.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/events.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 14, Lines Added: 23, Lines Deleted: 24; 6041 bytes
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY % all.entities SYSTEM "all-entities.ent">
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
<chapter id="events">
@@ -264,7 +262,7 @@
<indexterm>
<primary>Event Scheduler</primary>
- <secondary>and <literal>SHOW
PROCESSLIST</literal></secondary>
+ <secondary>and SHOW PROCESSLIST</secondary>
</indexterm>
<para>
@@ -500,7 +498,7 @@
<para>
MySQL 5.1.6 and later provides an <literal>EVENTS</literal> table
in the <literal>INFORMATION_SCHEMA</literal> database. This table
- can be queried to obtian information about scheduled events which
+ can be queried to obtain information about scheduled events which
have been defined on the server. See
<xref linkend="events-metadata"/>, and
<xref linkend="events-table"/>, for more information.
@@ -584,7 +582,7 @@
</indexterm>
<indexterm>
- <primary><literal>ALTER EVENT</literal></primary>
+ <primary>ALTER EVENT</primary>
</indexterm>
<remark role="help-topic" condition="ALTER EVENT"/>
@@ -601,8 +599,8 @@
[DEFINER = { <replaceable>user</replaceable> | CURRENT_USER }]
<replaceable>event_name</replaceable>
[ON SCHEDULE <replaceable>schedule</replaceable>]
- [RENAME TO <replaceable>new_event_name</replaceable>]
[ON COMPLETION [NOT] PRESERVE]
+ [RENAME TO <replaceable>new_event_name</replaceable>]
[ENABLE | DISABLE | DISABLE ON SLAVE]
[COMMENT '<replaceable>comment</replaceable>']
[DO <replaceable>sql_statement</replaceable>]
@@ -811,7 +809,7 @@
</indexterm>
<indexterm>
- <primary><literal>CREATE EVENT</literal></primary>
+ <primary>CREATE EVENT</primary>
</indexterm>
<remark role="help-topic" condition="CREATE EVENT"/>
@@ -954,8 +952,9 @@
format (the same format used in the <literal>GRANT</literal>
statement). The <replaceable>user_name</replaceable> and
<replaceable>host_name</replaceable> values both are required.
- <literal>CURRENT_USER</literal> also can be given as
- <literal>CURRENT_USER()</literal>. The default
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ also can be given as
+ <function role="sql">CURRENT_USER()</function>. The default
<literal>DEFINER</literal> value is the user who executes the
<literal>CREATE TRIGGER</literal> statement. (This is the same
as <literal>DEFINER = CURRENT_USER</literal>.)
@@ -1360,7 +1359,7 @@
<title><literal>DROP EVENT</literal> Syntax</title>
<indexterm>
- <primary><literal>DROP EVENT</literal></primary>
+ <primary>DROP EVENT</primary>
</indexterm>
<indexterm>
@@ -1485,7 +1484,7 @@
<indexterm>
<primary>Event Scheduler</primary>
- <secondary>and <command>mysqladmin
debug</command></secondary>
+ <secondary>and mysqladmin debug</secondary>
</indexterm>
<para>
@@ -1666,8 +1665,8 @@
</programlisting>
<indexterm>
- <primary><literal>EVENTS</literal></primary>
- <secondary><literal>INFORMATION_SCHEMA</literal>
table</secondary>
+ <primary>EVENTS</primary>
+ <secondary>INFORMATION_SCHEMA table</secondary>
</indexterm>
<para>
@@ -1792,7 +1791,7 @@
</para>
<indexterm>
- <primary><literal>mysql.event</literal> table</primary>
+ <primary>mysql.event table</primary>
</indexterm>
<para>
@@ -2008,9 +2007,9 @@
non-zero length of time is required to create events and to
signal their execution — events may be delayed by as much
as 1 or 2 seconds. However, the time shown in the
- <literal>INFORMATION_SCHEMA.EVENTS</literal> table's
+ <literal>INFORMATION_SCHEMA.EVENTS</literal> table's
<literal>LAST_EXECUTED</literal> column or the
- <literal>mysql.event</literal> table's
+ <literal>mysql.event</literal> table's
<literal>last_executed</literal> column is always accurate to
within one second of the time the event was actually executed.
(See also Bug #16522.)
@@ -2025,8 +2024,8 @@
<para>
Each execution of the statements contained in the body of an
event takes place in a new connection; thus, these statements
- has no effect in a given user session on the server's
- statement counts such as <literal>Com_select</literal> and
+ has no effect in a given user session on the server's statement
+ counts such as <literal>Com_select</literal> and
<literal>Com_insert</literal> that are displayed by
<literal>SHOW STATUS</literal>. However, such counts
<emphasis>are</emphasis> updated in the global scope. (Bug
@@ -2040,10 +2039,10 @@
<title>Visibility of events belonging to other users</title>
<para>
- Prior to MySQL 5.1.12, you could not view another user's
- events in the <literal>INFORMATION_SCHEMA.EVENTS</literal>
- table. In other words, any query made against this table was
- treated as though it contained the condition <literal>DEFINER =
+ Prior to MySQL 5.1.12, you could not view another user's events
+ in the <literal>INFORMATION_SCHEMA.EVENTS</literal> table. In
+ other words, any query made against this table was treated as
+ though it contained the condition <literal>DEFINER =
CURRENT_USER()</literal> in the <literal>WHERE</literal>
clause.
</para>
Modified: trunk/pt/refman-5.1/internationalization.xml
===================================================================
--- trunk/pt/refman-5.1/internationalization.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/internationalization.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 24, Lines Added: 142, Lines Deleted: 100; 19819 bytes
@@ -766,8 +766,10 @@
Every <quote>character</quote> column (that is, a column of
type <literal>CHAR</literal>,
<literal>VARCHAR</literal>, or
<literal>TEXT</literal>) has a column character set and a
- column collation. Column definition syntax has optional
- clauses for specifying the column character set and collation:
+ column collation. Column definition syntax for <literal>CREATE
+ TABLE</literal> and <literal>ALTER TABLE</literal> has
+ optional clauses for specifying the column character set and
+ collation:
</para>
<programlisting>
@@ -776,7 +778,7 @@
</programlisting>
<para>
- Example:
+ Examples:
</para>
<programlisting>
@@ -784,9 +786,19 @@
(
column1 VARCHAR(5) CHARACTER SET latin1 COLLATE latin1_german1_ci
);
+
+ALTER TABLE Table1 MODIFY
+ column1 VARCHAR(5) CHARACTER SET latin1 COLLATE latin1_swedish_ci;
</programlisting>
<para>
+ If you convert a column from one character set to another,
+ <literal>ALTER TABLE</literal> attempts to map the data
+ values, but if the character sets are incompatible, there may
+ be data loss.
+ </para>
+
+ <para>
MySQL chooses the column character set and collation in the
following manner:
</para>
@@ -893,10 +905,11 @@
<replaceable>X</replaceable>.</quote> Because this has
confused people in the past, we emphasize that an introducer
does not change the string to the introducer character set
- like <literal>CONVERT()</literal> would do. It does not change
- the string's value, although padding may occur. The introducer
- is just a signal. An introducer is also legal before standard
- hex literal and numeric hex literal notation
+ like <function role="sql">CONVERT()</function> would do. It
+ does not change the string's value, although padding may
+ occur. The introducer is just a signal. An introducer is also
+ legal before standard hex literal and numeric hex literal
+ notation
(<literal>x'<replaceable>literal</replaceable>'</literal> and
<literal>0x<replaceable>nnnn</replaceable></literal>).
</para>
@@ -1009,8 +1022,9 @@
NAMES</literal> (which changes
<literal>character_set_connection</literal>, as discussed in
<xref linkend="charset-connection"/>), and display the
- resulting strings using the <literal>HEX()</literal> function
- so that the exact string contents can be seen.
+ resulting strings using the
+ <function role="sql">HEX()</function> function so that the
+ exact string contents can be seen.
</para>
<para>
@@ -1670,8 +1684,9 @@
<para>
The <literal>COLLATE</literal> clause has high precedence
- (higher than <literal>||</literal>), so the following two
- expressions are equivalent:
+ (higher than
+ <function role="sqlop" condition="operator_or">||</function>),
+ so the following two expressions are equivalent:
</para>
<programlisting>
@@ -1706,8 +1721,9 @@
<para>
<literal>BINARY
<replaceable>str</replaceable></literal> is
- shorthand for <literal>CAST(<replaceable>str</replaceable> AS
- BINARY)</literal>.
+ shorthand for
+ <function role="sql">CAST(<replaceable>str</replaceable> AS
+ BINARY)</function>.
</para>
<para>
@@ -1829,8 +1845,9 @@
<listitem>
<para>
A <quote>system constant</quote> (the string returned by
- functions such as <literal>USER()</literal> or
- <literal>VERSION()</literal>) has a coercibility of 3.
+ functions such as <function role="sql">USER()</function>
+ or <function role="sql">VERSION()</function>) has a
+ coercibility of 3.
</para>
</listitem>
@@ -1946,8 +1963,9 @@
</informaltable>
<para>
- The <literal>COERCIBILITY()</literal> function can be used to
- determine the coercibility of a string expression:
+ The <function role="sql">COERCIBILITY()</function> function
+ can be used to determine the coercibility of a string
+ expression:
</para>
<programlisting>
@@ -2292,7 +2310,7 @@
<para>
Functions with one string argument inherit the repertoire of
their argument. The result of
-
<literal>UPPER(_utf8'<replaceable>abc</replaceable>')</literal>
+ <function
role="sql">UPPER(_utf8'<replaceable>abc</replaceable>')</function>
has <literal>ASCII</literal> repertoire, because its
argument has <literal>ASCII</literal> repertoire.
</para>
@@ -2354,7 +2372,7 @@
<quote>widest</quote> argument repertoire for the result
repertoire (<literal>UNICODE</literal> is wider than
<literal>ASCII</literal>). Consider the following
- <literal>CONCAT()</literal> calls:
+ <function role="sql">CONCAT()</function> calls:
</para>
<programlisting>
@@ -2424,32 +2442,40 @@
string result as output, the output's character set and
collation are the same as those of the principal input value.
For example,
- <literal>UPPER(<replaceable>X</replaceable>)</literal>
returns
- a string whose character string and collation are the same as
- that of <replaceable>X</replaceable>. The same applies for
- <literal>INSTR()</literal>, <literal>LCASE()</literal>,
- <literal>LOWER()</literal>, <literal>LTRIM()</literal>,
- <literal>MID()</literal>, <literal>REPEAT()</literal>,
- <literal>REPLACE()</literal>,
<literal>REVERSE()</literal>,
- <literal>RIGHT()</literal>, <literal>RPAD()</literal>,
- <literal>RTRIM()</literal>,
<literal>SOUNDEX()</literal>,
- <literal>SUBSTRING()</literal>,
<literal>TRIM()</literal>,
- <literal>UCASE()</literal>, and
<literal>UPPER()</literal>.
+ <function
role="sql">UPPER(<replaceable>X</replaceable>)</function>
+ returns a string whose character string and collation are the
+ same as that of <replaceable>X</replaceable>. The same applies
+ for <function role="sql">INSTR()</function>,
+ <function role="sql">LCASE()</function>,
+ <function role="sql">LOWER()</function>,
+ <function role="sql">LTRIM()</function>,
+ <function role="sql">MID()</function>,
+ <function role="sql">REPEAT()</function>,
+ <function role="sql">REPLACE()</function>,
+ <function role="sql">REVERSE()</function>,
+ <function role="sql">RIGHT()</function>,
+ <function role="sql">RPAD()</function>,
+ <function role="sql">RTRIM()</function>,
+ <function role="sql">SOUNDEX()</function>,
+ <function role="sql">SUBSTRING()</function>,
+ <function role="sql">TRIM()</function>,
+ <function role="sql">UCASE()</function>, and
+ <function role="sql">UPPER()</function>.
</para>
<para>
- Note: The <literal>REPLACE()</literal> function, unlike all
- other functions, always ignores the collation of the string
- input and performs a case-sensitive comparison.
+ Note: The <function role="sql">REPLACE()</function> function,
+ unlike all other functions, always ignores the collation of
+ the string input and performs a case-sensitive comparison.
</para>
<para>
If a string input or function result is a binary string, the
string has no character set or collation. This can be checked
- by using the <literal>CHARSET()</literal> and
- <literal>COLLATION()</literal> functions, both of which return
- <literal>binary</literal> to indicate that their argument is a
- binary string:
+ by using the <function role="sql">CHARSET()</function> and
+ <function role="sql">COLLATION()</function> functions, both of
+ which return <literal>binary</literal> to indicate that their
+ argument is a binary string:
</para>
<programlisting>
@@ -2507,10 +2533,13 @@
For example, with <literal>CASE ... WHEN a THEN b WHEN b THEN
c COLLATE <replaceable>X</replaceable> END</literal>, the
resulting collation is <replaceable>X</replaceable>. The same
- applies for <literal>UNION</literal>,
<literal>||</literal>,
- <literal>CONCAT()</literal>, <literal>ELT()</literal>,
- <literal>GREATEST()</literal>, <literal>IF()</literal>,
and
- <literal>LEAST()</literal>.
+ applies for <literal>UNION</literal>,
+ <function role="sqlop" condition="operator_or">||</function>,
+ <function role="sql">CONCAT()</function>,
+ <function role="sql">ELT()</function>,
+ <function role="sql">GREATEST()</function>,
+ <function role="sql">IF()</function>, and
+ <function role="sql">LEAST()</function>.
</para>
<para>
@@ -2519,16 +2548,19 @@
operations are defined by the
<literal>character_set_connection</literal> and
<literal>collation_connection</literal> system variables. This
- applies only to <literal>CAST()</literal>,
- <literal>CONV()</literal>, <literal>FORMAT()</literal>,
- <literal>HEX()</literal>, and
<literal>SPACE()</literal>.
+ applies only to <function role="sql">CAST()</function>,
+ <function role="sql">CONV()</function>,
+ <function role="sql">FORMAT()</function>,
+ <function role="sql">HEX()</function>, and
+ <function role="sql">SPACE()</function>.
</para>
<para>
If you are uncertain about the character set or collation of
the result returned by a string function, you can use the
- <literal>CHARSET()</literal> or
<literal>COLLATE()</literal>
- function to find out:
+ <function role="sql">CHARSET()</function> or
+ <function role="sql">COLLATION()</function> function to find
+ out:
</para>
<programlisting>
@@ -2544,11 +2576,12 @@
<section id="charset-convert">
- <title><literal>CONVERT()</literal> and
<literal>CAST()</literal></title>
+ <title><function role="sql">CONVERT()</function> and
+ <function role="sql">CAST()</function></title>
<para>
- <literal>CONVERT()</literal> provides a way to convert data
- between different character sets. The syntax is:
+ <function role="sql">CONVERT()</function> provides a way to
+ convert data between different character sets. The syntax is:
</para>
<programlisting>
@@ -2571,13 +2604,13 @@
</programlisting>
<para>
- <literal>CONVERT(... USING ...)</literal> is implemented
- according to the standard SQL specification.
+ <function role="sql">CONVERT(... USING ...)</function> is
+ implemented according to the standard SQL specification.
</para>
<para>
- You may also use <literal>CAST()</literal> to convert a string
- to a different character set. The syntax is:
+ You may also use <function role="sql">CAST()</function> to
+ convert a string to a different character set. The syntax is:
</para>
<programlisting>
@@ -2593,22 +2626,23 @@
</programlisting>
<para>
- If you use <literal>CAST()</literal> without specifying
- <literal>CHARACTER SET</literal>, the resulting character set
- and collation are defined by the
+ If you use <function role="sql">CAST()</function> without
+ specifying <literal>CHARACTER SET</literal>, the resulting
+ character set and collation are defined by the
<literal>character_set_connection</literal> and
<literal>collation_connection</literal> system variables. If
- you use <literal>CAST()</literal> with <literal>CHARACTER SET
- X</literal>, the resulting character set and collation are
- <literal>X</literal> and the default collation of
- <literal>X</literal>.
+ you use <function role="sql">CAST()</function> with
+ <literal>CHARACTER SET X</literal>, the resulting character
+ set and collation are <literal>X</literal> and the default
+ collation of <literal>X</literal>.
</para>
<para>
You may not use a <literal>COLLATE</literal> clause inside a
- <literal>CAST()</literal>, but you may use it outside. That
- is, <literal>CAST(... COLLATE ...)</literal> is illegal, but
- <literal>CAST(...) COLLATE ...</literal> is legal.
+ <function role="sql">CAST()</function>, but you may use it
+ outside. That is, <function role="sql">CAST(... COLLATE
+ ...)</function> is illegal, but <function role="sql">CAST(...)
+ COLLATE ...</function> is legal.
</para>
<para>
@@ -2931,11 +2965,13 @@
<para>
The metadata requirements mean that the return values of the
- <literal>USER()</literal>,
<literal>CURRENT_USER()</literal>,
- <literal>SESSION_USER()</literal>,
- <literal>SYSTEM_USER()</literal>,
<literal>DATABASE()</literal>,
- and <literal>VERSION()</literal> functions have the UTF-8
- character set by default.
+ <function role="sql">USER()</function>,
+ <function role="sql">CURRENT_USER()</function>,
+ <function role="sql">SESSION_USER()</function>,
+ <function role="sql">SYSTEM_USER()</function>,
+ <function role="sql">DATABASE()</function>, and
+ <function role="sql">VERSION()</function> functions have the
+ UTF-8 character set by default.
</para>
<para>
@@ -2989,9 +3025,10 @@
</para>
<para>
- If you are using (for example) the <literal>USER()</literal>
- function for comparison or assignment within a single statement,
- don't worry. MySQL performs some automatic conversion for you.
+ If you are using (for example) the
+ <function role="sql">USER()</function> function for comparison
+ or assignment within a single statement, don't worry. MySQL
+ performs some automatic conversion for you.
</para>
<programlisting>
@@ -3009,10 +3046,11 @@
</programlisting>
<para>
- This works because the contents of <literal>USER()</literal> are
- automatically converted to <literal>latin1</literal> before the
- assignment. Automatic conversion is not fully implemented yet,
- but should work correctly in a later version.
+ This works because the contents of
+ <function role="sql">USER()</function> are automatically
+ converted to <literal>latin1</literal> before the assignment.
+ Automatic conversion is not fully implemented yet, but should
+ work correctly in a later version.
</para>
<para>
@@ -3560,25 +3598,27 @@
</remark>
<para>
- The most significant feature in
- <literal>utf8_unicode_ci</literal> is that it supports
- expansions; that is, when one character compares as equal to
- combinations of other characters. For example, in German and
- some other languages
<quote><literal>ß</literal></quote> is
- equal to <quote><literal>ss</literal></quote>.
+ For any Unicode character set, operations performed using the
+ <literal>_general_ci</literal> collation are faster than those
+ for the <literal>_unicode_ci</literal> collation. For example,
+ comparisons for the <literal>utf8_general_ci</literal>
+ collation are faster, but slightly less correct, than
+ comparisons for <literal>utf8_unicode_ci</literal>. The reason
+ for this is that <literal>utf8_unicode_ci</literal> supports
+ mappings such as expansions; that is, when one character
+ compares as equal to combinations of other characters. For
+ example, in German and some other languages
+ <quote><literal>ß</literal></quote> is equal to
+ <quote><literal>ss</literal></quote>.
+ <literal>utf8_unicode_ci</literal> also supports contractions
+ and ignorable characters. <literal>utf8_general_ci</literal>
+ is a legacy collation that does not support expansions,
+ contractions, or ignorable characters. It can make only
+ one-to-one comparisons between characters.
</para>
<para>
- <literal>utf8_general_ci</literal> is a legacy collation that
- does not support expansions. It can make only one-to-one
- comparisons between characters. This means that comparisons
- for the <literal>utf8_general_ci</literal> collation are
- faster, but slightly less correct, than comparisons for
- <literal>utf8_unicode_ci</literal>.
- </para>
-
- <para>
- For example, the following equalities hold in both
+ To further illustrate, the following equalities hold in both
<literal>utf8_general_ci</literal> and
<literal>utf8_unicode_ci</literal> (for the effect this has in
comparisons or when doing searches, see
@@ -5938,14 +5978,15 @@
<para>
The current session time zone setting affects display and storage
of time values that are zone-sensitive. This includes the values
- displayed by functions such as <literal>NOW()</literal> or
- <literal>CURTIME()</literal>, and values stored in and retrieved
- from <literal>TIMESTAMP</literal> columns. Values for
- <literal>TIMESTAMP</literal> columns are converted from the
+ displayed by functions such as
+ <function role="sql">NOW()</function> or
+ <function role="sql">CURTIME()</function>, and values stored in
+ and retrieved from <literal>TIMESTAMP</literal> columns. Values
+ for <literal>TIMESTAMP</literal> columns are converted from the
current time zone to UTC for storage, and from UTC to the current
time zone for retrieval. The current time zone setting does not
affect values displayed by functions such as
- <literal>UTC_TIMESTAMP()</literal> or values in
+ <function role="sql">UTC_TIMESTAMP()</function> or values in
<literal>DATE</literal>, <literal>TIME</literal>, or
<literal>DATETIME</literal> columns.
</para>
@@ -6313,8 +6354,9 @@
<literal>lc_time_names</literal> system variable controls the
language used to display day and month names and abbreviations.
This variable affects the output from the
- <literal>DATE_FORMAT()</literal>,
<literal>DAYNAME()</literal> and
- <literal>MONTHNAME()</literal> functions.
+ <function role="sql">DATE_FORMAT()</function>,
+ <function role="sql">DAYNAME()</function> and
+ <function role="sql">MONTHNAME()</function> functions.
</para>
<para>
@@ -6625,8 +6667,8 @@
<para>
<literal>lc_time_names</literal> currently does not affect the
- <literal>STR_TO_DATE()</literal> or
- <literal>GET_FORMAT()</literal> function.
+ <function role="sql">STR_TO_DATE()</function> or
+ <function role="sql">GET_FORMAT()</function> function.
</para>
</section>
Modified: trunk/pt/refman-5.1/triggers.xml
===================================================================
--- trunk/pt/refman-5.1/triggers.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/triggers.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 4, Lines Added: 13, Lines Deleted: 4; 2000 bytes
@@ -359,8 +359,9 @@
format (the same format used in the <literal>GRANT</literal>
statement). The <replaceable>user_name</replaceable> and
<replaceable>host_name</replaceable> values both are required.
- <literal>CURRENT_USER</literal> also can be given as
- <literal>CURRENT_USER()</literal>. The default
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ also can be given as
+ <function role="sql">CURRENT_USER()</function>. The default
<literal>DEFINER</literal> value is the user who executes the
<literal>CREATE TRIGGER</literal> statement. (This is the same as
<literal>DEFINER = CURRENT_USER</literal>.)
@@ -380,8 +381,8 @@
If you do not have the <literal>SUPER</literal> privilege, the
only legal <replaceable>user</replaceable> value is your own
account, either specified literally or by using
- <literal>CURRENT_USER</literal>. You cannot set the definer to
- some other account.
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>.
+ You cannot set the definer to some other account.
</para>
</listitem>
@@ -532,6 +533,10 @@
clause was added in MySQL 5.1.14.
</para>
+ <para>
+ Triggers for a table are also dropped if you drop the table.
+ </para>
+
<remark role="help-description-end"/>
<note>
@@ -692,6 +697,10 @@
</programlisting>
<para>
+ Triggers for a table are also dropped if you drop the table.
+ </para>
+
+ <para>
Trigger names exist in the schema namespace, meaning that all
triggers must have unique names within a schema. Triggers in
different schemas can have the same name.
Modified: trunk/pt/refman-5.1/tutorial.xml
===================================================================
--- trunk/pt/refman-5.1/tutorial.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/tutorial.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 10, Lines Added: 47, Lines Deleted: 36; 7229 bytes
@@ -1397,8 +1397,9 @@
</programlisting>
<para>
- The preceding query uses the <literal>AND</literal> logical
- operator. There is also an <literal>OR</literal> operator:
+ The preceding query uses the
+ <function role="sqlop">AND</function> logical operator. There
+ is also an <function role="sqlop">OR</function> operator:
</para>
<programlisting>
@@ -1413,11 +1414,12 @@
</programlisting>
<para>
- <literal>AND</literal> and <literal>OR</literal> may be
- intermixed, although <literal>AND</literal> has higher
- precedence than <literal>OR</literal>. If you use both
- operators, it is a good idea to use parentheses to indicate
- explicitly how conditions should be grouped:
+ <function role="sqlop">AND</function> and
+ <function role="sqlop">OR</function> may be intermixed,
+ although <function role="sqlop">AND</function> has higher
+ precedence than <function role="sqlop">OR</function>. If you
+ use both operators, it is a good idea to use parentheses to
+ indicate explicitly how conditions should be grouped:
</para>
<programlisting>
@@ -1725,15 +1727,17 @@
</programlisting>
<para>
- Here, <literal>YEAR()</literal> pulls out the year part of a
- date and <literal>RIGHT()</literal> pulls off the rightmost
- five characters that represent the <literal>MM-DD</literal>
- (calendar year) part of the date. The part of the expression
- that compares the <literal>MM-DD</literal> values evaluates to
- 1 or 0, which adjusts the year difference down a year if
- <literal>CURDATE()</literal> occurs earlier in the year than
- <literal>birth</literal>. The full expression is somewhat
- ungainly, so an <emphasis>alias</emphasis>
+ Here, <function role="sql">YEAR()</function> pulls out the
+ year part of a date and
+ <function role="sql">RIGHT()</function> pulls off the
+ rightmost five characters that represent the
+ <literal>MM-DD</literal> (calendar year) part of the date. The
+ part of the expression that compares the
+ <literal>MM-DD</literal> values evaluates to 1 or 0, which
+ adjusts the year difference down a year if
+ <function role="sql">CURDATE()</function> occurs earlier in
+ the year than <literal>birth</literal>. The full expression is
+ somewhat ungainly, so an <emphasis>alias</emphasis>
(<literal>age</literal>) is used to make the output column
label more meaningful.
</para>
@@ -1829,11 +1833,13 @@
irrelevant; you simply want to extract the month part of the
<literal>birth</literal> column. MySQL provides several
functions for extracting parts of dates, such as
- <literal>YEAR()</literal>, <literal>MONTH()</literal>,
and
- <literal>DAYOFMONTH()</literal>.
<literal>MONTH()</literal> is
- the appropriate function here. To see how it works, run a
- simple query that displays the value of both
- <literal>birth</literal> and
<literal>MONTH(birth)</literal>:
+ <function role="sql">YEAR()</function>,
+ <function role="sql">MONTH()</function>, and
+ <function role="sql">DAYOFMONTH()</function>.
+ <function role="sql">MONTH()</function> is the appropriate
+ function here. To see how it works, run a simple query that
+ displays the value of both <literal>birth</literal> and
+ <literal>MONTH(birth)</literal>:
</para>
<programlisting>
@@ -1883,9 +1889,10 @@
current month is, so that you do not have to use the number
for a particular month. <literal>DATE_ADD()</literal> allows
you to add a time interval to a given date. If you add a month
- to the value of <literal>CURDATE()</literal>, then extract the
- month part with <literal>MONTH()</literal>, the result
- produces the month in which to look for birthdays:
+ to the value of <function role="sql">CURDATE()</function>,
+ then extract the month part with
+ <function role="sql">MONTH()</function>, the result produces
+ the month in which to look for birthdays:
</para>
<programlisting>
@@ -1911,9 +1918,10 @@
<literal>1</literal> and <literal>12</literal>. And
<literal>MOD(something,12)</literal> returns a number between
<literal>0</literal> and <literal>11</literal>. So the
- addition has to be after the <literal>MOD()</literal>,
- otherwise we would go from November (<literal>11</literal>) to
- January (<literal>1</literal>).
+ addition has to be after the
+ <function role="sql">MOD()</function>, otherwise we would go
+ from November (<literal>11</literal>) to January
+ (<literal>1</literal>).
</para>
</section>
@@ -1952,8 +1960,10 @@
<para>
Clearly you get no meaningful results from these comparisons.
- Use the <literal>IS NULL</literal> and <literal>IS NOT
- NULL</literal> operators instead:
+ Use the <function role="sqlop">IS NULL</function> and
+ <function
+role="sqlop">IS NOT NULL</function> operators
+ instead:
</para>
<programlisting>
@@ -2795,7 +2805,7 @@
You have previously seen <literal>SHOW DATABASES</literal>, which
lists the databases managed by the server. To find out which
database is currently selected, use the
- <literal>DATABASE()</literal> function:
+ <function role="sql">DATABASE()</function> function:
</para>
<programlisting>
@@ -3570,13 +3580,14 @@
</indexterm>
<para>
- An <literal>OR</literal> using a single key is well optimized,
- as is the handling of <literal>AND</literal>.
+ An <function role="sqlop">OR</function> using a single key is
+ well optimized, as is the handling of
+ <function role="sqlop">AND</function>.
</para>
<para>
The one tricky case is that of searching on two different keys
- combined with <literal>OR</literal>:
+ combined with <function role="sqlop">OR</function>:
</para>
<programlisting>
@@ -3770,9 +3781,9 @@
<literal>AUTO_INCREMENT</literal> on a secondary column in a
multiple-column index. In this case, the generated value for the
<literal>AUTO_INCREMENT</literal> column is calculated as
- <literal>MAX(<replaceable>auto_increment_column</replaceable>)
+
- 1 WHERE
- prefix=<replaceable>given-prefix</replaceable></literal>. This
+ <function
role="sql">MAX(<replaceable>auto_increment_column</replaceable>)
+ + 1 WHERE
+ prefix=<replaceable>given-prefix</replaceable></function>. This
is useful when you want to put data into ordered groups.
</para>
Modified: trunk/pt/refman-5.1/versions.ent
===================================================================
--- trunk/pt/refman-5.1/versions.ent 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/versions.ent 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 1, Lines Added: 3, Lines Deleted: 3; 1058 bytes
@@ -6,6 +6,6 @@
<!ENTITY title-refman-previous "MySQL 5.0 Reference Manual"><!-- Title of Manual
previous edition -->
<!ENTITY current-series "5.1"><!-- Current MySQL release series -->
<!ENTITY previous-series "5.0"><!-- Previous MySQL release series -->
-<!ENTITY next-series "5.2"><!-- Next MySQL release series -->
-<!ENTITY current-version "5.1.22-rc"><!-- Current MySQL version - update with
new releases -->
-<!ENTITY current-maturity "beta"><!-- Current maturity level: alpha, beta,
release candidate, production -->
+<!ENTITY next-series "6.0"><!-- Next MySQL release series -->
+<!ENTITY current-version "5.1.23-rc"><!-- Current MySQL version - update with
new releases -->
+<!ENTITY current-maturity "release candidate"><!-- Current maturity level:
alpha, beta, release candidate, production -->
Modified: trunk/pt/refman-5.1/views.xml
===================================================================
--- trunk/pt/refman-5.1/views.xml 2007-12-08 00:39:31 UTC (rev 9207)
+++ trunk/pt/refman-5.1/views.xml 2007-12-08 00:39:43 UTC (rev 9208)
Changed blocks: 12, Lines Added: 88, Lines Deleted: 64; 12011 bytes
@@ -148,24 +148,41 @@
<remark role="help-description-begin"/>
<para>
- This statement creates a new view, or replaces an existing one if
- the <literal>OR REPLACE</literal> clause is given. If the view
- does not exist, <literal>CREATE OR REPLACE VIEW</literal> is the
- same as <literal>CREATE VIEW</literal>. If the view does exist,
- <literal>CREATE OR REPLACE VIEW</literal> is the same as
- <literal>ALTER VIEW</literal>. The
- <replaceable>select_statement</replaceable> is a
+ The <literal>CREATE VIEW</literal> statement creates a new view,
+ or replaces an existing one if the <literal>OR REPLACE</literal>
+ clause is given. If the view does not exist, <literal>CREATE OR
+ REPLACE VIEW</literal> is the same as <literal>CREATE
+ VIEW</literal>. If the view does exist, <literal>CREATE OR REPLACE
+ VIEW</literal> is the same as <literal>ALTER VIEW</literal>.
+ </para>
+
+ <para>
+ The <replaceable>select_statement</replaceable> is a
<literal>SELECT</literal> statement that provides the definition
- of the view. The statement can select from base tables or other
- views.
+ of the view. (When you select from the view, you select in effect
+ using the <literal>SELECT</literal> statement.)
+ <replaceable>select_statement</replaceable> can select from base
+ tables or other views.
</para>
<para>
- This statement requires the <literal>CREATE VIEW</literal>
- privilege for the view, and some privilege for each column
- selected by the <literal>SELECT</literal> statement. For columns
- used elsewhere in the <literal>SELECT</literal> statement you must
- have the <literal>SELECT</literal> privilege. If the <literal>OR
+ The <literal>ALGORITHM</literal> clause affects how MySQL
+ processes the view. The <literal>DEFINER</literal> and
+ <literal>SQL SECURITY</literal> clauses specify the security
+ context to be used when checking access privileges at view
+ invocation time. The <literal>WITH CHECK OPTION</literal> clause
+ can be given to constrain inserts or updates to rows in tables
+ referenced by the view. These clauses are described later in this
+ section.
+ </para>
+
+ <para>
+ The <literal>CREATE VIEW</literal> statement requires the
+ <literal>CREATE VIEW</literal> privilege for the view, and some
+ privilege for each column selected by the
+ <literal>SELECT</literal> statement. For columns used elsewhere in
+ the <literal>SELECT</literal> statement you must have the
+ <literal>SELECT</literal> privilege. If the <literal>OR
REPLACE</literal> clause is present, you must also have the
<literal>DROP</literal> privilege for the view.
</para>
@@ -369,23 +386,13 @@
</para>
<para>
- <literal>CURRENT_USER</literal> also can be given as
- <literal>CURRENT_USER()</literal>.
- </para>
-
- <para>
- Within a stored routine that is defined with the <literal>SQL
- SECURITY DEFINER</literal> characteristic,
- <literal>CURRENT_USER</literal> returns the routine creator. This
- also affects a view defined within such a routine, if the view
- definition contains a <literal>DEFINER</literal> value of
- <literal>CURRENT_USER</literal>.
- </para>
-
- <para>
The default <literal>DEFINER</literal> value is the user who
- executes the <literal>CREATE VIEW</literal> statement. (This is
- the same as <literal>DEFINER = CURRENT_USER</literal>.) If a
+ executes the <literal>CREATE VIEW</literal> statement. This is the
+ same as specifying <literal>DEFINER = CURRENT_USER</literal>
+ explicitly.
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ also can be given as
+ <function role="sql">CURRENT_USER()</function>. If a
<replaceable>user</replaceable> value is given, it should be a
MySQL account in
<literal>'<replaceable>user_name</replaceable>'@'<replaceable>host_name</replaceable>'</literal>
@@ -408,8 +415,8 @@
If you do not have the <literal>SUPER</literal> privilege, the
only legal <replaceable>user</replaceable> value is your own
account, either specified literally or by using
- <literal>CURRENT_USER</literal>. You cannot set the definer to
- some other account.
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>.
+ You cannot set the definer to some other account.
</para>
</listitem>
@@ -424,13 +431,26 @@
</itemizedlist>
<para>
+ Within a stored routine that is defined with the <literal>SQL
+ SECURITY DEFINER</literal> characteristic,
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>
+ returns the routine creator. This also affects a view defined
+ within such a routine, if the view definition contains a
+ <literal>DEFINER</literal> value of
+ <function role="sql"
condition="function_current-user">CURRENT_USER</function>.
+ </para>
+
+ <para>
The <literal>SQL SECURITY</literal> characteristic determines
which MySQL account to use when checking access privileges for the
- view when the view is executed. The legal characteristic values
- are <literal>DEFINER</literal> and
<literal>INVOKER</literal>.
- These indicate that the view must be executable by the user who
- defined it or invoked it, respectively. The default <literal>SQL
- SECURITY</literal> value is <literal>DEFINER</literal>.
+ view when a statement is executed that references the view. The
+ legal characteristic values are <literal>DEFINER</literal> and
+ <literal>INVOKER</literal>. These indicate that the required
+ privileges must be held by the user who defined or invoked the
+ view, respectively. The default <literal>SQL SECURITY</literal>
+ value is <literal>DEFINER</literal>. If the value is
+ <literal>DEFINER</literal> but the definer account does not exist
+ when the view is referenced, an error occurs.
</para>
<para>
@@ -445,7 +465,9 @@
<para>
At view definition time, the view creator must have the
privileges needed to use the top-level objects accessed by the
- view. For example, if the view definition refers to a stored
+ view. For example, if the view definition refers to table
+ columns, the creator must have privileges for the columns, as
+ described previously. If the definition refers to a stored
function, only the privileges needed to invoke the function
can be checked. The privileges required when the function runs
can be checked only as it executes: For different invocations
@@ -456,8 +478,8 @@
<listitem>
<para>
- At view execution time, privileges for objects accessed by the
- view are checked against the privileges held by the view
+ When a view is referenced, privileges for objects accessed by
+ the view are checked against the privileges held by the view
creator or invoker, depending on whether the <literal>SQL
SECURITY</literal> characteristic is
<literal>DEFINER</literal> or
<literal>INVOKER</literal>,
@@ -467,7 +489,7 @@
<listitem>
<para>
- If view execution causes execution of a stored function,
+ If reference to a view causes execution of a stored function,
privilege checking for statements executed within the function
depend on whether the function is defined with a <literal>SQL
SECURITY</literal> characteristic of
@@ -518,10 +540,10 @@
<literal>f()</literal> executes. This might mean that privileges
are needed for <literal>p1()</literal> or
<literal>p2()</literal>,
depending on the execution path within <literal>f()</literal>.
- Those privileges need to be checked at runtime, and the user who
- must possess the privileges is determined by the <literal>SQL
- SECURITY</literal> values of the function <literal>f()</literal>
- and the view <literal>v</literal>.
+ Those privileges must be checked at runtime, and the user who must
+ possess the privileges is determined by the <literal>SQL
+ SECURITY</literal> values of the view <literal>v</literal> and
the
+ function <literal>f()</literal>.
</para>
<para>
@@ -532,24 +554,23 @@
</para>
<para>
- If you invoke a view that was created before MySQL 5.0.13/5.1.2,
- it is treated as though it was created with a <literal>SQL
- SECURITY DEFINER</literal> clause and with a
- <literal>DEFINER</literal> value that is the same as your account.
- However, because the actual definer is unknown, MySQL issues a
- warning. To make the warning go away, it is sufficient to
- re-create the view so that the view definition includes a
- <literal>DEFINER</literal> clause.
+ If you invoke a view that was created before MySQL 5.1.2, it is
+ treated as though it was created with a <literal>SQL SECURITY
+ DEFINER</literal> clause and with a <literal>DEFINER</literal>
+ value that is the same as your account. However, because the
+ actual definer is unknown, MySQL issues a warning. To make the
+ warning go away, it is sufficient to re-create the view so that
+ the view definition includes a <literal>DEFINER</literal> clause.
</para>
<para>
The optional <literal>ALGORITHM</literal> clause is a MySQL
- extension to standard SQL. <literal>ALGORITHM</literal> takes
- three values: <literal>MERGE</literal>,
- <literal>TEMPTABLE</literal>, or
<literal>UNDEFINED</literal>. The
- default algorithm is <literal>UNDEFINED</literal> if no
- <literal>ALGORITHM</literal> clause is present. The algorithm
- affects how MySQL processes the view.
+ extension to standard SQL. It affects how MySQL processes the
+ view. <literal>ALGORITHM</literal> takes three values:
+ <literal>MERGE</literal>, <literal>TEMPTABLE</literal>, or
+ <literal>UNDEFINED</literal>. The default algorithm is
+ <literal>UNDEFINED</literal> if no
<literal>ALGORITHM</literal>
+ clause is present.
</para>
<para>
@@ -693,9 +714,10 @@
that <literal>vc1 < 100</literal> becomes <literal>c1
<
100</literal> and the view <literal>WHERE</literal> clause is
added to the statement <literal>WHERE</literal> clause using an
- <literal>AND</literal> connective (and parentheses are added to
- make sure the parts of the clause are executed with correct
- precedence). The resulting statement to be executed becomes:
+ <function role="sqlop">AND</function> connective (and parentheses
+ are added to make sure the parts of the clause are executed with
+ correct precedence). The resulting statement to be executed
+ becomes:
</para>
<programlisting>
@@ -724,7 +746,8 @@
<listitem>
<para>
Aggregate functions (<function role="sql">SUM()</function>,
- <literal>MIN()</literal>, <literal>MAX()</literal>,
+ <function role="sql">MIN()</function>,
+ <function role="sql">MAX()</function>,
<function role="sql">COUNT()</function>, and so forth)
</para>
</listitem>
@@ -784,7 +807,8 @@
<listitem>
<para>
Aggregate functions (<function role="sql">SUM()</function>,
- <literal>MIN()</literal>, <literal>MAX()</literal>,
+ <function role="sql">MIN()</function>,
+ <function role="sql">MAX()</function>,
<function role="sql">COUNT()</function>, and so forth)
</para>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r9208 - in trunk: . it/refman-5.1 pt/refman-5.1 | paul | 8 Dec |