Author: paul
Date: 2006-01-28 20:13:38 +0100 (Sat, 28 Jan 2006)
New Revision: 1081
Log:
r6809@frost: paul | 2006-01-28 12:57:27 -0600
General revisions.
Modified:
trunk/
trunk/refman-4.1/sql-syntax.xml
trunk/refman-5.0/sql-syntax.xml
trunk/refman-5.1/sql-syntax.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6808
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2588
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6809
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2588
Modified: trunk/refman-4.1/sql-syntax.xml
===================================================================
--- trunk/refman-4.1/sql-syntax.xml 2006-01-28 19:13:23 UTC (rev 1080)
+++ trunk/refman-4.1/sql-syntax.xml 2006-01-28 19:13:38 UTC (rev 1081)
@@ -12503,29 +12503,48 @@
<remark role="help-description-end"/>
<para>
- The <literal>SET PASSWORD</literal> statement for assigning
- account passwords is described in See
- <xref linkend="set-password"/>.
+ <emphasis>Note</emphasis>: Older versions of MySQL employed
+ <literal>SET OPTION</literal>, but this usage is deprecated in
+ favor of <literal>SET</literal> without
+ <literal>OPTION</literal>.
</para>
<para>
- MySQL 4.0.3 added the <literal>GLOBAL</literal> and
- <literal>SESSION</literal> options, allowing most important
- system variables to be changed dynamically at runtime. The
- system variables that you can set at runtime are described in
- <xref linkend="dynamic-system-variables"/>.
+ Related uses of <literal>SET</literal>:
</para>
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <literal>SET PASSWORD</literal> assigns account passwords.
+ See <xref linkend="set-password"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>SET TRANSACTION ISOLATION LEVEL</literal> sets the
+ isolation level for transaction processing. See
+ <xref linkend="set-transaction"/>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
<para>
- <emphasis>Note</emphasis>: Older versions of MySQL employed
- <literal>SET OPTION</literal> for this statement, but this usage
- is now deprecated in favor of <literal>SET</literal> without
- <literal>OPTION</literal>.
+ MySQL 4.0.3 added the <literal>GLOBAL</literal> and
+ <literal>SESSION</literal> options, allowing you to change most
+ important system variables dynamically at runtime. The system
+ variables that can be set dynamically are described in
+ <xref linkend="dynamic-system-variables"/>.
</para>
<para>
- The following example show the different syntaxes you can use to
- set variables.
+ The following discussion shows the different syntaxes you can
+ use to set variables. The examples use the <literal>=</literal>
+ assignment operator. The <literal>:=</literal> operator also is
+ allowable.
</para>
<para>
@@ -12539,8 +12558,8 @@
</programlisting>
<para>
- Further information about user variables is given in
- <xref linkend="user-variables"/>.
+ <xref linkend="user-variables"/>, provides further information
+ about user variables.
</para>
<para>
@@ -12558,6 +12577,11 @@
</para>
<para>
+ The <literal>SUPER</literal> privilege is required to set global
+ variables.
+ </para>
+
+ <para>
The <literal>@@<replaceable>var_name</replaceable></literal>
syntax for system variables is supported to make MySQL syntax
compatible with some other database systems.
@@ -12579,27 +12603,25 @@
</programlisting>
<para>
- If you set a system variable using <literal>SESSION</literal>
- (the default), the value remains in effect until the current
- session ends or until you set the variable to a different value.
- If you set a system variable using <literal>GLOBAL</literal>,
- which requires the <literal>SUPER</literal> privilege, the value
- is remembered and used for new connections until the server
- restarts. If you want to make a variable setting permanent, you
- should put it in an option file. See
- <xref linkend="option-files"/>.
+ If you set a session system variable, the value remains in
+ effect until the current session ends or until you set the
+ variable to a different value. If you set a global system
+ variable, the value is remembered and used for new connections
+ until the server restarts. If you want to make a global system
+ variable setting permanent, you should set it in an option file.
+ See <xref linkend="option-files"/>.
</para>
<para>
To prevent incorrect usage, MySQL produces an error if you use
<literal>SET GLOBAL</literal> with a variable that can only be
used with <literal>SET SESSION</literal> or if you do not
- specify <literal>GLOBAL</literal> (or <literal>@@</literal>)
- when setting a global variable.
+ specify <literal>GLOBAL</literal> (or
+ <literal>@@global.</literal>) when setting a global variable.
</para>
<para>
- If you want to set a <literal>SESSION</literal> variable to the
+ To set a <literal>SESSION</literal> variable to the
<literal>GLOBAL</literal> value or a <literal>GLOBAL</literal>
value to the compiled-in MySQL default value, use the
<literal>DEFAULT</literal> keyword. For example, the following
@@ -12613,6 +12635,12 @@
</programlisting>
<para>
+ Not all system variables can be set to
+ <literal>DEFAULT</literal>. In such cases, use of
+ <literal>DEFAULT</literal> results in an error.
+ </para>
+
+ <para>
You can get a list of most system variables with <literal>SHOW
VARIABLES</literal>. (See <xref linkend="show-variables"/>. To
obtain a specific variable name or list of names that match a
@@ -12630,32 +12658,31 @@
</para>
<programlisting>
-SHOW VARIABLES LIKE 'have%';
-SHOW GLOBAL VARIABLES LIKE 'have%';
+SHOW VARIABLES LIKE '%size%';
+SHOW GLOBAL VARIABLES LIKE '%size%';
</programlisting>
<para>
- The wildcard character can be used in any position within the
+ Wildcard characters can be used in any position within the
pattern to be matched.
</para>
<para>
- You can also get the value for a specific value by using the
- <literal>@@[global.|local.]var_name</literal> syntax with
- <literal>SELECT</literal>:
+ You can also use <literal>SELECT</literal> to get the value for
+ a specific system variable by using the
+ <literal>@@[global.|session.]<replaceable>var_name</replaceable></literal>
+ syntax:
</para>
<programlisting>
-SELECT @@max_join_size, @@global.max_join_size;
+SELECT @@global.max_join_size, @@session.max_join_size;
</programlisting>
<para>
When you retrieve a variable with <literal>SELECT
- @@var_name</literal> (that is, you do not specify
- <literal>global.</literal>, <literal>session.</literal>, or
- <literal>local.</literal>), MySQL returns the
- <literal>SESSION</literal> value if it exists and the
- <literal>GLOBAL</literal> value otherwise.
+ @@<replaceable>var_name</replaceable></literal> (with no
+ modifier), MySQL returns the <literal>SESSION</literal> value if
+ it exists and the <literal>GLOBAL</literal> value otherwise.
</para>
<para>
@@ -12694,13 +12721,15 @@
changes to a table take effect immediately. If set to
<literal>0</literal>, you have to use
<literal>COMMIT</literal> to accept a transaction or
- <literal>ROLLBACK</literal> to cancel it. If you change
- <literal>AUTOCOMMIT</literal> mode from <literal>0</literal>
- to <literal>1</literal>, MySQL performs an automatic
- <literal>COMMIT</literal> of any open transaction. Another
- way to begin a transaction is to use a <literal>START
- TRANSACTION</literal> or <literal>BEGIN</literal> statement.
- See <xref linkend="commit"/>.
+ <literal>ROLLBACK</literal> to cancel it. By default, client
+ connections begin with <literal>AUTOCOMMENT</literal> set to
+ 1. If you change <literal>AUTOCOMMIT</literal> mode from
+ <literal>0</literal> to <literal>1</literal>, MySQL performs
+ an automatic <literal>COMMIT</literal> of any open
+ transaction. Another way to begin a transaction is to use a
+ <literal>START TRANSACTION</literal> or
+ <literal>BEGIN</literal> statement. See
+ <xref linkend="commit"/>.
</para>
</listitem>
@@ -12792,7 +12821,7 @@
</para>
<para>
- The variable is a synonym for the
+ This variable is a synonym for the
<literal>LAST_INSERT_ID</literal> variable. It exists for
compatibility with other database systems. As of MySQL
3.23.25, you can read its value with <literal>SELECT
@@ -12873,7 +12902,7 @@
</para>
<para>
- This is not a server system variable, but it can be used to
+ This option is a modifier, not a variable. It can be used to
influence the effect of variables that set the character
set, the collation, and the time zone.
<literal>ONE_SHOT</literal> is primarily used for
@@ -12898,13 +12927,11 @@
<para>
If <literal>ONE_SHOT</literal> is used with the allowed
- variables, it changes the variables as requested, but
- resets, after the next statement, all character set,
- collation, and time zone-related server system variables.
- The only exception when resetting doesn't happen is when the
- next statement is a <literal>SET</literal> statement. In
- other words, resetting takes place after the next
- non-<literal>SET</literal> statement. Example:
+ variables, it changes the variables as requested, but only
+ for the next non-<literal>SET</literal> statement. After
+ that, the server resets all character set, collation, and
+ time zone-related system variables to their previous values.
+ Example:
</para>
<programlisting>
@@ -13052,13 +13079,15 @@
</para>
<para>
- If set to <literal>1</literal>, <literal>SHOW CREATE
- TABLE</literal> quotes table and column names. If set to
- <literal>0</literal>, quoting is disabled. This option is
- enabled by default so that replication works for tables with
- table and column names that require quoting. This variable
- was added in MySQL 3.23.26.
- <xref linkend="show-create-table"/>.
+ If set to <literal>1</literal>, the server quotes
+ identifiers for <literal>SHOW CREATE TABLE</literal> and
+ <literal>SHOW CREATE DATABASE</literal> statements. If set
+ to <literal>0</literal>, quoting is disabled. This option is
+ enabled by default so that replication works for identifiers
+ that require quoting. See
+ <xref linkend="show-create-table"/>, and
+ <xref linkend="show-create-database"/>. This variable was
+ added in MySQL 3.23.26.
</para>
</listitem>
Modified: trunk/refman-5.0/sql-syntax.xml
===================================================================
--- trunk/refman-5.0/sql-syntax.xml 2006-01-28 19:13:23 UTC (rev 1080)
+++ trunk/refman-5.0/sql-syntax.xml 2006-01-28 19:13:38 UTC (rev 1081)
@@ -13661,30 +13661,57 @@
<remark role="help-description-end"/>
<para>
- The <literal>SET PASSWORD</literal> statement for assigning
- account passwords is described in See
- <xref linkend="set-password"/>.
+ <emphasis>Note</emphasis>: Older versions of MySQL employed
+ <literal>SET OPTION</literal>, but this usage is deprecated in
+ favor of <literal>SET</literal> without
+ <literal>OPTION</literal>.
</para>
<para>
+ Related uses of <literal>SET</literal>:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <literal>SET PASSWORD</literal> assigns account passwords.
+ See <xref linkend="set-password"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>SET TRANSACTION ISOLATION LEVEL</literal> sets the
+ isolation level for transaction processing. See
+ <xref linkend="set-transaction"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>SET</literal> is used within stored routines to
+ assign values to local routine variables. See
+ <xref linkend="set-statement"/>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
Most system variables can be changed at runtime. The system
variables that can be set dynamically are described in
<xref linkend="dynamic-system-variables"/>.
</para>
<para>
- <emphasis>Note</emphasis>: Older versions of MySQL employed
- <literal>SET OPTION</literal> for this statement, but this usage
- is now deprecated in favor of <literal>SET</literal> without
- <literal>OPTION</literal>.
+ The following discussion shows the different syntaxes you can
+ use to set variables. The examples use the <literal>=</literal>
+ assignment operator. The <literal>:=</literal> operator also is
+ allowable.
</para>
<para>
- The following example show the different syntaxes you can use to
- set variables.
- </para>
-
- <para>
A user variable is written as
<literal>@<replaceable>var_name</replaceable></literal> and can
be set as follows:
@@ -13695,8 +13722,8 @@
</programlisting>
<para>
- Further information about user variables is given in
- <xref linkend="user-variables"/>.
+ <xref linkend="user-variables"/>, provides further information
+ about user variables.
</para>
<para>
@@ -13714,6 +13741,11 @@
</para>
<para>
+ The <literal>SUPER</literal> privilege is required to set global
+ variables.
+ </para>
+
+ <para>
The <literal>@@<replaceable>var_name</replaceable></literal>
syntax for system variables is supported to make MySQL syntax
compatible with some other database systems.
@@ -13735,27 +13767,25 @@
</programlisting>
<para>
- If you set a system variable using <literal>SESSION</literal>
- (the default), the value remains in effect until the current
- session ends or until you set the variable to a different value.
- If you set a system variable using <literal>GLOBAL</literal>,
- which requires the <literal>SUPER</literal> privilege, the value
- is remembered and used for new connections until the server
- restarts. If you want to make a variable setting permanent, you
- should put it in an option file. See
- <xref linkend="option-files"/>.
+ If you set a session system variable, the value remains in
+ effect until the current session ends or until you set the
+ variable to a different value. If you set a global system
+ variable, the value is remembered and used for new connections
+ until the server restarts. If you want to make a global system
+ variable setting permanent, you should set it in an option file.
+ See <xref linkend="option-files"/>.
</para>
<para>
To prevent incorrect usage, MySQL produces an error if you use
<literal>SET GLOBAL</literal> with a variable that can only be
used with <literal>SET SESSION</literal> or if you do not
- specify <literal>GLOBAL</literal> (or <literal>@@</literal>)
- when setting a global variable.
+ specify <literal>GLOBAL</literal> (or
+ <literal>@@global.</literal>) when setting a global variable.
</para>
<para>
- If you want to set a <literal>SESSION</literal> variable to the
+ To set a <literal>SESSION</literal> variable to the
<literal>GLOBAL</literal> value or a <literal>GLOBAL</literal>
value to the compiled-in MySQL default value, use the
<literal>DEFAULT</literal> keyword. For example, the following
@@ -13769,6 +13799,12 @@
</programlisting>
<para>
+ Not all system variables can be set to
+ <literal>DEFAULT</literal>. In such cases, use of
+ <literal>DEFAULT</literal> results in an error.
+ </para>
+
+ <para>
You can get a list of most system variables with <literal>SHOW
VARIABLES</literal>. (See <xref linkend="show-variables"/>.) To
obtain a specific variable name or list of names that match a
@@ -13786,32 +13822,31 @@
</para>
<programlisting>
-SHOW VARIABLES LIKE 'have%';
-SHOW GLOBAL VARIABLES LIKE 'have%';
+SHOW VARIABLES LIKE '%size%';
+SHOW GLOBAL VARIABLES LIKE '%size%';
</programlisting>
<para>
- The wildcard character can be used in any position within the
+ Wildcard characters can be used in any position within the
pattern to be matched.
</para>
<para>
- You can also get the value for a specific value by using the
- <literal>@@[global.|local.]var_name</literal> syntax with
- <literal>SELECT</literal>:
+ You can also use <literal>SELECT</literal> to get the value for
+ a specific system variable by using the
+ <literal>@@[global.|session.]<replaceable>var_name</replaceable></literal>
+ syntax:
</para>
<programlisting>
-SELECT @@max_join_size, @@global.max_join_size;
+SELECT @@global.max_join_size, @@session.max_join_size;
</programlisting>
<para>
When you retrieve a variable with <literal>SELECT
- @@var_name</literal> (that is, you do not specify
- <literal>global.</literal>, <literal>session.</literal>, or
- <literal>local.</literal>), MySQL returns the
- <literal>SESSION</literal> value if it exists and the
- <literal>GLOBAL</literal> value otherwise.
+ @@<replaceable>var_name</replaceable></literal> (with no
+ modifier), MySQL returns the <literal>SESSION</literal> value if
+ it exists and the <literal>GLOBAL</literal> value otherwise.
</para>
<para>
@@ -13850,13 +13885,15 @@
changes to a table take effect immediately. If set to
<literal>0</literal>, you have to use
<literal>COMMIT</literal> to accept a transaction or
- <literal>ROLLBACK</literal> to cancel it. If you change
- <literal>AUTOCOMMIT</literal> mode from <literal>0</literal>
- to <literal>1</literal>, MySQL performs an automatic
- <literal>COMMIT</literal> of any open transaction. Another
- way to begin a transaction is to use a <literal>START
- TRANSACTION</literal> or <literal>BEGIN</literal> statement.
- See <xref linkend="commit"/>.
+ <literal>ROLLBACK</literal> to cancel it. By default, client
+ connections begin with <literal>AUTOCOMMENT</literal> set to
+ 1. If you change <literal>AUTOCOMMIT</literal> mode from
+ <literal>0</literal> to <literal>1</literal>, MySQL performs
+ an automatic <literal>COMMIT</literal> of any open
+ transaction. Another way to begin a transaction is to use a
+ <literal>START TRANSACTION</literal> or
+ <literal>BEGIN</literal> statement. See
+ <xref linkend="commit"/>.
</para>
</listitem>
@@ -13985,7 +14022,7 @@
</para>
<para>
- The variable is a synonym for the
+ This variable is a synonym for the
<literal>LAST_INSERT_ID</literal> variable. It exists for
compatibility with other database systems. You can read its
value with <literal>SELECT @@IDENTITY</literal>, and set it
@@ -14064,7 +14101,7 @@
</para>
<para>
- This is not a server system variable, but it can be used to
+ This option is a modifier, not a variable. It can be used to
influence the effect of variables that set the character
set, the collation, and the time zone.
<literal>ONE_SHOT</literal> is primarily used for
@@ -14089,13 +14126,11 @@
<para>
If <literal>ONE_SHOT</literal> is used with the allowed
- variables, it changes the variables as requested, but
- resets, after the next statement, all character set,
- collation, and time zone-related server system variables.
- The only exception when resetting doesn't happen is when the
- next statement is a <literal>SET</literal> statement. In
- other words, resetting takes place after the next
- non-<literal>SET</literal> statement. Example:
+ variables, it changes the variables as requested, but only
+ for the next non-<literal>SET</literal> statement. After
+ that, the server resets all character set, collation, and
+ time zone-related system variables to their previous values.
+ Example:
</para>
<programlisting>
@@ -14239,12 +14274,14 @@
</para>
<para>
- If set to <literal>1</literal>, <literal>SHOW CREATE
- TABLE</literal> quotes table and column names. If set to
- <literal>0</literal>, quoting is disabled. This option is
- enabled by default so that replication works for tables with
- table and column names that require quoting. See
- <xref linkend="show-create-table"/>.
+ If set to <literal>1</literal>, the server quotes
+ identifiers for <literal>SHOW CREATE TABLE</literal> and
+ <literal>SHOW CREATE DATABASE</literal> statements. If set
+ to <literal>0</literal>, quoting is disabled. This option is
+ enabled by default so that replication works for identifiers
+ that require quoting. See
+ <xref linkend="show-create-table"/>, and
+ <xref linkend="show-create-database"/>.
</para>
</listitem>
Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml 2006-01-28 19:13:23 UTC (rev 1080)
+++ trunk/refman-5.1/sql-syntax.xml 2006-01-28 19:13:38 UTC (rev 1081)
@@ -14140,30 +14140,57 @@
<remark role="help-description-end"/>
<para>
- The <literal>SET PASSWORD</literal> statement for assigning
- account passwords is described in See
- <xref linkend="set-password"/>.
+ <emphasis>Note</emphasis>: Older versions of MySQL employed
+ <literal>SET OPTION</literal>, but this usage is deprecated in
+ favor of <literal>SET</literal> without
+ <literal>OPTION</literal>.
</para>
<para>
+ Related uses of <literal>SET</literal>:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <literal>SET PASSWORD</literal> assigns account passwords.
+ See <xref linkend="set-password"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>SET TRANSACTION ISOLATION LEVEL</literal> sets the
+ isolation level for transaction processing. See
+ <xref linkend="set-transaction"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>SET</literal> is used within stored routines to
+ assign values to local routine variables. See
+ <xref linkend="set-statement"/>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
Most system variables can be changed at runtime. The system
variables that can be set dynamically are described in
<xref linkend="dynamic-system-variables"/>.
</para>
<para>
- <emphasis>Note</emphasis>: Older versions of MySQL employed
- <literal>SET OPTION</literal> for this statement, but this usage
- is now deprecated in favor of <literal>SET</literal> without
- <literal>OPTION</literal>.
+ The following discussion shows the different syntaxes you can
+ use to set variables. The examples use the <literal>=</literal>
+ assignment operator. The <literal>:=</literal> operator also is
+ allowable.
</para>
<para>
- The following example show the different syntaxes you can use to
- set variables.
- </para>
-
- <para>
A user variable is written as
<literal>@<replaceable>var_name</replaceable></literal> and can
be set as follows:
@@ -14174,8 +14201,8 @@
</programlisting>
<para>
- Further information about user variables is given in
- <xref linkend="user-variables"/>.
+ <xref linkend="user-variables"/>, provides further information
+ about user variables.
</para>
<para>
@@ -14193,6 +14220,11 @@
</para>
<para>
+ The <literal>SUPER</literal> privilege is required to set global
+ variables.
+ </para>
+
+ <para>
The <literal>@@<replaceable>var_name</replaceable></literal>
syntax for system variables is supported to make MySQL syntax
compatible with some other database systems.
@@ -14214,27 +14246,25 @@
</programlisting>
<para>
- If you set a system variable using <literal>SESSION</literal>
- (the default), the value remains in effect until the current
- session ends or until you set the variable to a different value.
- If you set a system variable using <literal>GLOBAL</literal>,
- which requires the <literal>SUPER</literal> privilege, the value
- is remembered and used for new connections until the server
- restarts. If you want to make a variable setting permanent, you
- should put it in an option file. See
- <xref linkend="option-files"/>.
+ If you set a session system variable, the value remains in
+ effect until the current session ends or until you set the
+ variable to a different value. If you set a global system
+ variable, the value is remembered and used for new connections
+ until the server restarts. If you want to make a global system
+ variable setting permanent, you should set it in an option file.
+ See <xref linkend="option-files"/>.
</para>
<para>
To prevent incorrect usage, MySQL produces an error if you use
<literal>SET GLOBAL</literal> with a variable that can only be
used with <literal>SET SESSION</literal> or if you do not
- specify <literal>GLOBAL</literal> (or <literal>@@</literal>)
- when setting a global variable.
+ specify <literal>GLOBAL</literal> (or
+ <literal>@@global.</literal>) when setting a global variable.
</para>
<para>
- If you want to set a <literal>SESSION</literal> variable to the
+ To set a <literal>SESSION</literal> variable to the
<literal>GLOBAL</literal> value or a <literal>GLOBAL</literal>
value to the compiled-in MySQL default value, use the
<literal>DEFAULT</literal> keyword. For example, the following
@@ -14248,6 +14278,12 @@
</programlisting>
<para>
+ Not all system variables can be set to
+ <literal>DEFAULT</literal>. In such cases, use of
+ <literal>DEFAULT</literal> results in an error.
+ </para>
+
+ <para>
You can get a list of most system variables with <literal>SHOW
VARIABLES</literal>. (See <xref linkend="show-variables"/>.) To
obtain a specific variable name or list of names that match a
@@ -14265,32 +14301,31 @@
</para>
<programlisting>
-SHOW VARIABLES LIKE 'have%';
-SHOW GLOBAL VARIABLES LIKE 'have%';
+SHOW VARIABLES LIKE '%size%';
+SHOW GLOBAL VARIABLES LIKE '%size%';
</programlisting>
<para>
- The wildcard character can be used in any position within the
+ Wildcard characters can be used in any position within the
pattern to be matched.
</para>
<para>
- You can also get the value for a specific value by using the
- <literal>@@[global.|local.]var_name</literal> syntax with
- <literal>SELECT</literal>:
+ You can also use <literal>SELECT</literal> to get the value for
+ a specific system variable by using the
+ <literal>@@[global.|session.]<replaceable>var_name</replaceable></literal>
+ syntax:
</para>
<programlisting>
-SELECT @@max_join_size, @@global.max_join_size;
+SELECT @@global.max_join_size, @@session.max_join_size;
</programlisting>
<para>
When you retrieve a variable with <literal>SELECT
- @@var_name</literal> (that is, you do not specify
- <literal>global.</literal>, <literal>session.</literal>, or
- <literal>local.</literal>), MySQL returns the
- <literal>SESSION</literal> value if it exists and the
- <literal>GLOBAL</literal> value otherwise.
+ @@<replaceable>var_name</replaceable></literal> (with no
+ modifier), MySQL returns the <literal>SESSION</literal> value if
+ it exists and the <literal>GLOBAL</literal> value otherwise.
</para>
<para>
@@ -14329,13 +14364,15 @@
changes to a table take effect immediately. If set to
<literal>0</literal>, you have to use
<literal>COMMIT</literal> to accept a transaction or
- <literal>ROLLBACK</literal> to cancel it. If you change
- <literal>AUTOCOMMIT</literal> mode from <literal>0</literal>
- to <literal>1</literal>, MySQL performs an automatic
- <literal>COMMIT</literal> of any open transaction. Another
- way to begin a transaction is to use a <literal>START
- TRANSACTION</literal> or <literal>BEGIN</literal> statement.
- See <xref linkend="commit"/>.
+ <literal>ROLLBACK</literal> to cancel it. By default, client
+ connections begin with <literal>AUTOCOMMENT</literal> set to
+ 1. If you change <literal>AUTOCOMMIT</literal> mode from
+ <literal>0</literal> to <literal>1</literal>, MySQL performs
+ an automatic <literal>COMMIT</literal> of any open
+ transaction. Another way to begin a transaction is to use a
+ <literal>START TRANSACTION</literal> or
+ <literal>BEGIN</literal> statement. See
+ <xref linkend="commit"/>.
</para>
</listitem>
@@ -14464,7 +14501,7 @@
</para>
<para>
- The variable is a synonym for the
+ This variable is a synonym for the
<literal>LAST_INSERT_ID</literal> variable. It exists for
compatibility with other database systems. You can read its
value with <literal>SELECT @@IDENTITY</literal>, and set it
@@ -14543,7 +14580,7 @@
</para>
<para>
- This is not a server system variable, but it can be used to
+ This option is a modifier, not a variable. It can be used to
influence the effect of variables that set the character
set, the collation, and the time zone.
<literal>ONE_SHOT</literal> is primarily used for
@@ -14567,13 +14604,11 @@
<para>
If <literal>ONE_SHOT</literal> is used with the allowed
- variables, it changes the variables as requested, but
- resets, after the next statement, all character set,
- collation, and time zone-related server system variables.
- The only exception when resetting doesn't happen is when the
- next statement is a <literal>SET</literal> statement. In
- other words, resetting takes place after the next
- non-<literal>SET</literal> statement. Example:
+ variables, it changes the variables as requested, but only
+ for the next non-<literal>SET</literal> statement. After
+ that, the server resets all character set, collation, and
+ time zone-related system variables to their previous values.
+ Example:
</para>
<programlisting>
@@ -14716,12 +14751,14 @@
</para>
<para>
- If set to <literal>1</literal>, <literal>SHOW CREATE
- TABLE</literal> quotes table and column names. If set to
- <literal>0</literal>, quoting is disabled. This option is
- enabled by default so that replication works for tables with
- table and column names that require quoting. See
- <xref linkend="show-create-table"/>.
+ If set to <literal>1</literal>, the server quotes
+ identifiers for <literal>SHOW CREATE TABLE</literal> and
+ <literal>SHOW CREATE DATABASE</literal> statements. If set
+ to <literal>0</literal>, quoting is disabled. This option is
+ enabled by default so that replication works for identifiers
+ that require quoting. See
+ <xref linkend="show-create-table"/>, and
+ <xref linkend="show-create-database"/>.
</para>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r1081 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 28 Jan |