Author: paul
Date: 2006-02-02 21:08:47 +0100 (Thu, 02 Feb 2006)
New Revision: 1190
Log:
r2799@kite-hub: paul | 2006-02-02 13:42:16 -0600
Revise system variable descriptions.
Modified:
trunk/
trunk/refman-4.1/database-administration.xml
trunk/refman-4.1/language-structure.xml
trunk/refman-5.0/database-administration.xml
trunk/refman-5.0/language-structure.xml
trunk/refman-5.1/database-administration.xml
trunk/refman-5.1/language-structure.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:7055
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2798
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:7055
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2799
Modified: trunk/refman-4.1/database-administration.xml
===================================================================
--- trunk/refman-4.1/database-administration.xml 2006-02-02 20:08:32 UTC (rev 1189)
+++ trunk/refman-4.1/database-administration.xml 2006-02-02 20:08:47 UTC (rev 1190)
@@ -2032,15 +2032,20 @@
The <command>mysql</command> server maintains many system
variables that indicate how it is configured. All of them have
default values. They can be set at server startup using
- options on the command line or in option files. Most of them
- can be changed dynamically while the server is running by
- means of the <literal>SET</literal> statement, which enables
- you to modify operation of the server without having to stop
- and restart it. Also, you can refer to their values in
- expressions.
+ options on the command line or in option files. As of MySQL
+ 4.0.3, most of them can be changed dynamically while the
+ server is running by means of the <literal>SET</literal>
+ statement, which enables you to modify operation of the server
+ without having to stop and restart it. Also, you can refer to
+ their values in expressions.
</para>
<para>
+ To see the names and values of system variables, use the
+ <literal>SHOW VARIABLES</literal> statement.
+ </para>
+
+ <para>
Most system variables are described here. Variables with no
version indicated have been present since at least MySQL 3.22.
<literal>InnoDB</literal> system variables are listed at
@@ -5173,12 +5178,12 @@
The <command>mysqld</command> server maintains many system
variables that indicate how it is configured. All of them have
default values. They can be set at server startup using
- options on the command line or in option files. Most of them
- can be changed dynamically while the server is running by
- means of the <literal>SET</literal> statement, which enables
- you to modify operation of the server without having to stop
- and restart it. Also, you can refer to their values in
- expressions.
+ options on the command line or in option files. As of MySQL
+ 4.0.3, most of them can be changed dynamically while the
+ server is running by means of the <literal>SET</literal>
+ statement, which enables you to modify operation of the server
+ without having to stop and restart it. Also, you can refer to
+ their values in expressions.
</para>
<para>
@@ -5206,43 +5211,10 @@
<para>
When the server starts, it initializes all global variables to
their default values. These defaults can be changed by options
- specified in option files or on the command line. After the
- server starts, those global variables that are dynamic can be
- changed by connecting to the server and issuing a <literal>SET
- GLOBAL <replaceable>var_name</replaceable> =
- <replaceable>value</replaceable></literal> statement. To
- change a global variable, you must have the
- <literal>SUPER</literal> privilege.
+ specified in option files or on the command line.
</para>
<para>
- The server also maintains a set of session variables for each
- client that connects. The client's session variables are
- initialized at connect time using the current values of the
- corresponding global variables. For example, the client's SQL
- mode is controlled by the session <literal>sql_mode</literal>
- value, which is initiated when the client connects to the
- value of the global <literal>sql_mode</literal> value. For
- those session variables that are dynamic, the client can
- change them by issuing a <literal>SET SESSION
- <replaceable>var_name</replaceable> =
- <replaceable>value</replaceable></literal> statement. Setting
- a session variable requires no special privilege, but a client
- can change only its own session variables, not those of any
- other client.
- </para>
-
- <para>
- A change to a global variable is visible to any client that
- accesses that global variable. However, the change affects the
- corresponding session variable only for clients that connect
- after the change. The global variable change does not affect
- the session variable for any client that is currently
- connected (not even that of the client that issues the
- <literal>SET GLOBAL</literal> statement).
- </para>
-
- <para>
When you use a startup option to set a variable that takes a
numeric value, the value can be given with a suffix of
<literal>K</literal>, <literal>M</literal>, or
@@ -5275,6 +5247,58 @@
</para>
<para>
+ If you want to restrict the maximum value to which a system
+ variable can be set at runtime with the <literal>SET</literal>
+ statement, you can specify this maximum by using an option of
+ the form
+ <option>--maximum-<replaceable>var_name</replaceable></option>
+ at server startup. For example, to prevent the value of
+ <literal>query_cache_size</literal> from being increased to
+ more than 32MB at runtime, use the option
+ <option>--maximum-query_cache_size=32M</option>. This feature
+ is available as of MySQL 4.0.2.
+ </para>
+
+ <para>
+ After the server starts, those global variables that are
+ dynamic can be changed by connecting to the server and issuing
+ a <literal>SET GLOBAL <replaceable>var_name</replaceable> =
+ <replaceable>value</replaceable></literal> statement. To
+ change a global variable, you must have the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <para>
+ The server also maintains a set of session variables for each
+ client that connects. The client's session variables are
+ initialized at connect time using the current values of the
+ corresponding global variables. For example, the client's SQL
+ mode is controlled by the session <literal>sql_mode</literal>
+ value, which is initiated when the client connects to the
+ value of the global <literal>sql_mode</literal> value.
+ </para>
+
+ <para>
+ For those session variables that are dynamic, the client can
+ change them by issuing a <literal>SET SESSION
+ <replaceable>var_name</replaceable> =
+ <replaceable>value</replaceable></literal> statement. Setting
+ a session variable requires no special privilege, but a client
+ can change only its own session variables, not those of any
+ other client.
+ </para>
+
+ <para>
+ A change to a global variable is visible to any client that
+ accesses that global variable. However, the change affects the
+ corresponding session variable only for clients that connect
+ after the change. The global variable change does not affect
+ the session variable for any client that is currently
+ connected (not even that of the client that issues the
+ <literal>SET GLOBAL</literal> statement).
+ </para>
+
+ <para>
When you assign a value to a system variable with
<literal>SET</literal>, you cannot use suffix letters in the
value. However, the value can take the form of an expression:
@@ -5296,19 +5320,6 @@
</programlisting>
<para>
- If you want to restrict the maximum value to which a system
- variable can be set at runtime with the <literal>SET</literal>
- statement, you can specify this maximum by using an option of
- the form
- <option>--maximum-<replaceable>var_name</replaceable></option>
- at server startup. For example, to prevent the value of
- <literal>query_cache_size</literal> from being increased to
- more than 32MB at runtime, use the option
- <option>--maximum-query_cache_size=32M</option>. This feature
- is available as of MySQL 4.0.2.
- </para>
-
- <para>
To view system variables and their values, use the
<literal>SHOW VARIABLES</literal> statement.
</para>
Modified: trunk/refman-4.1/language-structure.xml
===================================================================
--- trunk/refman-4.1/language-structure.xml 2006-02-02 20:08:32 UTC (rev 1189)
+++ trunk/refman-4.1/language-structure.xml 2006-02-02 20:08:47 UTC (rev 1190)
@@ -1480,59 +1480,7 @@
<title>&title-system-variables;</title>
- <indexterm>
- <primary>variables</primary>
- <secondary>System</secondary>
- </indexterm>
-
- <indexterm>
- <primary>system variables</primary>
- </indexterm>
-
<para>
- Starting from MySQL 4.0.3, we provide better access to a lot of
- system and connection variables. Many variables can be changed
- dynamically while the server is running, which enables you to
- modify operation of the server without having to stop and restart
- it.
- </para>
-
- <remark role="note">
- next few paragraphs also appear in @node Server system variables.
- If you make changes one place, change them both.
- </remark>
-
- <para>
- The <command>mysqld</command> server maintains two kinds of
- variables. Global variables affect the overall operation of the
- server. Session variables affect its operation for individual
- client connections.
- </para>
-
- <para>
- When the server starts, it initializes all global variables to
- their default values. These defaults may be changed by options
- specified in option files or on the command line. After the server
- starts, those global variables that are dynamic can be changed by
- connecting to the server and issuing a <literal>SET GLOBAL
- <replaceable>var_name</replaceable></literal> statement. To change
- a global variable, you must have the <literal>SUPER</literal>
- privilege.
- </para>
-
- <para>
- The server also maintains a set of session variables for each
- client that connects. The client's session variables are
- initialized at connect time using the current values of the
- corresponding global variables. For those session variables that
- are dynamic, the client can change them by issuing a <literal>SET
- SESSION <replaceable>var_name</replaceable></literal> statement.
- Setting a session variable requires no special privilege, but a
- client can change only its own session variables, not those of any
- other client.
- </para>
-
- <para>
A change to a global variable is visible to any client that
accesses that global variable. However, it affects the
corresponding session variable that is initialized from the global
@@ -1543,7 +1491,7 @@
</para>
<para>
- Global or session variables may be set or retrieved in several
+ At runtime, global or session variables may be set in several
ways. The following examples use
<literal>sort_buffer_size</literal> as a sample variable name.
</para>
@@ -1554,8 +1502,8 @@
</para>
<programlisting>
-mysql> <userinput>SET GLOBAL sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET @@global.sort_buffer_size=<replaceable>value</replaceable>;</userinput>
+SET GLOBAL sort_buffer_size = <replaceable>value</replaceable>;
+SET @@global.sort_buffer_size = <replaceable>value</replaceable>;
</programlisting>
<para>
@@ -1564,9 +1512,9 @@
</para>
<programlisting>
-mysql> <userinput>SET SESSION sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET @@session.sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET sort_buffer_size=<replaceable>value</replaceable>;</userinput>
+SET SESSION sort_buffer_size = <replaceable>value</replaceable>;
+SET @@session.sort_buffer_size = <replaceable>value</replaceable>;
+SET sort_buffer_size = <replaceable>value</replaceable>;
</programlisting>
<para>
@@ -1598,13 +1546,13 @@
</para>
<para>
- To retrieve the value of a <literal>GLOBAL</literal> variable, use
- one of the following statements:
+ To retrieve the value of a specific <literal>GLOBAL</literal>
+ variable, use one of the following statements:
</para>
<programlisting>
-mysql> <userinput>SELECT @@global.sort_buffer_size;</userinput>
-mysql> <userinput>SHOW GLOBAL VARIABLES like 'sort_buffer_size';</userinput>
+SELECT @@global.sort_buffer_size;
+SHOW GLOBAL VARIABLES like 'sort_buffer_size';
</programlisting>
<para>
@@ -1613,30 +1561,24 @@
</para>
<programlisting>
-mysql> <userinput>SELECT @@sort_buffer_size;</userinput>
-mysql> <userinput>SELECT @@session.sort_buffer_size;</userinput>
-mysql> <userinput>SHOW SESSION VARIABLES like 'sort_buffer_size';</userinput>
+SELECT @@sort_buffer_size;
+SELECT @@session.sort_buffer_size;
+SHOW SESSION VARIABLES like 'sort_buffer_size';
</programlisting>
<para>
- Here, too, <literal>LOCAL</literal> is a synonym for
- <literal>SESSION</literal>.
- </para>
-
- <para>
When you retrieve a variable with <literal>SELECT
@@<replaceable>var_name</replaceable></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
+ not specify <literal>global.</literal> or
+ <literal>session.</literal>, MySQL returns the
+ <literal>SESSION</literal> value if it exists and the
<literal>GLOBAL</literal> value otherwise.
</para>
<para>
For <literal>SHOW VARIABLES</literal>, if you do not specify
- <literal>GLOBAL</literal>, <literal>SESSION</literal>, or
- <literal>LOCAL</literal>, MySQL returns the
- <literal>SESSION</literal> value.
+ <literal>GLOBAL</literal> or <literal>SESSION</literal>, MySQL
+ returns the <literal>SESSION</literal> values.
</para>
<para>
@@ -1654,14 +1596,6 @@
own <literal>SESSION</literal> variable changed.
</para>
- <para>
- Further information about system startup options and system
- variables can be found in <xref linkend="server-options"/>, and
- <xref linkend="server-system-variables"/>. A list of the variables
- that can be set at runtime is given in
- <xref linkend="dynamic-system-variables"/>.
- </para>
-
<section id="structured-system-variables">
<title>&title-structured-system-variables;</title>
Modified: trunk/refman-5.0/database-administration.xml
===================================================================
--- trunk/refman-5.0/database-administration.xml 2006-02-02 20:08:32 UTC (rev 1189)
+++ trunk/refman-5.0/database-administration.xml 2006-02-02 20:08:47 UTC (rev 1190)
@@ -1997,6 +1997,11 @@
</para>
<para>
+ To see the names and values of system variables, use the
+ <literal>SHOW VARIABLES</literal> statement.
+ </para>
+
+ <para>
Most system variables are described here. Variables with no
version indicated are present in all MySQL ¤t-series;
releases. For historical information concerning their
@@ -5482,10 +5487,49 @@
<para>
When the server starts, it initializes all global variables to
their default values. These defaults can be changed by options
- specified in option files or on the command line. After the
- server starts, those global variables that are dynamic can be
- changed by connecting to the server and issuing a <literal>SET
- GLOBAL <replaceable>var_name</replaceable> =
+ specified in option files or on the command line.
+ </para>
+
+ <para>
+ When you use a startup option to set a variable that takes a
+ numeric value, the value can be given with a suffix of
+ <literal>K</literal>, <literal>M</literal>, or
+ <literal>G</literal> (either uppercase or lowercase) to
+ indicate a multiplier of 1024,
+ 1024<superscript>2</superscript> or
+ 1024<superscript>3</superscript>. For example, when used to
+ set <literal>key_buffer_size</literal>, the suffixes indicate
+ units of kilobytes, megabytes, or gigabygtes. Thus, the
+ following command starts the server with a query cache size of
+ 16 megabytes:
+ </para>
+
+<programlisting>
+mysqld --query_cache_size=16M
+</programlisting>
+
+ <para>
+ The lettercase of suffix letters does not matter;
+ <literal>16M</literal> and <literal>16m</literal> are
+ equivalent.
+ </para>
+
+ <para>
+ If you want to restrict the maximum value to which a system
+ variable can be set at runtime with the <literal>SET</literal>
+ statement, you can specify this maximum by using an option of
+ the form
+ <option>--maximum-<replaceable>var_name</replaceable></option>
+ at server startup. For example, to prevent the value of
+ <literal>query_cache_size</literal> from being increased to
+ more than 32MB at runtime, use the option
+ <option>--maximum-query_cache_size=32M</option>.
+ </para>
+
+ <para>
+ After the server starts, those global variables that are
+ dynamic can be changed by connecting to the server and issuing
+ a <literal>SET GLOBAL <replaceable>var_name</replaceable> =
<replaceable>value</replaceable></literal> statement. To
change a global variable, you must have the
<literal>SUPER</literal> privilege.
@@ -5498,8 +5542,11 @@
corresponding global variables. For example, the client's SQL
mode is controlled by the session <literal>sql_mode</literal>
value, which is initiated when the client connects to the
- value of the global <literal>sql_mode</literal> value. For
- those session variables that are dynamic, the client can
+ value of the global <literal>sql_mode</literal> value.
+ </para>
+
+ <para>
+ For those session variables that are dynamic, the client can
change them by issuing a <literal>SET SESSION
<replaceable>var_name</replaceable> =
<replaceable>value</replaceable></literal> statement. Setting
@@ -5519,30 +5566,6 @@
</para>
<para>
- When you use a startup option to set a variable that takes a
- numeric value, the value can be given with a suffix of
- <literal>K</literal>, <literal>M</literal>, or
- <literal>G</literal> (either uppercase or lowercase) to
- indicate a multiplier of 1024,
- 1024<superscript>2</superscript> or
- 1024<superscript>3</superscript>. For example, when used to
- set <literal>key_buffer_size</literal>, the suffixes indicate
- units of kilobytes, megabytes, or gigabygtes. Thus, the
- following command starts the server with a query cache size of
- 16 megabytes:
- </para>
-
-<programlisting>
-mysqld --query_cache_size=16M
-</programlisting>
-
- <para>
- The lettercase of suffix letters does not matter;
- <literal>16M</literal> and <literal>16m</literal> are
- equivalent.
- </para>
-
- <para>
When you assign a value to a system variable with
<literal>SET</literal>, you cannot use suffix letters in the
value. However, the value can take the form of an expression:
@@ -5564,18 +5587,6 @@
</programlisting>
<para>
- If you want to restrict the maximum value to which a system
- variable can be set at runtime with the <literal>SET</literal>
- statement, you can specify this maximum by using an option of
- the form
- <option>--maximum-<replaceable>var_name</replaceable></option>
- at server startup. For example, to prevent the value of
- <literal>query_cache_size</literal> from being increased to
- more than 32MB at runtime, use the option
- <option>--maximum-query_cache_size=32M</option>.
- </para>
-
- <para>
To view system variables and their values, use the
<literal>SHOW VARIABLES</literal> statement.
</para>
Modified: trunk/refman-5.0/language-structure.xml
===================================================================
--- trunk/refman-5.0/language-structure.xml 2006-02-02 20:08:32 UTC (rev 1189)
+++ trunk/refman-5.0/language-structure.xml 2006-02-02 20:08:47 UTC (rev 1190)
@@ -1464,58 +1464,7 @@
<title>&title-system-variables;</title>
- <indexterm>
- <primary>variables</primary>
- <secondary>System</secondary>
- </indexterm>
-
- <indexterm>
- <primary>system variables</primary>
- </indexterm>
-
<para>
- MySQL provides access to many system and connection variables.
- Many variables can be changed dynamically while the server is
- running, which enables you to modify operation of the server
- without having to stop and restart it.
- </para>
-
- <remark role="note">
- The next few paragraphs also appear in server-system-variables. If
- you make changes in one place, change them both.
- </remark>
-
- <para>
- The <command>mysqld</command> server maintains two kinds of
- variables. Global variables affect the overall operation of the
- server. Session variables affect its operation for individual
- client connections.
- </para>
-
- <para>
- When the server starts, it initializes all global variables to
- their default values. These defaults may be changed by options
- specified in option files or on the command line. After the server
- starts, those global variables that are dynamic can be changed by
- connecting to the server and issuing a <literal>SET GLOBAL
- <replaceable>var_name</replaceable></literal> statement. To change
- a global variable, you must have the <literal>SUPER</literal>
- privilege.
- </para>
-
- <para>
- The server also maintains a set of session variables for each
- client that connects. The client's session variables are
- initialized at connect time using the current values of the
- corresponding global variables. For those session variables that
- are dynamic, the client can change them by issuing a <literal>SET
- SESSION <replaceable>var_name</replaceable></literal> statement.
- Setting a session variable requires no special privilege, but a
- client can change only its own session variables, not those of any
- other client.
- </para>
-
- <para>
A change to a global variable is visible to any client that
accesses that global variable. However, it affects the
corresponding session variable that is initialized from the global
@@ -1526,7 +1475,7 @@
</para>
<para>
- Global or session variables may be set or retrieved in several
+ At runtime, global or session variables may be set in several
ways. The following examples use
<literal>sort_buffer_size</literal> as a sample variable name.
</para>
@@ -1537,8 +1486,8 @@
</para>
<programlisting>
-mysql> <userinput>SET GLOBAL sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET @@global.sort_buffer_size=<replaceable>value</replaceable>;</userinput>
+SET GLOBAL sort_buffer_size = <replaceable>value</replaceable>;
+SET @@global.sort_buffer_size = <replaceable>value</replaceable>;
</programlisting>
<para>
@@ -1547,9 +1496,9 @@
</para>
<programlisting>
-mysql> <userinput>SET SESSION sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET @@session.sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET sort_buffer_size=<replaceable>value</replaceable>;</userinput>
+SET SESSION sort_buffer_size = <replaceable>value</replaceable>;
+SET @@session.sort_buffer_size = <replaceable>value</replaceable>;
+SET sort_buffer_size = <replaceable>value</replaceable>;
</programlisting>
<para>
@@ -1581,13 +1530,13 @@
</para>
<para>
- To retrieve the value of a <literal>GLOBAL</literal> variable, use
- one of the following statements:
+ To retrieve the value of a specific <literal>GLOBAL</literal>
+ variable, use one of the following statements:
</para>
<programlisting>
-mysql> <userinput>SELECT @@global.sort_buffer_size;</userinput>
-mysql> <userinput>SHOW GLOBAL VARIABLES like 'sort_buffer_size';</userinput>
+SELECT @@global.sort_buffer_size;
+SHOW GLOBAL VARIABLES like 'sort_buffer_size';
</programlisting>
<para>
@@ -1596,30 +1545,24 @@
</para>
<programlisting>
-mysql> <userinput>SELECT @@sort_buffer_size;</userinput>
-mysql> <userinput>SELECT @@session.sort_buffer_size;</userinput>
-mysql> <userinput>SHOW SESSION VARIABLES like 'sort_buffer_size';</userinput>
+SELECT @@sort_buffer_size;
+SELECT @@session.sort_buffer_size;
+SHOW SESSION VARIABLES like 'sort_buffer_size';
</programlisting>
<para>
- Here, too, <literal>LOCAL</literal> is a synonym for
- <literal>SESSION</literal>.
- </para>
-
- <para>
When you retrieve a variable with <literal>SELECT
@@<replaceable>var_name</replaceable></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
+ not specify <literal>global.</literal> or
+ <literal>session.</literal>, MySQL returns the
+ <literal>SESSION</literal> value if it exists and the
<literal>GLOBAL</literal> value otherwise.
</para>
<para>
For <literal>SHOW VARIABLES</literal>, if you do not specify
- <literal>GLOBAL</literal>, <literal>SESSION</literal>, or
- <literal>LOCAL</literal>, MySQL returns the
- <literal>SESSION</literal> values.
+ <literal>GLOBAL</literal> or <literal>SESSION</literal>, MySQL
+ returns the <literal>SESSION</literal> values.
</para>
<para>
@@ -1637,14 +1580,6 @@
own <literal>SESSION</literal> variable changed.
</para>
- <para>
- Further information about system startup options and system
- variables can be found in <xref linkend="server-options"/>, and
- <xref linkend="server-system-variables"/>. A list of the variables
- that can be set at runtime is given in
- <xref linkend="dynamic-system-variables"/>.
- </para>
-
<section id="structured-system-variables">
<title>&title-structured-system-variables;</title>
Modified: trunk/refman-5.1/database-administration.xml
===================================================================
--- trunk/refman-5.1/database-administration.xml 2006-02-02 20:08:32 UTC (rev 1189)
+++ trunk/refman-5.1/database-administration.xml 2006-02-02 20:08:47 UTC (rev 1190)
@@ -2028,6 +2028,11 @@
</para>
<para>
+ To see the names and values of system variables, use the
+ <literal>SHOW VARIABLES</literal> statement.
+ </para>
+
+ <para>
Most system variables are described here. Variables with no
version indicated are present in all MySQL ¤t-series;
releases. For historical information concerning their
@@ -5602,10 +5607,49 @@
<para>
When the server starts, it initializes all global variables to
their default values. These defaults can be changed by options
- specified in option files or on the command line. After the
- server starts, those global variables that are dynamic can be
- changed by connecting to the server and issuing a <literal>SET
- GLOBAL <replaceable>var_name</replaceable> =
+ specified in option files or on the command line.
+ </para>
+
+ <para>
+ When you use a startup option to set a variable that takes a
+ numeric value, the value can be given with a suffix of
+ <literal>K</literal>, <literal>M</literal>, or
+ <literal>G</literal> (either uppercase or lowercase) to
+ indicate a multiplier of 1024,
+ 1024<superscript>2</superscript> or
+ 1024<superscript>3</superscript>. For example, when used to
+ set <literal>key_buffer_size</literal>, the suffixes indicate
+ units of kilobytes, megabytes, or gigabygtes. Thus, the
+ following command starts the server with a query cache size of
+ 16 megabytes:
+ </para>
+
+<programlisting>
+mysqld --query_cache_size=16M
+</programlisting>
+
+ <para>
+ The lettercase of suffix letters does not matter;
+ <literal>16M</literal> and <literal>16m</literal> are
+ equivalent.
+ </para>
+
+ <para>
+ If you want to restrict the maximum value to which a system
+ variable can be set at runtime with the <literal>SET</literal>
+ statement, you can specify this maximum by using an option of
+ the form
+ <option>--maximum-<replaceable>var_name</replaceable></option>
+ at server startup. For example, to prevent the value of
+ <literal>query_cache_size</literal> from being increased to
+ more than 32MB at runtime, use the option
+ <option>--maximum-query_cache_size=32M</option>.
+ </para>
+
+ <para>
+ After the server starts, those global variables that are
+ dynamic can be changed by connecting to the server and issuing
+ a <literal>SET GLOBAL <replaceable>var_name</replaceable> =
<replaceable>value</replaceable></literal> statement. To
change a global variable, you must have the
<literal>SUPER</literal> privilege.
@@ -5618,8 +5662,11 @@
corresponding global variables. For example, the client's SQL
mode is controlled by the session <literal>sql_mode</literal>
value, which is initiated when the client connects to the
- value of the global <literal>sql_mode</literal> value. For
- those session variables that are dynamic, the client can
+ value of the global <literal>sql_mode</literal> value.
+ </para>
+
+ <para>
+ For those session variables that are dynamic, the client can
change them by issuing a <literal>SET SESSION
<replaceable>var_name</replaceable> =
<replaceable>value</replaceable></literal> statement. Setting
@@ -5639,30 +5686,6 @@
</para>
<para>
- When you use a startup option to set a variable that takes a
- numeric value, the value can be given with a suffix of
- <literal>K</literal>, <literal>M</literal>, or
- <literal>G</literal> (either uppercase or lowercase) to
- indicate a multiplier of 1024,
- 1024<superscript>2</superscript> or
- 1024<superscript>3</superscript>. For example, when used to
- set <literal>key_buffer_size</literal>, the suffixes indicate
- units of kilobytes, megabytes, or gigabygtes. Thus, the
- following command starts the server with a query cache size of
- 16 megabytes:
- </para>
-
-<programlisting>
-mysqld --query_cache_size=16M
-</programlisting>
-
- <para>
- The lettercase of suffix letters does not matter;
- <literal>16M</literal> and <literal>16m</literal> are
- equivalent.
- </para>
-
- <para>
When you assign a value to a system variable with
<literal>SET</literal>, you cannot use suffix letters in the
value. However, the value can take the form of an expression:
@@ -5684,18 +5707,6 @@
</programlisting>
<para>
- If you want to restrict the maximum value to which a system
- variable can be set at runtime with the <literal>SET</literal>
- statement, you can specify this maximum by using an option of
- the form
- <option>--maximum-<replaceable>var_name</replaceable></option>
- at server startup. For example, to prevent the value of
- <literal>query_cache_size</literal> from being increased to
- more than 32MB at runtime, use the option
- <option>--maximum-query_cache_size=32M</option>.
- </para>
-
- <para>
To view system variables and their values, use the
<literal>SHOW VARIABLES</literal> statement.
</para>
Modified: trunk/refman-5.1/language-structure.xml
===================================================================
--- trunk/refman-5.1/language-structure.xml 2006-02-02 20:08:32 UTC (rev 1189)
+++ trunk/refman-5.1/language-structure.xml 2006-02-02 20:08:47 UTC (rev 1190)
@@ -1464,58 +1464,7 @@
<title>&title-system-variables;</title>
- <indexterm>
- <primary>variables</primary>
- <secondary>System</secondary>
- </indexterm>
-
- <indexterm>
- <primary>system variables</primary>
- </indexterm>
-
<para>
- MySQL provides access to many system and connection variables.
- Many variables can be changed dynamically while the server is
- running, which enables you to modify operation of the server
- without having to stop and restart it.
- </para>
-
- <remark role="note">
- The next few paragraphs also appear in server-system-variables. If
- you make changes in one place, change them both.
- </remark>
-
- <para>
- The <command>mysqld</command> server maintains two kinds of
- variables. Global variables affect the overall operation of the
- server. Session variables affect its operation for individual
- client connections.
- </para>
-
- <para>
- When the server starts, it initializes all global variables to
- their default values. These defaults may be changed by options
- specified in option files or on the command line. After the server
- starts, those global variables that are dynamic can be changed by
- connecting to the server and issuing a <literal>SET GLOBAL
- <replaceable>var_name</replaceable></literal> statement. To change
- a global variable, you must have the <literal>SUPER</literal>
- privilege.
- </para>
-
- <para>
- The server also maintains a set of session variables for each
- client that connects. The client's session variables are
- initialized at connect time using the current values of the
- corresponding global variables. For those session variables that
- are dynamic, the client can change them by issuing a <literal>SET
- SESSION <replaceable>var_name</replaceable></literal> statement.
- Setting a session variable requires no special privilege, but a
- client can change only its own session variables, not those of any
- other client.
- </para>
-
- <para>
A change to a global variable is visible to any client that
accesses that global variable. However, it affects the
corresponding session variable that is initialized from the global
@@ -1526,7 +1475,7 @@
</para>
<para>
- Global or session variables may be set or retrieved in several
+ At runtime, global or session variables may be set in several
ways. The following examples use
<literal>sort_buffer_size</literal> as a sample variable name.
</para>
@@ -1537,8 +1486,8 @@
</para>
<programlisting>
-mysql> <userinput>SET GLOBAL sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET @@global.sort_buffer_size=<replaceable>value</replaceable>;</userinput>
+SET GLOBAL sort_buffer_size = <replaceable>value</replaceable>;
+SET @@global.sort_buffer_size = <replaceable>value</replaceable>;
</programlisting>
<para>
@@ -1547,9 +1496,9 @@
</para>
<programlisting>
-mysql> <userinput>SET SESSION sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET @@session.sort_buffer_size=<replaceable>value</replaceable>;</userinput>
-mysql> <userinput>SET sort_buffer_size=<replaceable>value</replaceable>;</userinput>
+SET SESSION sort_buffer_size = <replaceable>value</replaceable>;
+SET @@session.sort_buffer_size = <replaceable>value</replaceable>;
+SET sort_buffer_size = <replaceable>value</replaceable>;
</programlisting>
<para>
@@ -1581,13 +1530,13 @@
</para>
<para>
- To retrieve the value of a <literal>GLOBAL</literal> variable, use
- one of the following statements:
+ To retrieve the value of a specific <literal>GLOBAL</literal>
+ variable, use one of the following statements:
</para>
<programlisting>
-mysql> <userinput>SELECT @@global.sort_buffer_size;</userinput>
-mysql> <userinput>SHOW GLOBAL VARIABLES like 'sort_buffer_size';</userinput>
+SELECT @@global.sort_buffer_size;
+SHOW GLOBAL VARIABLES like 'sort_buffer_size';
</programlisting>
<para>
@@ -1596,30 +1545,24 @@
</para>
<programlisting>
-mysql> <userinput>SELECT @@sort_buffer_size;</userinput>
-mysql> <userinput>SELECT @@session.sort_buffer_size;</userinput>
-mysql> <userinput>SHOW SESSION VARIABLES like 'sort_buffer_size';</userinput>
+SELECT @@sort_buffer_size;
+SELECT @@session.sort_buffer_size;
+SHOW SESSION VARIABLES like 'sort_buffer_size';
</programlisting>
<para>
- Here, too, <literal>LOCAL</literal> is a synonym for
- <literal>SESSION</literal>.
- </para>
-
- <para>
When you retrieve a variable with <literal>SELECT
@@<replaceable>var_name</replaceable></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
+ not specify <literal>global.</literal> or
+ <literal>session.</literal>, MySQL returns the
+ <literal>SESSION</literal> value if it exists and the
<literal>GLOBAL</literal> value otherwise.
</para>
<para>
For <literal>SHOW VARIABLES</literal>, if you do not specify
- <literal>GLOBAL</literal>, <literal>SESSION</literal>, or
- <literal>LOCAL</literal>, MySQL returns the
- <literal>SESSION</literal> values.
+ <literal>GLOBAL</literal> or <literal>SESSION</literal>, MySQL
+ returns the <literal>SESSION</literal> values.
</para>
<para>
@@ -1637,14 +1580,6 @@
own <literal>SESSION</literal> variable changed.
</para>
- <para>
- Further information about system startup options and system
- variables can be found in <xref linkend="server-options"/>, and
- <xref linkend="server-system-variables"/>. A list of the variables
- that can be set at runtime is given in
- <xref linkend="dynamic-system-variables"/>.
- </para>
-
<section id="structured-system-variables">
<title>&title-structured-system-variables;</title>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r1190 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 2 Feb |