Author: jstephens
Date: 2007-06-21 09:53:10 +0200 (Thu, 21 Jun 2007)
New Revision: 6877
Log:
Put DDL statements in alphabetical order (already the case with 4.1/5.0)
Modified:
trunk/refman-5.1/sql-syntax.xml
trunk/refman-5.2/sql-syntax.xml
Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml 2007-06-21 07:46:00 UTC (rev 6876)
+++ trunk/refman-5.1/sql-syntax.xml 2007-06-21 07:53:10 UTC (rev 6877)
Changed blocks: 9, Lines Added: 446, Lines Deleted: 446; 33670 bytes
@@ -154,6 +154,152 @@
</section>
+ <section id="alter-logfile-group">
+
+ <title><literal>ALTER LOGFILE GROUP</literal>
Syntax</title>
+
+ <indexterm>
+ <primary><literal>ALTER LOGFILE GROUP</literal></primary>
+<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
+ </indexterm>
+
+<programlisting>
+ALTER LOGFILE GROUP <replaceable>logfile_group</replaceable>
+ ADD UNDOFILE '<replaceable>file</replaceable>'
+ [INITIAL_SIZE [=] <replaceable>size</replaceable>]
+ ENGINE [=] <replaceable>engine</replaceable>
+</programlisting>
+
+ <para>
+ This statement adds an <literal>UNDO</literal> file named
+ '<replaceable>file</replaceable>' to an existing log file group
+ <replaceable>logfile_group</replaceable>. An <literal>ALTER
+ LOGFILE GROUP</literal> statement has one and only one
+ <literal>ADD UNDOFILE</literal> clause. No <literal>DROP
+ UNDOFILE</literal> clause is supported.
+ </para>
+
+ <para>
+ The optional <literal>INITIAL_SIZE</literal> parameter sets the
+ <literal>UNDO</literal> file's initial size in bytes; if not
+ specified, the initial size default to <literal>128M</literal>
+ (128 megabytes). You may optionally follow
+ <replaceable>size</replaceable> with a one-letter abbreviation
+ for an order of magnitude, similar to those used in
+ <filename>my.cnf</filename>. Generally, this is one of the
+ letters <literal>M</literal> (for megabytes) or
+ <literal>G</literal> (for gigabytes).
+ </para>
+
+ <para>
+ The <literal>ENGINE</literal> parameter (required) determines
+ the storage engine which is used by this log file group, with
+ <replaceable>engine</replaceable> being the name of the storage
+ engine. In MySQL 5.1, the only accepted values for
+ <replaceable>engine</replaceable> are
<literal>NDB</literal> and
+ <literal>NDBCLUSTER</literal>.
+ </para>
+
+ <para>
+ Here is an example, which assumes that the log file group
+ <literal>lg_3</literal> has already been created using
+ <literal>CREATE LOGFILE GROUP</literal> (see
+ <xref linkend="create-logfile-group"/>):
+ </para>
+
+<programlisting>
+ALTER LOGFILE GROUP lg_3
+ ADD UNDOFILE 'undo_10.dat'
+ INITIAL_SIZE=32M
+ ENGINE=NDB;
+</programlisting>
+
+ <para>
+ When <literal>ALTER LOGFILE GROUP</literal> is used with
+ <literal>ENGINE = NDB</literal>, an
<literal>UNDO</literal> log
+ file is created on each Cluster data node. You can verify that
+ the <literal>UNDO</literal> files were created and obtain
+ information about them by querying the
+ <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT FILE_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
+ -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
+ -> <userinput>WHERE LOGFILE_GROUP_NAME = 'lg_3';</userinput>
++-------------+----------------------+----------------+
+| FILE_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
++-------------+----------------------+----------------+
+| newdata.dat | 0 | CLUSTER_NODE=3 |
+| newdata.dat | 0 | CLUSTER_NODE=4 |
+| undo_10.dat | 11 | CLUSTER_NODE=3 |
+| undo_10.dat | 11 | CLUSTER_NODE=4 |
++-------------+----------------------+----------------+
+4 rows in set (0.01 sec)
+</programlisting>
+
+ <para>
+ (See <xref linkend="files-table"/>.)
+ </para>
+
+ <para>
+ <literal>ALTER LOGFILE GROUP</literal> was added in MySQL 5.1.6.
+ In MySQL 5.1, it is useful only with Disk Data storage for MySQL
+ Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
+ </para>
+
+ </section>
+
+ <section id="alter-server">
+
+ <title><literal>ALTER SERVER</literal> Syntax</title>
+
+ <indexterm>
+ <primary>ALTER SERVER</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="ALTER SERVER"/>
+
+ <remark role="help-keywords">
+ ALTER SERVER OPTIONS
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+ALTER SERVER <replaceable>server_name</replaceable>
+OPTIONS (<replaceable>option</replaceable> ...)
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ Alters the server information for
+
<literal><replaceable>server_name</replaceable></literal>,
+ adjusting the specified options as per the <literal>CREATE
+ SERVER</literal> command. See <xref linkend="create-server"/>.
+ The corresponding fields in the <literal>mysql.servers</literal>
+ table are updated accordingly. This statement requires the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ For example, to update the <literal>USER</literal> option:
+ </para>
+
+ <remark role="help-example"/>
+
+<programlisting>ALTER SERVER s OPTIONS (USER 'sally');</programlisting>
+
+ <para>
+ <literal>ALTER SERVER</literal> does not cause an automatic
+ commit.
+ </para>
+
+ </section>
+
<section id="alter-table">
<title><literal>ALTER TABLE</literal> Syntax</title>
@@ -1370,102 +1516,6 @@
</section>
- <section id="alter-logfile-group">
-
- <title><literal>ALTER LOGFILE GROUP</literal>
Syntax</title>
-
- <indexterm>
- <primary><literal>ALTER LOGFILE GROUP</literal></primary>
-<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
- </indexterm>
-
-<programlisting>
-ALTER LOGFILE GROUP <replaceable>logfile_group</replaceable>
- ADD UNDOFILE '<replaceable>file</replaceable>'
- [INITIAL_SIZE [=] <replaceable>size</replaceable>]
- ENGINE [=] <replaceable>engine</replaceable>
-</programlisting>
-
- <para>
- This statement adds an <literal>UNDO</literal> file named
- '<replaceable>file</replaceable>' to an existing log file group
- <replaceable>logfile_group</replaceable>. An <literal>ALTER
- LOGFILE GROUP</literal> statement has one and only one
- <literal>ADD UNDOFILE</literal> clause. No <literal>DROP
- UNDOFILE</literal> clause is supported.
- </para>
-
- <para>
- The optional <literal>INITIAL_SIZE</literal> parameter sets the
- <literal>UNDO</literal> file's initial size in bytes; if not
- specified, the initial size default to <literal>128M</literal>
- (128 megabytes). You may optionally follow
- <replaceable>size</replaceable> with a one-letter abbreviation
- for an order of magnitude, similar to those used in
- <filename>my.cnf</filename>. Generally, this is one of the
- letters <literal>M</literal> (for megabytes) or
- <literal>G</literal> (for gigabytes).
- </para>
-
- <para>
- The <literal>ENGINE</literal> parameter (required) determines
- the storage engine which is used by this log file group, with
- <replaceable>engine</replaceable> being the name of the storage
- engine. In MySQL 5.1, the only accepted values for
- <replaceable>engine</replaceable> are
<literal>NDB</literal> and
- <literal>NDBCLUSTER</literal>.
- </para>
-
- <para>
- Here is an example, which assumes that the log file group
- <literal>lg_3</literal> has already been created using
- <literal>CREATE LOGFILE GROUP</literal> (see
- <xref linkend="create-logfile-group"/>):
- </para>
-
-<programlisting>
-ALTER LOGFILE GROUP lg_3
- ADD UNDOFILE 'undo_10.dat'
- INITIAL_SIZE=32M
- ENGINE=NDB;
-</programlisting>
-
- <para>
- When <literal>ALTER LOGFILE GROUP</literal> is used with
- <literal>ENGINE = NDB</literal>, an
<literal>UNDO</literal> log
- file is created on each Cluster data node. You can verify that
- the <literal>UNDO</literal> files were created and obtain
- information about them by querying the
- <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
- </para>
-
-<programlisting>
-mysql> <userinput>SELECT FILE_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
- -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
- -> <userinput>WHERE LOGFILE_GROUP_NAME = 'lg_3';</userinput>
-+-------------+----------------------+----------------+
-| FILE_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
-+-------------+----------------------+----------------+
-| newdata.dat | 0 | CLUSTER_NODE=3 |
-| newdata.dat | 0 | CLUSTER_NODE=4 |
-| undo_10.dat | 11 | CLUSTER_NODE=3 |
-| undo_10.dat | 11 | CLUSTER_NODE=4 |
-+-------------+----------------------+----------------+
-4 rows in set (0.01 sec)
-</programlisting>
-
- <para>
- (See <xref linkend="files-table"/>.)
- </para>
-
- <para>
- <literal>ALTER LOGFILE GROUP</literal> was added in MySQL 5.1.6.
- In MySQL 5.1, it is useful only with Disk Data storage for MySQL
- Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
- </para>
-
- </section>
-
<section id="alter-tablespace">
<title><literal>ALTER TABLESPACE</literal> Syntax</title>
@@ -1565,56 +1615,6 @@
</section>
- <section id="alter-server">
-
- <title><literal>ALTER SERVER</literal> Syntax</title>
-
- <indexterm>
- <primary>ALTER SERVER</primary>
- </indexterm>
-
- <remark role="help-topic" condition="ALTER SERVER"/>
-
- <remark role="help-keywords">
- ALTER SERVER OPTIONS
- </remark>
-
- <remark role="help-syntax"/>
-
-<programlisting>
-ALTER SERVER <replaceable>server_name</replaceable>
-OPTIONS (<replaceable>option</replaceable> ...)
-</programlisting>
-
- <remark role="help-description-begin"/>
-
- <para>
- Alters the server information for
-
<literal><replaceable>server_name</replaceable></literal>,
- adjusting the specified options as per the <literal>CREATE
- SERVER</literal> command. See <xref linkend="create-server"/>.
- The corresponding fields in the <literal>mysql.servers</literal>
- table are updated accordingly. This statement requires the
- <literal>SUPER</literal> privilege.
- </para>
-
- <remark role="help-description-end"/>
-
- <para>
- For example, to update the <literal>USER</literal> option:
- </para>
-
- <remark role="help-example"/>
-
-<programlisting>ALTER SERVER s OPTIONS (USER 'sally');</programlisting>
-
- <para>
- <literal>ALTER SERVER</literal> does not cause an automatic
- commit.
- </para>
-
- </section>
-
<section id="create-database">
<title><literal>CREATE DATABASE</literal> Syntax</title>
@@ -2160,6 +2160,216 @@
</section>
+ <section id="create-logfile-group">
+
+ <title><literal>CREATE LOGFILE GROUP</literal>
Syntax</title>
+
+ <indexterm>
+ <primary><literal>CREATE LOGFILE
GROUP</literal></primary>
+<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
+ </indexterm>
+
+<programlisting>
+CREATE LOGFILE GROUP <replaceable>logfile_group</replaceable>
+ ADD UNDOFILE '<replaceable>undo_file</replaceable>'
+ [INITIAL_SIZE [=] <replaceable>initial_size</replaceable>]
+ [UNDO_BUFFER_SIZE [=] <replaceable>undo_buffer_size</replaceable>]
+ ENGINE [=] <replaceable>engine_name</replaceable>
+</programlisting>
+
+ <para>
+ This statement creates a new log file group named
+ <replaceable>logfile_group</replaceable> having a single
+ <literal>UNDO</literal> file named
+ '<replaceable>undo_file</replaceable>'. A <literal>CREATE
+ LOGFILE GROUP</literal> statement has one and only one
+ <literal>ADD UNDOFILE</literal> clause.
+ </para>
+
+ <para>
+ Beginning with MySQL 5.1.8, you can have only one log file group
+ per Cluster at any given time. (See Bug #16386)
+ </para>
+
+ <para>
+ The optional <literal>INITIAL_SIZE</literal> parameter sets the
+ <literal>UNDO</literal> file's initial size; if not specified,
+ it defaults to <literal>128M</literal> (128 megabytes). The
+ optional <literal>UNDO_BUFFFER_SIZE</literal> parameter sets the
+ size used by the <literal>UNDO</literal> buffer for the log file
+ group; The default value for <literal>UNDO_BUFFER_SIZE</literal>
+ is <literal>8M</literal> (eight megabytes); this value cannot
+ exceed the amount of system memory available. Both of these
+ parameters are specified in bytes. You may optionally follow
+ either or both of these with a one-letter abbreviation for an
+ order of magnitude, similar to those used in
+ <filename>my.cnf</filename>. Generally, this is one of the
+ letters <literal>M</literal> (for megabytes) or
+ <literal>G</literal> (for gigabytes).
+ </para>
+
+ <para>
+ The <literal>ENGINE</literal> parameter determines the storage
+ engine to be used by this log file group, with
+ <replaceable>engine</replaceable> being the name of the storage
+ engine. In MySQL 5.1. <replaceable>engine</replaceable> must be
+ one of the values <literal>NDB</literal> or
+ <literal>NDBCLUSTER</literal>.
+ </para>
+
+ <para>
+ When used with <literal>ENGINE [=] NDB</literal>, a log file
+ group and associated <literal>UNDO</literal> log file are
+ created on each Cluster data node. You can verify that the
+ <literal>UNDO</literal> files were created and obtain
+ information about them by querying the
+ <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
+ -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
+ -> <userinput>WHERE FILE_NAME = 'undo_10.dat';</userinput>
++--------------------+----------------------+----------------+
+| LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
++--------------------+----------------------+----------------+
+| lg_3 | 11 | CLUSTER_NODE=3 |
+| lg_3 | 11 | CLUSTER_NODE=4 |
++--------------------+----------------------+----------------+
+2 rows in set (0.06 sec)
+</programlisting>
+
+ <para>
+ (See <xref linkend="files-table"/>.)
+ </para>
+
+ <para>
+ <literal>CREATE LOGFILE GROUP</literal> was added in MySQL
+ 5.1.6. In MySQL 5.1, it is useful only with Disk Data storage
+ for MySQL Cluster. See
+ <xref linkend="mysql-cluster-disk-data"/>.
+ </para>
+
+ </section>
+
+ <section id="create-server">
+
+ <title><literal>CREATE SERVER</literal> Syntax</title>
+
+ <indexterm>
+ <primary>CREATE SERVER</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="CREATE SERVER"/>
+
+ <remark role="help-keywords">
+ CREATE SERVER DATA WRAPPER DATABASE FOREIGN HOST OPTIONS OWNER
+ PASSWORD PORT SOCKET USER
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+CREATE SERVER <replaceable>server_name</replaceable>
+ FOREIGN DATA WRAPPER <replaceable>wrapper_name</replaceable>
+ OPTIONS (<replaceable>option</replaceable> ...)
+
+<replaceable>option</replaceable>:
+ { HOST <replaceable>character-literal</replaceable>
+ | DATABASE <replaceable>character-literal</replaceable>
+ | USER <replaceable>character-literal</replaceable>
+ | PASSWORD <replaceable>character-literal</replaceable>
+ | SOCKET <replaceable>character-literal</replaceable>
+ | OWNER <replaceable>character-literal</replaceable>
+ | PORT <replaceable>numeric-literal</replaceable> }
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ This statement creates the definition of a server for use with
+ the <literal>FEDERATED</literal> storage engine. The
+ <literal>CREATE SERVER</literal> statement creates a new row
+ within the <literal>servers</literal> table within the
+ <literal>mysql</literal> database. This statement requires the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <para>
+ The
<literal><replaceable>server_name</replaceable></literal>
+ should be a unique reference to the server. Server definitions
+ are global within the scope of the server, it is not possible to
+ qualify the server definition to a specific database.
+ <literal><replaceable>server_name</replaceable></literal>
has a
+ maximum length of 63 characters (names longer than 63 characters
+ are silently truncated), and is case insensitive. You may
+ specify the name using single quotes.
+ </para>
+
+ <para>
+ The
<literal><replaceable>wrapper_name</replaceable></literal>
+ should be <literal>mysql</literal>, and may be quoted with
+ single quotes. Other values for
+
<literal><replaceable>wrapper_name</replaceable></literal> are
+ not currently supported.
+ </para>
+
+ <para>
+ For each
<literal><replaceable>option</replaceable></literal>
+ you must specify either a character literal or numeric literal.
+ Character literals are UTF8, support a maximum length of 64
+ characters and default to a blank (empty) string. String
+ literals are silently truncated to 64 characters. Numeric
+ literals must be a number between 0 and 9999, default value is
+ 0.
+ </para>
+
+ <para>
+ The <literal>CREATE SERVER</literal> statement creates an entry
+ in the <literal>mysql.server</literal> table that can later be
+ used with the <literal>CREATE TABLE</literal> statement when
+ creating a <literal>FEDERATED</literal> table. The options that
+ you specify will be used to populate the columns in the
+ <literal>mysql.server</literal> table. The table columns are
+ <literal>Server_name</literal>, <literal>Host</literal>,
+ <literal>Db</literal>, <literal>Username</literal>,
+ <literal>Password</literal>, <literal>Port</literal> and
+ <literal>Socket</literal>.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ For example:
+ </para>
+
+ <remark role="help-example"/>
+
+<programlisting>
+CREATE SERVER s
+FOREIGN DATA WRAPPER mysql
+OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
+</programlisting>
+
+ <para>
+ The data stored in the table can be used when creating a
+ connection to a <literal>FEDERATED</literal> table:
+ </para>
+
+<programlisting>CREATE TABLE t (s1 INT) ENGINE=FEDERATED
CONNECTION='s';</programlisting>
+
+ <para>
+ For more information, see
+ <xref linkend="federated-storage-engine"/>.
+ </para>
+
+ <para>
+ <literal>CREATE SERVER</literal> does not cause an automatic
+ commit.
+ </para>
+
+ </section>
+
<section id="create-table">
<title><literal>CREATE TABLE</literal> Syntax</title>
@@ -4313,98 +4523,6 @@
</section>
- <section id="create-logfile-group">
-
- <title><literal>CREATE LOGFILE GROUP</literal>
Syntax</title>
-
- <indexterm>
- <primary><literal>CREATE LOGFILE
GROUP</literal></primary>
-<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
- </indexterm>
-
-<programlisting>
-CREATE LOGFILE GROUP <replaceable>logfile_group</replaceable>
- ADD UNDOFILE '<replaceable>undo_file</replaceable>'
- [INITIAL_SIZE [=] <replaceable>initial_size</replaceable>]
- [UNDO_BUFFER_SIZE [=] <replaceable>undo_buffer_size</replaceable>]
- ENGINE [=] <replaceable>engine_name</replaceable>
-</programlisting>
-
- <para>
- This statement creates a new log file group named
- <replaceable>logfile_group</replaceable> having a single
- <literal>UNDO</literal> file named
- '<replaceable>undo_file</replaceable>'. A <literal>CREATE
- LOGFILE GROUP</literal> statement has one and only one
- <literal>ADD UNDOFILE</literal> clause.
- </para>
-
- <para>
- Beginning with MySQL 5.1.8, you can have only one log file group
- per Cluster at any given time. (See Bug #16386)
- </para>
-
- <para>
- The optional <literal>INITIAL_SIZE</literal> parameter sets the
- <literal>UNDO</literal> file's initial size; if not specified,
- it defaults to <literal>128M</literal> (128 megabytes). The
- optional <literal>UNDO_BUFFFER_SIZE</literal> parameter sets the
- size used by the <literal>UNDO</literal> buffer for the log file
- group; The default value for <literal>UNDO_BUFFER_SIZE</literal>
- is <literal>8M</literal> (eight megabytes); this value cannot
- exceed the amount of system memory available. Both of these
- parameters are specified in bytes. You may optionally follow
- either or both of these with a one-letter abbreviation for an
- order of magnitude, similar to those used in
- <filename>my.cnf</filename>. Generally, this is one of the
- letters <literal>M</literal> (for megabytes) or
- <literal>G</literal> (for gigabytes).
- </para>
-
- <para>
- The <literal>ENGINE</literal> parameter determines the storage
- engine to be used by this log file group, with
- <replaceable>engine</replaceable> being the name of the storage
- engine. In MySQL 5.1. <replaceable>engine</replaceable> must be
- one of the values <literal>NDB</literal> or
- <literal>NDBCLUSTER</literal>.
- </para>
-
- <para>
- When used with <literal>ENGINE [=] NDB</literal>, a log file
- group and associated <literal>UNDO</literal> log file are
- created on each Cluster data node. You can verify that the
- <literal>UNDO</literal> files were created and obtain
- information about them by querying the
- <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
- </para>
-
-<programlisting>
-mysql> <userinput>SELECT LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
- -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
- -> <userinput>WHERE FILE_NAME = 'undo_10.dat';</userinput>
-+--------------------+----------------------+----------------+
-| LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
-+--------------------+----------------------+----------------+
-| lg_3 | 11 | CLUSTER_NODE=3 |
-| lg_3 | 11 | CLUSTER_NODE=4 |
-+--------------------+----------------------+----------------+
-2 rows in set (0.06 sec)
-</programlisting>
-
- <para>
- (See <xref linkend="files-table"/>.)
- </para>
-
- <para>
- <literal>CREATE LOGFILE GROUP</literal> was added in MySQL
- 5.1.6. In MySQL 5.1, it is useful only with Disk Data storage
- for MySQL Cluster. See
- <xref linkend="mysql-cluster-disk-data"/>.
- </para>
-
- </section>
-
<section id="create-tablespace">
<title><literal>CREATE TABLESPACE</literal> Syntax</title>
@@ -4526,124 +4644,6 @@
</section>
- <section id="create-server">
-
- <title><literal>CREATE SERVER</literal> Syntax</title>
-
- <indexterm>
- <primary>CREATE SERVER</primary>
- </indexterm>
-
- <remark role="help-topic" condition="CREATE SERVER"/>
-
- <remark role="help-keywords">
- CREATE SERVER DATA WRAPPER DATABASE FOREIGN HOST OPTIONS OWNER
- PASSWORD PORT SOCKET USER
- </remark>
-
- <remark role="help-syntax"/>
-
-<programlisting>
-CREATE SERVER <replaceable>server_name</replaceable>
- FOREIGN DATA WRAPPER <replaceable>wrapper_name</replaceable>
- OPTIONS (<replaceable>option</replaceable> ...)
-
-<replaceable>option</replaceable>:
- { HOST <replaceable>character-literal</replaceable>
- | DATABASE <replaceable>character-literal</replaceable>
- | USER <replaceable>character-literal</replaceable>
- | PASSWORD <replaceable>character-literal</replaceable>
- | SOCKET <replaceable>character-literal</replaceable>
- | OWNER <replaceable>character-literal</replaceable>
- | PORT <replaceable>numeric-literal</replaceable> }
-</programlisting>
-
- <remark role="help-description-begin"/>
-
- <para>
- This statement creates the definition of a server for use with
- the <literal>FEDERATED</literal> storage engine. The
- <literal>CREATE SERVER</literal> statement creates a new row
- within the <literal>servers</literal> table within the
- <literal>mysql</literal> database. This statement requires the
- <literal>SUPER</literal> privilege.
- </para>
-
- <para>
- The
<literal><replaceable>server_name</replaceable></literal>
- should be a unique reference to the server. Server definitions
- are global within the scope of the server, it is not possible to
- qualify the server definition to a specific database.
- <literal><replaceable>server_name</replaceable></literal>
has a
- maximum length of 63 characters (names longer than 63 characters
- are silently truncated), and is case insensitive. You may
- specify the name using single quotes.
- </para>
-
- <para>
- The
<literal><replaceable>wrapper_name</replaceable></literal>
- should be <literal>mysql</literal>, and may be quoted with
- single quotes. Other values for
-
<literal><replaceable>wrapper_name</replaceable></literal> are
- not currently supported.
- </para>
-
- <para>
- For each
<literal><replaceable>option</replaceable></literal>
- you must specify either a character literal or numeric literal.
- Character literals are UTF8, support a maximum length of 64
- characters and default to a blank (empty) string. String
- literals are silently truncated to 64 characters. Numeric
- literals must be a number between 0 and 9999, default value is
- 0.
- </para>
-
- <para>
- The <literal>CREATE SERVER</literal> statement creates an entry
- in the <literal>mysql.server</literal> table that can later be
- used with the <literal>CREATE TABLE</literal> statement when
- creating a <literal>FEDERATED</literal> table. The options that
- you specify will be used to populate the columns in the
- <literal>mysql.server</literal> table. The table columns are
- <literal>Server_name</literal>, <literal>Host</literal>,
- <literal>Db</literal>, <literal>Username</literal>,
- <literal>Password</literal>, <literal>Port</literal> and
- <literal>Socket</literal>.
- </para>
-
- <remark role="help-description-end"/>
-
- <para>
- For example:
- </para>
-
- <remark role="help-example"/>
-
-<programlisting>
-CREATE SERVER s
-FOREIGN DATA WRAPPER mysql
-OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
-</programlisting>
-
- <para>
- The data stored in the table can be used when creating a
- connection to a <literal>FEDERATED</literal> table:
- </para>
-
-<programlisting>CREATE TABLE t (s1 INT) ENGINE=FEDERATED
CONNECTION='s';</programlisting>
-
- <para>
- For more information, see
- <xref linkend="federated-storage-engine"/>.
- </para>
-
- <para>
- <literal>CREATE SERVER</literal> does not cause an automatic
- commit.
- </para>
-
- </section>
-
<section id="drop-database">
<title><literal>DROP DATABASE</literal> Syntax</title>
@@ -4845,6 +4845,96 @@
</section>
+ <section id="drop-logfile-group">
+
+ <title><literal>DROP LOGFILE GROUP</literal> Syntax</title>
+
+ <indexterm>
+ <primary><literal>DROP LOGFILE GROUP</literal></primary>
+<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
+ </indexterm>
+
+<programlisting>
+DROP LOGFILE GROUP <replaceable>logfile_group</replaceable>
+ ENGINE [=] <replaceable>engine</replaceable>
+</programlisting>
+
+ <para>
+ This statement drops the log file group named
+ <replaceable>logfile_group</replaceable>. The log file group
+ must already exist or an error results. (For information on
+ creating log file groups, see
+ <xref linkend="create-logfile-group"/>.)
+ </para>
+
+ <para>
+ <emphasis role="bold">Important</emphasis>: Before dropping a
+ log file group, you must drop all tablespaces that use that log
+ file group for <literal>UNDO</literal> logging.
+ </para>
+
+ <para>
+ The required <literal>ENGINE</literal> clause provides the name
+ of the storage engine used by the log file group to be dropped.
+ In MySQL 5.1, the only permitted values for
+ <replaceable>engine</replaceable> are
<literal>NDB</literal> and
+ <literal>NDBCLUSTER</literal>.
+ </para>
+
+ <para>
+ <literal>DROP LOGFILE GROUP</literal> was added in MySQL 5.1.6.
+ In MySQL 5.1, it is useful only with Disk Data storage for MySQL
+ Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
+ </para>
+
+ </section>
+
+ <section id="drop-server">
+
+ <title><literal>DROP SERVER</literal> Syntax</title>
+
+ <indexterm>
+ <primary>DROP SERVER</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="DROP SERVER"/>
+
+ <remark role="help-keywords">
+ DROP SERVER IF EXISTS
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+DROP SERVER [ IF EXISTS ] <replaceable>server_name</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ Drops the server definition for the server named
+
<literal><replaceable>server_name</replaceable></literal>. The
+ corresponding row within the <literal>mysql.servers</literal>
+ table will be deleted. This statement requires the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <para>
+ Dropping a server for a table does not affect any
+ <literal>FEDERATED</literal> tables that used this connection
+ information when they were created. See
+ <xref linkend="create-server"/>.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ <literal>DROP SERVER</literal> does not cause an automatic
+ commit.
+ </para>
+
+ </section>
+
<section id="drop-table">
<title><literal>DROP TABLE</literal> Syntax</title>
@@ -4967,50 +5057,6 @@
</section>
- <section id="drop-logfile-group">
-
- <title><literal>DROP LOGFILE GROUP</literal> Syntax</title>
-
- <indexterm>
- <primary><literal>DROP LOGFILE GROUP</literal></primary>
-<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
- </indexterm>
-
-<programlisting>
-DROP LOGFILE GROUP <replaceable>logfile_group</replaceable>
- ENGINE [=] <replaceable>engine</replaceable>
-</programlisting>
-
- <para>
- This statement drops the log file group named
- <replaceable>logfile_group</replaceable>. The log file group
- must already exist or an error results. (For information on
- creating log file groups, see
- <xref linkend="create-logfile-group"/>.)
- </para>
-
- <para>
- <emphasis role="bold">Important</emphasis>: Before dropping a
- log file group, you must drop all tablespaces that use that log
- file group for <literal>UNDO</literal> logging.
- </para>
-
- <para>
- The required <literal>ENGINE</literal> clause provides the name
- of the storage engine used by the log file group to be dropped.
- In MySQL 5.1, the only permitted values for
- <replaceable>engine</replaceable> are
<literal>NDB</literal> and
- <literal>NDBCLUSTER</literal>.
- </para>
-
- <para>
- <literal>DROP LOGFILE GROUP</literal> was added in MySQL 5.1.6.
- In MySQL 5.1, it is useful only with Disk Data storage for MySQL
- Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
- </para>
-
- </section>
-
<section id="drop-tablespace">
<title><literal>DROP TABLESPACE</literal> Syntax</title>
@@ -5054,52 +5100,6 @@
</section>
- <section id="drop-server">
-
- <title><literal>DROP SERVER</literal> Syntax</title>
-
- <indexterm>
- <primary>DROP SERVER</primary>
- </indexterm>
-
- <remark role="help-topic" condition="DROP SERVER"/>
-
- <remark role="help-keywords">
- DROP SERVER IF EXISTS
- </remark>
-
- <remark role="help-syntax"/>
-
-<programlisting>
-DROP SERVER [ IF EXISTS ] <replaceable>server_name</replaceable>
-</programlisting>
-
- <remark role="help-description-begin"/>
-
- <para>
- Drops the server definition for the server named
-
<literal><replaceable>server_name</replaceable></literal>. The
- corresponding row within the <literal>mysql.servers</literal>
- table will be deleted. This statement requires the
- <literal>SUPER</literal> privilege.
- </para>
-
- <para>
- Dropping a server for a table does not affect any
- <literal>FEDERATED</literal> tables that used this connection
- information when they were created. See
- <xref linkend="create-server"/>.
- </para>
-
- <remark role="help-description-end"/>
-
- <para>
- <literal>DROP SERVER</literal> does not cause an automatic
- commit.
- </para>
-
- </section>
-
<section id="rename-database">
<title><literal>RENAME DATABASE</literal> Syntax</title>
Modified: trunk/refman-5.2/sql-syntax.xml
===================================================================
--- trunk/refman-5.2/sql-syntax.xml 2007-06-21 07:46:00 UTC (rev 6876)
+++ trunk/refman-5.2/sql-syntax.xml 2007-06-21 07:53:10 UTC (rev 6877)
Changed blocks: 9, Lines Added: 446, Lines Deleted: 446; 33670 bytes
@@ -154,6 +154,152 @@
</section>
+ <section id="alter-logfile-group">
+
+ <title><literal>ALTER LOGFILE GROUP</literal>
Syntax</title>
+
+ <indexterm>
+ <primary><literal>ALTER LOGFILE GROUP</literal></primary>
+<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
+ </indexterm>
+
+<programlisting>
+ALTER LOGFILE GROUP <replaceable>logfile_group</replaceable>
+ ADD UNDOFILE '<replaceable>file</replaceable>'
+ [INITIAL_SIZE [=] <replaceable>size</replaceable>]
+ ENGINE [=] <replaceable>engine</replaceable>
+</programlisting>
+
+ <para>
+ This statement adds an <literal>UNDO</literal> file named
+ '<replaceable>file</replaceable>' to an existing log file group
+ <replaceable>logfile_group</replaceable>. An <literal>ALTER
+ LOGFILE GROUP</literal> statement has one and only one
+ <literal>ADD UNDOFILE</literal> clause. No <literal>DROP
+ UNDOFILE</literal> clause is supported.
+ </para>
+
+ <para>
+ The optional <literal>INITIAL_SIZE</literal> parameter sets the
+ <literal>UNDO</literal> file's initial size in bytes; if not
+ specified, the initial size default to <literal>128M</literal>
+ (128 megabytes). You may optionally follow
+ <replaceable>size</replaceable> with a one-letter abbreviation
+ for an order of magnitude, similar to those used in
+ <filename>my.cnf</filename>. Generally, this is one of the
+ letters <literal>M</literal> (for megabytes) or
+ <literal>G</literal> (for gigabytes).
+ </para>
+
+ <para>
+ The <literal>ENGINE</literal> parameter (required) determines
+ the storage engine which is used by this log file group, with
+ <replaceable>engine</replaceable> being the name of the storage
+ engine. In MySQL 5.1, the only accepted values for
+ <replaceable>engine</replaceable> are
<literal>NDB</literal> and
+ <literal>NDBCLUSTER</literal>.
+ </para>
+
+ <para>
+ Here is an example, which assumes that the log file group
+ <literal>lg_3</literal> has already been created using
+ <literal>CREATE LOGFILE GROUP</literal> (see
+ <xref linkend="create-logfile-group"/>):
+ </para>
+
+<programlisting>
+ALTER LOGFILE GROUP lg_3
+ ADD UNDOFILE 'undo_10.dat'
+ INITIAL_SIZE=32M
+ ENGINE=NDB;
+</programlisting>
+
+ <para>
+ When <literal>ALTER LOGFILE GROUP</literal> is used with
+ <literal>ENGINE = NDB</literal>, an
<literal>UNDO</literal> log
+ file is created on each Cluster data node. You can verify that
+ the <literal>UNDO</literal> files were created and obtain
+ information about them by querying the
+ <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT FILE_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
+ -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
+ -> <userinput>WHERE LOGFILE_GROUP_NAME = 'lg_3';</userinput>
++-------------+----------------------+----------------+
+| FILE_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
++-------------+----------------------+----------------+
+| newdata.dat | 0 | CLUSTER_NODE=3 |
+| newdata.dat | 0 | CLUSTER_NODE=4 |
+| undo_10.dat | 11 | CLUSTER_NODE=3 |
+| undo_10.dat | 11 | CLUSTER_NODE=4 |
++-------------+----------------------+----------------+
+4 rows in set (0.01 sec)
+</programlisting>
+
+ <para>
+ (See <xref linkend="files-table"/>.)
+ </para>
+
+ <para>
+ <literal>ALTER LOGFILE GROUP</literal> was added in MySQL 5.1.6.
+ In MySQL 5.1, it is useful only with Disk Data storage for MySQL
+ Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
+ </para>
+
+ </section>
+
+ <section id="alter-server">
+
+ <title><literal>ALTER SERVER</literal> Syntax</title>
+
+ <indexterm>
+ <primary>ALTER SERVER</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="ALTER SERVER"/>
+
+ <remark role="help-keywords">
+ ALTER SERVER OPTIONS
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+ALTER SERVER <replaceable>server_name</replaceable>
+OPTIONS (<replaceable>option</replaceable> ...)
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ Alters the server information for
+
<literal><replaceable>server_name</replaceable></literal>,
+ adjusting the specified options as per the <literal>CREATE
+ SERVER</literal> command. See <xref linkend="create-server"/>.
+ The corresponding fields in the <literal>mysql.servers</literal>
+ table are updated accordingly. This statement requires the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ For example, to update the <literal>USER</literal> option:
+ </para>
+
+ <remark role="help-example"/>
+
+<programlisting>ALTER SERVER s OPTIONS (USER 'sally');</programlisting>
+
+ <para>
+ <literal>ALTER SERVER</literal> does not cause an automatic
+ commit.
+ </para>
+
+ </section>
+
<section id="alter-table">
<title><literal>ALTER TABLE</literal> Syntax</title>
@@ -1370,102 +1516,6 @@
</section>
- <section id="alter-logfile-group">
-
- <title><literal>ALTER LOGFILE GROUP</literal>
Syntax</title>
-
- <indexterm>
- <primary><literal>ALTER LOGFILE GROUP</literal></primary>
-<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
- </indexterm>
-
-<programlisting>
-ALTER LOGFILE GROUP <replaceable>logfile_group</replaceable>
- ADD UNDOFILE '<replaceable>file</replaceable>'
- [INITIAL_SIZE [=] <replaceable>size</replaceable>]
- ENGINE [=] <replaceable>engine</replaceable>
-</programlisting>
-
- <para>
- This statement adds an <literal>UNDO</literal> file named
- '<replaceable>file</replaceable>' to an existing log file group
- <replaceable>logfile_group</replaceable>. An <literal>ALTER
- LOGFILE GROUP</literal> statement has one and only one
- <literal>ADD UNDOFILE</literal> clause. No <literal>DROP
- UNDOFILE</literal> clause is supported.
- </para>
-
- <para>
- The optional <literal>INITIAL_SIZE</literal> parameter sets the
- <literal>UNDO</literal> file's initial size in bytes; if not
- specified, the initial size default to <literal>128M</literal>
- (128 megabytes). You may optionally follow
- <replaceable>size</replaceable> with a one-letter abbreviation
- for an order of magnitude, similar to those used in
- <filename>my.cnf</filename>. Generally, this is one of the
- letters <literal>M</literal> (for megabytes) or
- <literal>G</literal> (for gigabytes).
- </para>
-
- <para>
- The <literal>ENGINE</literal> parameter (required) determines
- the storage engine which is used by this log file group, with
- <replaceable>engine</replaceable> being the name of the storage
- engine. In MySQL 5.1, the only accepted values for
- <replaceable>engine</replaceable> are
<literal>NDB</literal> and
- <literal>NDBCLUSTER</literal>.
- </para>
-
- <para>
- Here is an example, which assumes that the log file group
- <literal>lg_3</literal> has already been created using
- <literal>CREATE LOGFILE GROUP</literal> (see
- <xref linkend="create-logfile-group"/>):
- </para>
-
-<programlisting>
-ALTER LOGFILE GROUP lg_3
- ADD UNDOFILE 'undo_10.dat'
- INITIAL_SIZE=32M
- ENGINE=NDB;
-</programlisting>
-
- <para>
- When <literal>ALTER LOGFILE GROUP</literal> is used with
- <literal>ENGINE = NDB</literal>, an
<literal>UNDO</literal> log
- file is created on each Cluster data node. You can verify that
- the <literal>UNDO</literal> files were created and obtain
- information about them by querying the
- <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
- </para>
-
-<programlisting>
-mysql> <userinput>SELECT FILE_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
- -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
- -> <userinput>WHERE LOGFILE_GROUP_NAME = 'lg_3';</userinput>
-+-------------+----------------------+----------------+
-| FILE_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
-+-------------+----------------------+----------------+
-| newdata.dat | 0 | CLUSTER_NODE=3 |
-| newdata.dat | 0 | CLUSTER_NODE=4 |
-| undo_10.dat | 11 | CLUSTER_NODE=3 |
-| undo_10.dat | 11 | CLUSTER_NODE=4 |
-+-------------+----------------------+----------------+
-4 rows in set (0.01 sec)
-</programlisting>
-
- <para>
- (See <xref linkend="files-table"/>.)
- </para>
-
- <para>
- <literal>ALTER LOGFILE GROUP</literal> was added in MySQL 5.1.6.
- In MySQL 5.1, it is useful only with Disk Data storage for MySQL
- Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
- </para>
-
- </section>
-
<section id="alter-tablespace">
<title><literal>ALTER TABLESPACE</literal> Syntax</title>
@@ -1565,56 +1615,6 @@
</section>
- <section id="alter-server">
-
- <title><literal>ALTER SERVER</literal> Syntax</title>
-
- <indexterm>
- <primary>ALTER SERVER</primary>
- </indexterm>
-
- <remark role="help-topic" condition="ALTER SERVER"/>
-
- <remark role="help-keywords">
- ALTER SERVER OPTIONS
- </remark>
-
- <remark role="help-syntax"/>
-
-<programlisting>
-ALTER SERVER <replaceable>server_name</replaceable>
-OPTIONS (<replaceable>option</replaceable> ...)
-</programlisting>
-
- <remark role="help-description-begin"/>
-
- <para>
- Alters the server information for
-
<literal><replaceable>server_name</replaceable></literal>,
- adjusting the specified options as per the <literal>CREATE
- SERVER</literal> command. See <xref linkend="create-server"/>.
- The corresponding fields in the <literal>mysql.servers</literal>
- table are updated accordingly. This statement requires the
- <literal>SUPER</literal> privilege.
- </para>
-
- <remark role="help-description-end"/>
-
- <para>
- For example, to update the <literal>USER</literal> option:
- </para>
-
- <remark role="help-example"/>
-
-<programlisting>ALTER SERVER s OPTIONS (USER 'sally');</programlisting>
-
- <para>
- <literal>ALTER SERVER</literal> does not cause an automatic
- commit.
- </para>
-
- </section>
-
<section id="create-database">
<title><literal>CREATE DATABASE</literal> Syntax</title>
@@ -2160,6 +2160,216 @@
</section>
+ <section id="create-logfile-group">
+
+ <title><literal>CREATE LOGFILE GROUP</literal>
Syntax</title>
+
+ <indexterm>
+ <primary><literal>CREATE LOGFILE
GROUP</literal></primary>
+<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
+ </indexterm>
+
+<programlisting>
+CREATE LOGFILE GROUP <replaceable>logfile_group</replaceable>
+ ADD UNDOFILE '<replaceable>undo_file</replaceable>'
+ [INITIAL_SIZE [=] <replaceable>initial_size</replaceable>]
+ [UNDO_BUFFER_SIZE [=] <replaceable>undo_buffer_size</replaceable>]
+ ENGINE [=] <replaceable>engine_name</replaceable>
+</programlisting>
+
+ <para>
+ This statement creates a new log file group named
+ <replaceable>logfile_group</replaceable> having a single
+ <literal>UNDO</literal> file named
+ '<replaceable>undo_file</replaceable>'. A <literal>CREATE
+ LOGFILE GROUP</literal> statement has one and only one
+ <literal>ADD UNDOFILE</literal> clause.
+ </para>
+
+ <para>
+ Beginning with MySQL 5.1.8, you can have only one log file group
+ per Cluster at any given time. (See Bug #16386)
+ </para>
+
+ <para>
+ The optional <literal>INITIAL_SIZE</literal> parameter sets the
+ <literal>UNDO</literal> file's initial size; if not specified,
+ it defaults to <literal>128M</literal> (128 megabytes). The
+ optional <literal>UNDO_BUFFFER_SIZE</literal> parameter sets the
+ size used by the <literal>UNDO</literal> buffer for the log file
+ group; The default value for <literal>UNDO_BUFFER_SIZE</literal>
+ is <literal>8M</literal> (eight megabytes); this value cannot
+ exceed the amount of system memory available. Both of these
+ parameters are specified in bytes. You may optionally follow
+ either or both of these with a one-letter abbreviation for an
+ order of magnitude, similar to those used in
+ <filename>my.cnf</filename>. Generally, this is one of the
+ letters <literal>M</literal> (for megabytes) or
+ <literal>G</literal> (for gigabytes).
+ </para>
+
+ <para>
+ The <literal>ENGINE</literal> parameter determines the storage
+ engine to be used by this log file group, with
+ <replaceable>engine</replaceable> being the name of the storage
+ engine. In MySQL 5.1. <replaceable>engine</replaceable> must be
+ one of the values <literal>NDB</literal> or
+ <literal>NDBCLUSTER</literal>.
+ </para>
+
+ <para>
+ When used with <literal>ENGINE [=] NDB</literal>, a log file
+ group and associated <literal>UNDO</literal> log file are
+ created on each Cluster data node. You can verify that the
+ <literal>UNDO</literal> files were created and obtain
+ information about them by querying the
+ <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
+ -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
+ -> <userinput>WHERE FILE_NAME = 'undo_10.dat';</userinput>
++--------------------+----------------------+----------------+
+| LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
++--------------------+----------------------+----------------+
+| lg_3 | 11 | CLUSTER_NODE=3 |
+| lg_3 | 11 | CLUSTER_NODE=4 |
++--------------------+----------------------+----------------+
+2 rows in set (0.06 sec)
+</programlisting>
+
+ <para>
+ (See <xref linkend="files-table"/>.)
+ </para>
+
+ <para>
+ <literal>CREATE LOGFILE GROUP</literal> was added in MySQL
+ 5.1.6. In MySQL 5.1, it is useful only with Disk Data storage
+ for MySQL Cluster. See
+ <xref linkend="mysql-cluster-disk-data"/>.
+ </para>
+
+ </section>
+
+ <section id="create-server">
+
+ <title><literal>CREATE SERVER</literal> Syntax</title>
+
+ <indexterm>
+ <primary>CREATE SERVER</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="CREATE SERVER"/>
+
+ <remark role="help-keywords">
+ CREATE SERVER DATA WRAPPER DATABASE FOREIGN HOST OPTIONS OWNER
+ PASSWORD PORT SOCKET USER
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+CREATE SERVER <replaceable>server_name</replaceable>
+ FOREIGN DATA WRAPPER <replaceable>wrapper_name</replaceable>
+ OPTIONS (<replaceable>option</replaceable> ...)
+
+<replaceable>option</replaceable>:
+ { HOST <replaceable>character-literal</replaceable>
+ | DATABASE <replaceable>character-literal</replaceable>
+ | USER <replaceable>character-literal</replaceable>
+ | PASSWORD <replaceable>character-literal</replaceable>
+ | SOCKET <replaceable>character-literal</replaceable>
+ | OWNER <replaceable>character-literal</replaceable>
+ | PORT <replaceable>numeric-literal</replaceable> }
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ This statement creates the definition of a server for use with
+ the <literal>FEDERATED</literal> storage engine. The
+ <literal>CREATE SERVER</literal> statement creates a new row
+ within the <literal>servers</literal> table within the
+ <literal>mysql</literal> database. This statement requires the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <para>
+ The
<literal><replaceable>server_name</replaceable></literal>
+ should be a unique reference to the server. Server definitions
+ are global within the scope of the server, it is not possible to
+ qualify the server definition to a specific database.
+ <literal><replaceable>server_name</replaceable></literal>
has a
+ maximum length of 63 characters (names longer than 63 characters
+ are silently truncated), and is case insensitive. You may
+ specify the name using single quotes.
+ </para>
+
+ <para>
+ The
<literal><replaceable>wrapper_name</replaceable></literal>
+ should be <literal>mysql</literal>, and may be quoted with
+ single quotes. Other values for
+
<literal><replaceable>wrapper_name</replaceable></literal> are
+ not currently supported.
+ </para>
+
+ <para>
+ For each
<literal><replaceable>option</replaceable></literal>
+ you must specify either a character literal or numeric literal.
+ Character literals are UTF8, support a maximum length of 64
+ characters and default to a blank (empty) string. String
+ literals are silently truncated to 64 characters. Numeric
+ literals must be a number between 0 and 9999, default value is
+ 0.
+ </para>
+
+ <para>
+ The <literal>CREATE SERVER</literal> statement creates an entry
+ in the <literal>mysql.server</literal> table that can later be
+ used with the <literal>CREATE TABLE</literal> statement when
+ creating a <literal>FEDERATED</literal> table. The options that
+ you specify will be used to populate the columns in the
+ <literal>mysql.server</literal> table. The table columns are
+ <literal>Server_name</literal>, <literal>Host</literal>,
+ <literal>Db</literal>, <literal>Username</literal>,
+ <literal>Password</literal>, <literal>Port</literal> and
+ <literal>Socket</literal>.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ For example:
+ </para>
+
+ <remark role="help-example"/>
+
+<programlisting>
+CREATE SERVER s
+FOREIGN DATA WRAPPER mysql
+OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
+</programlisting>
+
+ <para>
+ The data stored in the table can be used when creating a
+ connection to a <literal>FEDERATED</literal> table:
+ </para>
+
+<programlisting>CREATE TABLE t (s1 INT) ENGINE=FEDERATED
CONNECTION='s';</programlisting>
+
+ <para>
+ For more information, see
+ <xref linkend="federated-storage-engine"/>.
+ </para>
+
+ <para>
+ <literal>CREATE SERVER</literal> does not cause an automatic
+ commit.
+ </para>
+
+ </section>
+
<section id="create-table">
<title><literal>CREATE TABLE</literal> Syntax</title>
@@ -4313,98 +4523,6 @@
</section>
- <section id="create-logfile-group">
-
- <title><literal>CREATE LOGFILE GROUP</literal>
Syntax</title>
-
- <indexterm>
- <primary><literal>CREATE LOGFILE
GROUP</literal></primary>
-<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
- </indexterm>
-
-<programlisting>
-CREATE LOGFILE GROUP <replaceable>logfile_group</replaceable>
- ADD UNDOFILE '<replaceable>undo_file</replaceable>'
- [INITIAL_SIZE [=] <replaceable>initial_size</replaceable>]
- [UNDO_BUFFER_SIZE [=] <replaceable>undo_buffer_size</replaceable>]
- ENGINE [=] <replaceable>engine_name</replaceable>
-</programlisting>
-
- <para>
- This statement creates a new log file group named
- <replaceable>logfile_group</replaceable> having a single
- <literal>UNDO</literal> file named
- '<replaceable>undo_file</replaceable>'. A <literal>CREATE
- LOGFILE GROUP</literal> statement has one and only one
- <literal>ADD UNDOFILE</literal> clause.
- </para>
-
- <para>
- Beginning with MySQL 5.1.8, you can have only one log file group
- per Cluster at any given time. (See Bug #16386)
- </para>
-
- <para>
- The optional <literal>INITIAL_SIZE</literal> parameter sets the
- <literal>UNDO</literal> file's initial size; if not specified,
- it defaults to <literal>128M</literal> (128 megabytes). The
- optional <literal>UNDO_BUFFFER_SIZE</literal> parameter sets the
- size used by the <literal>UNDO</literal> buffer for the log file
- group; The default value for <literal>UNDO_BUFFER_SIZE</literal>
- is <literal>8M</literal> (eight megabytes); this value cannot
- exceed the amount of system memory available. Both of these
- parameters are specified in bytes. You may optionally follow
- either or both of these with a one-letter abbreviation for an
- order of magnitude, similar to those used in
- <filename>my.cnf</filename>. Generally, this is one of the
- letters <literal>M</literal> (for megabytes) or
- <literal>G</literal> (for gigabytes).
- </para>
-
- <para>
- The <literal>ENGINE</literal> parameter determines the storage
- engine to be used by this log file group, with
- <replaceable>engine</replaceable> being the name of the storage
- engine. In MySQL 5.1. <replaceable>engine</replaceable> must be
- one of the values <literal>NDB</literal> or
- <literal>NDBCLUSTER</literal>.
- </para>
-
- <para>
- When used with <literal>ENGINE [=] NDB</literal>, a log file
- group and associated <literal>UNDO</literal> log file are
- created on each Cluster data node. You can verify that the
- <literal>UNDO</literal> files were created and obtain
- information about them by querying the
- <literal>INFORMATION_SCHEMA.FILES</literal> table. For example:
- </para>
-
-<programlisting>
-mysql> <userinput>SELECT LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER,
EXTRA</userinput>
- -> <userinput>FROM INFORMATION_SCHEMA.FILES</userinput>
- -> <userinput>WHERE FILE_NAME = 'undo_10.dat';</userinput>
-+--------------------+----------------------+----------------+
-| LOGFILE_GROUP_NAME | LOGFILE_GROUP_NUMBER | EXTRA |
-+--------------------+----------------------+----------------+
-| lg_3 | 11 | CLUSTER_NODE=3 |
-| lg_3 | 11 | CLUSTER_NODE=4 |
-+--------------------+----------------------+----------------+
-2 rows in set (0.06 sec)
-</programlisting>
-
- <para>
- (See <xref linkend="files-table"/>.)
- </para>
-
- <para>
- <literal>CREATE LOGFILE GROUP</literal> was added in MySQL
- 5.1.6. In MySQL 5.1, it is useful only with Disk Data storage
- for MySQL Cluster. See
- <xref linkend="mysql-cluster-disk-data"/>.
- </para>
-
- </section>
-
<section id="create-tablespace">
<title><literal>CREATE TABLESPACE</literal> Syntax</title>
@@ -4526,124 +4644,6 @@
</section>
- <section id="create-server">
-
- <title><literal>CREATE SERVER</literal> Syntax</title>
-
- <indexterm>
- <primary>CREATE SERVER</primary>
- </indexterm>
-
- <remark role="help-topic" condition="CREATE SERVER"/>
-
- <remark role="help-keywords">
- CREATE SERVER DATA WRAPPER DATABASE FOREIGN HOST OPTIONS OWNER
- PASSWORD PORT SOCKET USER
- </remark>
-
- <remark role="help-syntax"/>
-
-<programlisting>
-CREATE SERVER <replaceable>server_name</replaceable>
- FOREIGN DATA WRAPPER <replaceable>wrapper_name</replaceable>
- OPTIONS (<replaceable>option</replaceable> ...)
-
-<replaceable>option</replaceable>:
- { HOST <replaceable>character-literal</replaceable>
- | DATABASE <replaceable>character-literal</replaceable>
- | USER <replaceable>character-literal</replaceable>
- | PASSWORD <replaceable>character-literal</replaceable>
- | SOCKET <replaceable>character-literal</replaceable>
- | OWNER <replaceable>character-literal</replaceable>
- | PORT <replaceable>numeric-literal</replaceable> }
-</programlisting>
-
- <remark role="help-description-begin"/>
-
- <para>
- This statement creates the definition of a server for use with
- the <literal>FEDERATED</literal> storage engine. The
- <literal>CREATE SERVER</literal> statement creates a new row
- within the <literal>servers</literal> table within the
- <literal>mysql</literal> database. This statement requires the
- <literal>SUPER</literal> privilege.
- </para>
-
- <para>
- The
<literal><replaceable>server_name</replaceable></literal>
- should be a unique reference to the server. Server definitions
- are global within the scope of the server, it is not possible to
- qualify the server definition to a specific database.
- <literal><replaceable>server_name</replaceable></literal>
has a
- maximum length of 63 characters (names longer than 63 characters
- are silently truncated), and is case insensitive. You may
- specify the name using single quotes.
- </para>
-
- <para>
- The
<literal><replaceable>wrapper_name</replaceable></literal>
- should be <literal>mysql</literal>, and may be quoted with
- single quotes. Other values for
-
<literal><replaceable>wrapper_name</replaceable></literal> are
- not currently supported.
- </para>
-
- <para>
- For each
<literal><replaceable>option</replaceable></literal>
- you must specify either a character literal or numeric literal.
- Character literals are UTF8, support a maximum length of 64
- characters and default to a blank (empty) string. String
- literals are silently truncated to 64 characters. Numeric
- literals must be a number between 0 and 9999, default value is
- 0.
- </para>
-
- <para>
- The <literal>CREATE SERVER</literal> statement creates an entry
- in the <literal>mysql.server</literal> table that can later be
- used with the <literal>CREATE TABLE</literal> statement when
- creating a <literal>FEDERATED</literal> table. The options that
- you specify will be used to populate the columns in the
- <literal>mysql.server</literal> table. The table columns are
- <literal>Server_name</literal>, <literal>Host</literal>,
- <literal>Db</literal>, <literal>Username</literal>,
- <literal>Password</literal>, <literal>Port</literal> and
- <literal>Socket</literal>.
- </para>
-
- <remark role="help-description-end"/>
-
- <para>
- For example:
- </para>
-
- <remark role="help-example"/>
-
-<programlisting>
-CREATE SERVER s
-FOREIGN DATA WRAPPER mysql
-OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
-</programlisting>
-
- <para>
- The data stored in the table can be used when creating a
- connection to a <literal>FEDERATED</literal> table:
- </para>
-
-<programlisting>CREATE TABLE t (s1 INT) ENGINE=FEDERATED
CONNECTION='s';</programlisting>
-
- <para>
- For more information, see
- <xref linkend="federated-storage-engine"/>.
- </para>
-
- <para>
- <literal>CREATE SERVER</literal> does not cause an automatic
- commit.
- </para>
-
- </section>
-
<section id="drop-database">
<title><literal>DROP DATABASE</literal> Syntax</title>
@@ -4845,6 +4845,96 @@
</section>
+ <section id="drop-logfile-group">
+
+ <title><literal>DROP LOGFILE GROUP</literal> Syntax</title>
+
+ <indexterm>
+ <primary><literal>DROP LOGFILE GROUP</literal></primary>
+<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
+ </indexterm>
+
+<programlisting>
+DROP LOGFILE GROUP <replaceable>logfile_group</replaceable>
+ ENGINE [=] <replaceable>engine</replaceable>
+</programlisting>
+
+ <para>
+ This statement drops the log file group named
+ <replaceable>logfile_group</replaceable>. The log file group
+ must already exist or an error results. (For information on
+ creating log file groups, see
+ <xref linkend="create-logfile-group"/>.)
+ </para>
+
+ <para>
+ <emphasis role="bold">Important</emphasis>: Before dropping a
+ log file group, you must drop all tablespaces that use that log
+ file group for <literal>UNDO</literal> logging.
+ </para>
+
+ <para>
+ The required <literal>ENGINE</literal> clause provides the name
+ of the storage engine used by the log file group to be dropped.
+ In MySQL 5.1, the only permitted values for
+ <replaceable>engine</replaceable> are
<literal>NDB</literal> and
+ <literal>NDBCLUSTER</literal>.
+ </para>
+
+ <para>
+ <literal>DROP LOGFILE GROUP</literal> was added in MySQL 5.1.6.
+ In MySQL 5.1, it is useful only with Disk Data storage for MySQL
+ Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
+ </para>
+
+ </section>
+
+ <section id="drop-server">
+
+ <title><literal>DROP SERVER</literal> Syntax</title>
+
+ <indexterm>
+ <primary>DROP SERVER</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="DROP SERVER"/>
+
+ <remark role="help-keywords">
+ DROP SERVER IF EXISTS
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+DROP SERVER [ IF EXISTS ] <replaceable>server_name</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ Drops the server definition for the server named
+
<literal><replaceable>server_name</replaceable></literal>. The
+ corresponding row within the <literal>mysql.servers</literal>
+ table will be deleted. This statement requires the
+ <literal>SUPER</literal> privilege.
+ </para>
+
+ <para>
+ Dropping a server for a table does not affect any
+ <literal>FEDERATED</literal> tables that used this connection
+ information when they were created. See
+ <xref linkend="create-server"/>.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ <para>
+ <literal>DROP SERVER</literal> does not cause an automatic
+ commit.
+ </para>
+
+ </section>
+
<section id="drop-table">
<title><literal>DROP TABLE</literal> Syntax</title>
@@ -4967,50 +5057,6 @@
</section>
- <section id="drop-logfile-group">
-
- <title><literal>DROP LOGFILE GROUP</literal> Syntax</title>
-
- <indexterm>
- <primary><literal>DROP LOGFILE GROUP</literal></primary>
-<!-- <seealso>MySQL Cluster Disk Data</seealso> -->
- </indexterm>
-
-<programlisting>
-DROP LOGFILE GROUP <replaceable>logfile_group</replaceable>
- ENGINE [=] <replaceable>engine</replaceable>
-</programlisting>
-
- <para>
- This statement drops the log file group named
- <replaceable>logfile_group</replaceable>. The log file group
- must already exist or an error results. (For information on
- creating log file groups, see
- <xref linkend="create-logfile-group"/>.)
- </para>
-
- <para>
- <emphasis role="bold">Important</emphasis>: Before dropping a
- log file group, you must drop all tablespaces that use that log
- file group for <literal>UNDO</literal> logging.
- </para>
-
- <para>
- The required <literal>ENGINE</literal> clause provides the name
- of the storage engine used by the log file group to be dropped.
- In MySQL 5.1, the only permitted values for
- <replaceable>engine</replaceable> are
<literal>NDB</literal> and
- <literal>NDBCLUSTER</literal>.
- </para>
-
- <para>
- <literal>DROP LOGFILE GROUP</literal> was added in MySQL 5.1.6.
- In MySQL 5.1, it is useful only with Disk Data storage for MySQL
- Cluster. See <xref linkend="mysql-cluster-disk-data"/>.
- </para>
-
- </section>
-
<section id="drop-tablespace">
<title><literal>DROP TABLESPACE</literal> Syntax</title>
@@ -5054,52 +5100,6 @@
</section>
- <section id="drop-server">
-
- <title><literal>DROP SERVER</literal> Syntax</title>
-
- <indexterm>
- <primary>DROP SERVER</primary>
- </indexterm>
-
- <remark role="help-topic" condition="DROP SERVER"/>
-
- <remark role="help-keywords">
- DROP SERVER IF EXISTS
- </remark>
-
- <remark role="help-syntax"/>
-
-<programlisting>
-DROP SERVER [ IF EXISTS ] <replaceable>server_name</replaceable>
-</programlisting>
-
- <remark role="help-description-begin"/>
-
- <para>
- Drops the server definition for the server named
-
<literal><replaceable>server_name</replaceable></literal>. The
- corresponding row within the <literal>mysql.servers</literal>
- table will be deleted. This statement requires the
- <literal>SUPER</literal> privilege.
- </para>
-
- <para>
- Dropping a server for a table does not affect any
- <literal>FEDERATED</literal> tables that used this connection
- information when they were created. See
- <xref linkend="create-server"/>.
- </para>
-
- <remark role="help-description-end"/>
-
- <para>
- <literal>DROP SERVER</literal> does not cause an automatic
- commit.
- </para>
-
- </section>
-
<section id="rename-database">
<title><literal>RENAME DATABASE</literal> Syntax</title>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r6877 - in trunk: refman-5.1 refman-5.2 | jon | 21 Jun |