Author: paul
Date: 2007-11-26 22:45:38 +0100 (Mon, 26 Nov 2007)
New Revision: 8897
Log:
r27383@frost: paul | 2007-11-26 15:41:32 -0600
Sync some translation files.
Removed:
trunk/th/refman-common/maxdb.en.xml
Modified:
trunk/it/refman-common/connector-mxj.xml
trunk/it/refman-common/credits.xml
trunk/it/refman-common/mysql-proxy.xml
trunk/it/refman-common/news-cnet-core.xml
trunk/it/refman-common/news-innodb.xml
trunk/it/refman-common/what-is.en.xml
trunk/pt/refman-common/connector-mxj.xml
trunk/pt/refman-common/credits.xml
trunk/pt/refman-common/mysql-proxy.xml
trunk/pt/refman-common/news-cnet-core.xml
trunk/pt/refman-common/news-innodb.xml
trunk/pt/refman-common/what-is.en.xml
trunk/th/refman-common/connector-j.xml
trunk/th/refman-common/connector-mxj.xml
trunk/th/refman-common/connector-net.xml
trunk/th/refman-common/connector-odbc.xml
trunk/th/refman-common/credits.xml
trunk/th/refman-common/manual-conventions.en.xml
trunk/th/refman-common/mysql-proxy.xml
trunk/th/refman-common/news-cj-core.xml
trunk/th/refman-common/news-cmxj-core.xml
trunk/th/refman-common/news-cnet-core.xml
trunk/th/refman-common/news-codbc-core.xml
trunk/th/refman-common/news-innodb.xml
trunk/th/refman-common/news-mysql-proxy-core.xml
trunk/th/refman-common/news-vstudioplugin-core.xml
trunk/th/refman-common/regexp.xml
trunk/th/refman-common/replication-drbd.xml
trunk/th/refman-common/what-is.en.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:33336
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:27326
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:22282
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:33336
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:27383
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:22282
Modified: trunk/it/refman-common/connector-mxj.xml
===================================================================
--- trunk/it/refman-common/connector-mxj.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/it/refman-common/connector-mxj.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 0, Lines Deleted: 4; 429 bytes
@@ -63,10 +63,6 @@
<title>Connector/MXJ Versions</title>
- <para>
- Connector/MX
- </para>
-
<itemizedlist>
<listitem>
Modified: trunk/it/refman-common/credits.xml
===================================================================
--- trunk/it/refman-common/credits.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/it/refman-common/credits.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 3, Lines Added: 10, Lines Deleted: 9; 1741 bytes
@@ -363,14 +363,14 @@
<listitem>
<para>
- The <literal>CASE</literal> expression.
+ The <function role="sqlop">CASE</function> expression.
</para>
</listitem>
<listitem>
<para>
- The <literal>MD5()</literal> and
- <literal>COALESCE()</literal> functions.
+ The <function role="sql">MD5()</function> and
+ <function role="sql">COALESCE()</function> functions.
</para>
</listitem>
@@ -781,9 +781,9 @@
<listitem>
<para>
- <literal>SHA1()</literal>,
- <literal>AES_ENCRYPT()</literal> and
- <literal>AES_DECRYPT()</literal> functions.
+ <function role="sql">SHA1()</function>,
+ <function role="sql">AES_ENCRYPT()</function> and
+ <function role="sql">AES_DECRYPT()</function> functions.
</para>
</listitem>
@@ -1463,9 +1463,10 @@
</para>
<para>
- <literal>FROM_UNIXTIME()</literal> time formatting,
- <literal>ENCRYPT()</literal> functions, and
- <command>bison</command> advisor. Active mailing list member.
+ <function role="sql">FROM_UNIXTIME()</function> time
+ formatting, <function role="sql">ENCRYPT()</function>
+ functions, and <command>bison</command> advisor. Active
+ mailing list member.
</para>
</listitem>
Modified: trunk/it/refman-common/mysql-proxy.xml
===================================================================
--- trunk/it/refman-common/mysql-proxy.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/it/refman-common/mysql-proxy.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 9, Lines Deleted: 0; 725 bytes
@@ -225,6 +225,15 @@
</itemizedlist>
+ <note>
+ <para>
+ On some operating systems you may need to manually build the
+ required components to get the latest version. If you are
+ having trouble compiling MySQL Proxy then consider using one
+ of the binary distributions.
+ </para>
+ </note>
+
<para>
Once these components are installed, you need to configure and
then build:
Modified: trunk/it/refman-common/news-cnet-core.xml
===================================================================
--- trunk/it/refman-common/news-cnet-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/it/refman-common/news-cnet-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 477 bytes
@@ -15,7 +15,7 @@
-->
<section id="connector-net-news">
- <title>Connector/NET Change History</title>
+ <title>MySQL Connector/NET Change History</title>
<remark role="dynamic-dependency-list"/>
Modified: trunk/it/refman-common/news-innodb.xml
===================================================================
--- trunk/it/refman-common/news-innodb.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/it/refman-common/news-innodb.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 6, Lines Deleted: 6; 1317 bytes
@@ -1688,10 +1688,10 @@
<listitem>
<para>
- Fixed a bug: If <literal>MIN()</literal> or
- <literal>MAX()</literal> resulted in a deadlock or a lock wait
- timeout, MySQL did not return an error, but returned
- <literal>NULL</literal> as the function value.
+ Fixed a bug: If <function role="sql">MIN()</function> or
+ <function role="sql">MAX()</function> resulted in a deadlock
+ or a lock wait timeout, MySQL did not return an error, but
+ returned <literal>NULL</literal> as the function value.
</para>
</listitem>
@@ -3576,8 +3576,8 @@
<listitem>
<para>
Fixed a crash when
- <literal>MAX(<replaceable>col</replaceable>)</literal>
is
- selected from an empty table, and
+ <function
role="sql">MAX(<replaceable>col</replaceable>)</function>
+ is selected from an empty table, and
<replaceable>col</replaceable> is a not the first column in a
multi-column index.
</para>
Modified: trunk/it/refman-common/what-is.en.xml
===================================================================
--- trunk/it/refman-common/what-is.en.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/it/refman-common/what-is.en.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 1; 680 bytes
@@ -484,7 +484,8 @@
<function role="sql">AVG()</function>,
<literal>STD()</literal>,
<function role="sql">SUM()</function>,
- <literal>MAX()</literal>, <literal>MIN()</literal>, and
+ <function role="sql">MAX()</function>,
+ <function role="sql">MIN()</function>, and
<function role="sql">GROUP_CONCAT()</function>).
</para>
</listitem>
Modified: trunk/pt/refman-common/connector-mxj.xml
===================================================================
--- trunk/pt/refman-common/connector-mxj.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/pt/refman-common/connector-mxj.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 0, Lines Deleted: 4; 429 bytes
@@ -63,10 +63,6 @@
<title>Connector/MXJ Versions</title>
- <para>
- Connector/MX
- </para>
-
<itemizedlist>
<listitem>
Modified: trunk/pt/refman-common/credits.xml
===================================================================
--- trunk/pt/refman-common/credits.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/pt/refman-common/credits.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 3, Lines Added: 10, Lines Deleted: 9; 1741 bytes
@@ -363,14 +363,14 @@
<listitem>
<para>
- The <literal>CASE</literal> expression.
+ The <function role="sqlop">CASE</function> expression.
</para>
</listitem>
<listitem>
<para>
- The <literal>MD5()</literal> and
- <literal>COALESCE()</literal> functions.
+ The <function role="sql">MD5()</function> and
+ <function role="sql">COALESCE()</function> functions.
</para>
</listitem>
@@ -781,9 +781,9 @@
<listitem>
<para>
- <literal>SHA1()</literal>,
- <literal>AES_ENCRYPT()</literal> and
- <literal>AES_DECRYPT()</literal> functions.
+ <function role="sql">SHA1()</function>,
+ <function role="sql">AES_ENCRYPT()</function> and
+ <function role="sql">AES_DECRYPT()</function> functions.
</para>
</listitem>
@@ -1463,9 +1463,10 @@
</para>
<para>
- <literal>FROM_UNIXTIME()</literal> time formatting,
- <literal>ENCRYPT()</literal> functions, and
- <command>bison</command> advisor. Active mailing list member.
+ <function role="sql">FROM_UNIXTIME()</function> time
+ formatting, <function role="sql">ENCRYPT()</function>
+ functions, and <command>bison</command> advisor. Active
+ mailing list member.
</para>
</listitem>
Modified: trunk/pt/refman-common/mysql-proxy.xml
===================================================================
--- trunk/pt/refman-common/mysql-proxy.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/pt/refman-common/mysql-proxy.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 9, Lines Deleted: 0; 725 bytes
@@ -225,6 +225,15 @@
</itemizedlist>
+ <note>
+ <para>
+ On some operating systems you may need to manually build the
+ required components to get the latest version. If you are
+ having trouble compiling MySQL Proxy then consider using one
+ of the binary distributions.
+ </para>
+ </note>
+
<para>
Once these components are installed, you need to configure and
then build:
Modified: trunk/pt/refman-common/news-cnet-core.xml
===================================================================
--- trunk/pt/refman-common/news-cnet-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/pt/refman-common/news-cnet-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 477 bytes
@@ -15,7 +15,7 @@
-->
<section id="connector-net-news">
- <title>Connector/NET Change History</title>
+ <title>MySQL Connector/NET Change History</title>
<remark role="dynamic-dependency-list"/>
Modified: trunk/pt/refman-common/news-innodb.xml
===================================================================
--- trunk/pt/refman-common/news-innodb.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/pt/refman-common/news-innodb.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 6, Lines Deleted: 6; 1317 bytes
@@ -1688,10 +1688,10 @@
<listitem>
<para>
- Fixed a bug: If <literal>MIN()</literal> or
- <literal>MAX()</literal> resulted in a deadlock or a lock wait
- timeout, MySQL did not return an error, but returned
- <literal>NULL</literal> as the function value.
+ Fixed a bug: If <function role="sql">MIN()</function> or
+ <function role="sql">MAX()</function> resulted in a deadlock
+ or a lock wait timeout, MySQL did not return an error, but
+ returned <literal>NULL</literal> as the function value.
</para>
</listitem>
@@ -3576,8 +3576,8 @@
<listitem>
<para>
Fixed a crash when
- <literal>MAX(<replaceable>col</replaceable>)</literal>
is
- selected from an empty table, and
+ <function
role="sql">MAX(<replaceable>col</replaceable>)</function>
+ is selected from an empty table, and
<replaceable>col</replaceable> is a not the first column in a
multi-column index.
</para>
Modified: trunk/pt/refman-common/what-is.en.xml
===================================================================
--- trunk/pt/refman-common/what-is.en.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/pt/refman-common/what-is.en.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 1; 680 bytes
@@ -484,7 +484,8 @@
<function role="sql">AVG()</function>,
<literal>STD()</literal>,
<function role="sql">SUM()</function>,
- <literal>MAX()</literal>, <literal>MIN()</literal>, and
+ <function role="sql">MAX()</function>,
+ <function role="sql">MIN()</function>, and
<function role="sql">GROUP_CONCAT()</function>).
</para>
</listitem>
Modified: trunk/th/refman-common/connector-j.xml
===================================================================
--- trunk/th/refman-common/connector-j.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/connector-j.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 7, Lines Added: 50, Lines Deleted: 12; 4903 bytes
@@ -16,10 +16,11 @@
</para>
<para>
- MySQL Connector/J is a JDBC-3.0 Type 4 driver, which means that is
- pure Java, implements version 3.0 of the JDBC specification, and
- communicates directly with the MySQL server using the MySQL
- protocol.
+ MySQL Connector/J is a JDBC Type 4 driver. Different versions are
+ available that are compatible with the JDBC-3.0 and JDBC-4.0
+ specifications. The Type 4 designation means that the driver is
+ pure-Java implementation of the MySQL protocol and does not rely on
+ the MySQL client libraries.
</para>
<para>
@@ -142,7 +143,7 @@
<listitem>
<para>
- Connector/J 5.1 is the Type IV pure-java JDBC driver and
+ Connector/J 5.1 is the Type IV pure Java JDBC driver and
provides compatibility with all the functionality of MySQL,
including 4.1, 5.0, 5.1 and the 6.0 alpha release featuring
the new Falcon storage engine. Connector/J 5.1 provides ease
@@ -226,13 +227,20 @@
</para>
</listitem>
+ <listitem>
+ <para>
+ JDK 1.6.x
+ </para>
+ </listitem>
+
</itemizedlist>
<para>
If you are building Connector/J from source using the source
distribution (see
<xref linkend="connector-j-installing-source"/>) then you must
- use JDK 1.4.x or newer to compiler the Connector package.
+ use JDK 1.4.x or newer to compiler the Connector package. For
+ Connector/J 5.1 you must use JDK-1.6.x.
</para>
<para>
@@ -703,6 +711,35 @@
</para>
</listitem>
+ <listitem>
+ <para>
+ In Connector/J 5.0.x and earlier, the alias for a table in
+ a <literal>SELECT</literal> statement is returned when
+ accessing the result set metadata using
+ <function>ResultSetMetaData.getColumnName()</function>.
+ This behavior however is not JDBC compliant, and in
+ Connector/J 5.1 this behavior was changed so that the
+ original table name, rather than the alias, is returned.
+ </para>
+
+ <para>
+ The JDBC-compliant behavior is designed to let API users
+ reconstruct the DML statement based on the metadata within
+ <literal>ResultSet</literal> and
+ <literal>ResultSetMetaData</literal>.
+ </para>
+
+ <para>
+ You can get the alias for a column in a result set by
+ calling
+ <function>ResultSetMetaData.getColumnLabel()</function>.
+ If you want to use the old non-compliant behavior with
+ <function>ResultSetMetaData.getColumnName()</function>,
+ use the <option>useOldAliasMetadataBehavior</option>
+ option and set the value to <literal>true</literal>.
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
@@ -3810,10 +3847,11 @@
<para>
For the examples in this section the MySQL world sample
- database will be used. The first task is to setup a MySQL data
- source through Spring. Components within Spring use the "bean"
- terminology. For example, to configure a connection to a MySQL
- server supporting the world sample database you might use:
+ database will be used. The first task is to set up a MySQL
+ data source through Spring. Components within Spring use the
+ "bean" terminology. For example, to configure a connection to
+ a MySQL server supporting the world sample database you might
+ use:
</para>
<programlisting><![CDATA[<util:map id="dbProps">
@@ -4107,7 +4145,7 @@
</programlisting>
<para>
- Now you need to setup the transaction configuration. The
+ Now you need to set up the transaction configuration. The
first thing you must do is create transaction manager to
manage the data source and a specification of what
transaction properties are required for for the
@@ -4172,7 +4210,7 @@
database connections available for web requests as needed.
Although MySQL does not spawn an extra process when a
connection is made, there is still a small amount of
- overhead to create and setup the connection. Pooling of
+ overhead to create and set up the connection. Pooling of
connections also alleviates problems such as collecting
large amounts of sockets in the <literal>TIME_WAIT</literal>
state.
Modified: trunk/th/refman-common/connector-mxj.xml
===================================================================
--- trunk/th/refman-common/connector-mxj.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/connector-mxj.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 0, Lines Deleted: 4; 429 bytes
@@ -63,10 +63,6 @@
<title>Connector/MXJ Versions</title>
- <para>
- Connector/MX
- </para>
-
<itemizedlist>
<listitem>
Modified: trunk/th/refman-common/connector-net.xml
===================================================================
--- trunk/th/refman-common/connector-net.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/connector-net.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 21, Lines Added: 655, Lines Deleted: 552; 59067 bytes
@@ -120,6 +120,23 @@
</para>
</note>
+ <para>
+ <emphasis role="bold">Key topics:</emphasis>
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ For connection string properties when using the
+ <classname>MySqlConnection</classname> class, see
+ <xref
+ linkend="connector-net-examples-mysqlconnection-connectionstring"/>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
<section id="connector-net-versions">
<title>Connector/NET Versions</title>
@@ -898,11 +915,11 @@
{
MySqlConnection* myConnection = new MySqlConnection(S"Persist Security Info=False;
database=test;server=myServer");
- myConnection-&gt;Open();
- MySqlTransaction* myTrans = myConnection-&gt;BeginTransaction();
+ myConnection->Open();
+ MySqlTransaction* myTrans = myConnection->BeginTransaction();
String* mySelectQuery = S"SELECT * FROM myTable";
MySqlCommand* myCommand = new MySqlCommand(mySelectQuery, myConnection, myTrans);
- myCommand-&gt;CommandTimeout = 20;
+ myCommand->CommandTimeout = 20;
};
</programlisting>
@@ -1644,9 +1661,9 @@
void CreateMySqlCommand(String* myScalarQuery, MySqlConnection* myConnection)
{
MySqlCommand* myCommand = new MySqlCommand(myScalarQuery, myConnection);
- myCommand-&gt;Connection-&gt;Open();
- myCommand-&gt;ExecuteScalar();
- myConnection-&gt;Close();
+ myCommand->Connection->Open();
+ myCommand->ExecuteScalar();
+ myConnection->Close();
}
</programlisting>
@@ -1945,12 +1962,12 @@
MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection);
myCommand.CommandText = "SELECT id, name FROM mytable WHERE age=?age";
myCommand.Parameters.Add(myParamArray);
- for (int j=0; j&lt;myParamArray.Length; j++)
+ for (int j=0; j<myParamArray.Length; j++)
{
myCommand.Parameters.Add(myParamArray[j]) ;
}
string myMessage = "";
- for (int i = 0; i &lt; myCommand.Parameters.Count; i++)
+ for (int i = 0; i < myCommand.Parameters.Count; i++)
{
myMessage += myCommand.Parameters[i].ToString() + "\n";
}
@@ -2786,6 +2803,525 @@
</section>
+ <section id="connector-net-examples-mysqlconnection-connectionstring">
+
+ <title>ConnectionString</title>
+
+ <para>
+ Gets or sets the string used to connect to a MySQL Server
+ database.
+ </para>
+
+ <para>
+ The <literal>ConnectionString</literal> returned may not be
+ exactly like what was originally set but will be indentical in
+ terms of keyword/value pairs. Security information will not be
+ included unless the Persist Security Info value is set to
+ true.
+ </para>
+
+ <para>
+ You can use the <literal>ConnectionString</literal> property
+ to connect to a database. The following example illustrates a
+ typical connection string.
+ </para>
+
+<programlisting>"Persist Security Info=False;database=MyDB;»
+ server=MySqlServer;user id=myUser;Password=myPass"</programlisting>
+
+ <para>
+ The <literal>ConnectionString</literal> property can be set
+ only when the connection is closed. Many of the connection
+ string values have corresponding read-only properties. When
+ the connection string is set, all of these properties are
+ updated, except when an error is detected. In this case, none
+ of the properties are updated.
+ <literal>MySqlConnection</literal> properties return only
+ those settings contained in the
+ <literal>ConnectionString</literal>.
+ </para>
+
+ <para>
+ To connect to a local machine, specify "localhost" for the
+ server. If you do not specify a server, localhost is assumed.
+ </para>
+
+ <para>
+ Resetting the <literal>ConnectionString</literal> on a closed
+ connection resets all connection string values (and related
+ properties) including the password. For example, if you set a
+ connection string that includes "Database= MyDb", and then
+ reset the connection string to "Data Source=myserver;User
+ Id=myUser;Password=myPass", the
+ <literal>MySqlConnection.Database</literal> property is no
+ longer set to MyDb.
+ </para>
+
+ <para>
+ The connection string is parsed immediately after being set.
+ If errors in syntax are found when parsing, a runtime
+ exception, such as <literal>ArgumentException</literal>, is
+ generated. Other errors can be found only when an attempt is
+ made to open the connection.
+ </para>
+
+ <para>
+ The basic format of a connection string consists of a series
+ of keyword/value pairs separated by semicolons. The equal sign
+ (<literal>=</literal>) connects each keyword and its value.
+ Additional notes on setting values for options:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ To include values that contain a semicolon, single-quote
+ character, or double-quote character, the value must be
+ enclosed in double quotes. If the value contains both a
+ semicolon and a double-quote character, the value can be
+ enclosed in single quotes. The single quote is also useful
+ if the value begins with a double-quote character.
+ Conversely, the double quote can be used if the value
+ begins with a single quote. If the value contains both
+ single-quote and double-quote characters, the quote
+ character used to enclose the value must be doubled each
+ time it occurs within the value.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ To include preceding or trailing spaces in the string
+ value, the value must be enclosed in either single quotes
+ or double quotes. Any leading or trailing spaces around
+ integer, Boolean, or enumerated values are ignored, even
+ if enclosed in quotes. However, spaces within a string
+ literal keyword or value are preserved. Using .NET
+ Framework version 1.1, single or double quotes may be used
+ within a connection string without using delimiters (for
+ example, Data Source= my'Server or Data Source=
+ my"Server), unless a quote character is the first or last
+ character in the value.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ To include an equal sign (=) in a keyword or value, it
+ must be preceded by another equal sign. For example, in
+ the hypothetical connection string
+ </para>
+
+<programlisting>"key==word=value"</programlisting>
+
+ <para>
+ the keyword is "key=word" and the value is "value".
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ If a specific keyword in a keyword= value pair occurs
+ multiple times in a connection string, the last occurrence
+ listed is used in the value set.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Keywords are not case sensitive.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
+ The following table lists the valid names for keyword values
+ within the <literal>ConnectionString</literal>.
+ </para>
+
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="10*"/>
+ <colspec colwidth="55*"/>
+ <tbody>
+ <row>
+ <entry>Name</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ <row>
+ <entry><literal>Connect Timeout</literal>,
<literal>Connection
+ Timeout</literal></entry>
+ <entry>15</entry>
+ <entry>The length of time (in seconds) to wait for a connection to
the server
+ before terminating the attempt and generating an
+ error.</entry>
+ </row>
+ <row>
+ <entry><literal>Host</literal>,
<literal>Server</literal>, <literal>Data
+ Source</literal>, <literal>DataSource</literal>,
+ <literal>Address</literal>,
<literal>Addr</literal>,
+ <literal>Network Address</literal></entry>
+ <entry>localhost</entry>
+ <entry>The name or network address of the instance of MySQL to
which to
+ connect. Multiple hosts can be specified separated by
+ &. This can be useful where multiple MySQL servers
+ are configured for replication and you are not
+ concerned about the precise server you are connecting
+ to. No attempt is made by the provider to synchronize
+ writes to the database so care should be taken when
+ using this option. In Unix environment with Mono, this
+ can be a fully qualified path to MySQL socket
+ filename. With this configuration, the Unix socket
+ will be used instead of TCP/IP socket. Currently only
+ a single socket name can be given so accessing MySQL
+ in a replicated environment using Unix sockets is not
+ currently supported.</entry>
+ </row>
+ <row>
+ <entry><literal>Ignore Prepare</literal></entry>
+ <entry>true</entry>
+ <entry>When true, instructs the provider to ignore any calls to
+ <literal>MySqlCommand.Prepare()</literal>. This option
+ is provided to prevent issues with corruption of the
+ statements when use with server side prepared
+ statements. If you want to use server-side prepare
+ statements, set this option to false. This option was
+ added in Connector/NET 5.0.3 and Connector/NET 1.0.9.</entry>
+ </row>
+ <row>
+ <entry><literal>Port</literal></entry>
+ <entry>3306</entry>
+ <entry>The port MySQL is using to listen for connections. Specify
-1 for this
+ value to use a named pipe connection (Windows only).
+ This value is ignored if Unix socket is used.</entry>
+ </row>
+ <row>
+ <entry><literal>Protocol</literal></entry>
+ <entry>socket</entry>
+ <entry>Specifies the type of connection to make to the
server.Values can be:
+ socket or tcp for a socket connection pipe for a named
+ pipe connection unix for a Unix socket connection
+ memory to use MySQL shared memory</entry>
+ </row>
+ <row>
+ <entry><literal>CharSet</literal>,
<literal>Character Set</literal></entry>
+ <entry/>
+ <entry>Specifies the character set that should be used to encode
all queries
+ sent to the server. Resultsets are still returned in
+ the character set of the data returned.</entry>
+ </row>
+ <row>
+ <entry><literal>Logging</literal></entry>
+ <entry>false</entry>
+ <entry>When true, various pieces of information is output to any
configured
+ TraceListeners.</entry>
+ </row>
+ <row>
+ <entry><literal>Allow Batch</literal></entry>
+ <entry>true</entry>
+ <entry>When true, multiple SQL statements can be sent with one
command
+ execution. -Note- Starting with MySQL 4.1.1, batch
+ statements should be separated by the server-defined
+ seperator character. Commands sent to earlier versions
+ of MySQL should be seperated with ';'.</entry>
+ </row>
+ <row>
+ <entry><literal>Encrypt</literal></entry>
+ <entry>false</entry>
+ <entry>For Connector/NET 5.0.3 and later, when
<literal>true</literal>, SSL
+ encryption is used for all data sent between the
+ client and server if the server has a certificate
+ installed. Recognized values are
+ <literal>true</literal>,
<literal>false</literal>,
+ <literal>yes</literal>, and
<literal>no</literal>. In
+ versions before 5.0.3, this option had no effect.</entry>
+ </row>
+ <row>
+ <entry><literal>Initial Catalog</literal>,
<literal>Database</literal></entry>
+ <entry>mysql</entry>
+ <entry>The name of the database to use intially</entry>
+ </row>
+ <row>
+ <entry><literal>Password</literal>,
<literal>pwd</literal></entry>
+ <entry/>
+ <entry>The password for the MySQL account being used.</entry>
+ </row>
+ <row>
+ <entry><literal>Persist Security
Info</literal></entry>
+ <entry>false</entry>
+ <entry>When set to <literal>false</literal> or
<literal>no</literal> (strongly
+ recommended), security-sensitive information, such as
+ the password, is not returned as part of the
+ connection if the connection is open or has ever been
+ in an open state. Resetting the connection string
+ resets all connection string values including the
+ password. Recognized values are
+ <literal>true</literal>,
<literal>false</literal>,
+ <literal>yes</literal>, and
<literal>no</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>User Id</literal>,
<literal>Username</literal>,
+ <literal>Uid</literal>, <literal>User
name</literal></entry>
+ <entry/>
+ <entry>The MySQL login account being used.</entry>
+ </row>
+ <row>
+ <entry><literal>Shared Memory
Name</literal></entry>
+ <entry>MYSQL</entry>
+ <entry>The name of the shared memory object to use for
communication if the
+ connection protocol is set to memory.</entry>
+ </row>
+ <row>
+ <entry><literal>Allow Zero
Datetime</literal></entry>
+ <entry>false</entry>
+ <entry>True to have MySqlDataReader.GetValue() return a
MySqlDateTime for date
+ or datetime columns that have illegal values. False
+ will cause a <literal>System.DateTime</literal> object
+ to be returned for legal values and an exception will
+ be thrown for illegal values.</entry>
+ </row>
+ <row>
+ <entry><literal>Convert Zero
Datetime</literal></entry>
+ <entry>false</entry>
+ <entry>True to have
<literal>MySqlDataReader.GetValue()</literal> and
+ <literal>MySqlDataReader.GetDateTime()</literal>
+ return DateTime.MinValue for date or datetime columns
+ that have illegal values.</entry>
+ </row>
+ <row>
+ <entry><literal>Old Syntax</literal>,
<literal>OldSyntax</literal></entry>
+ <entry>false</entry>
+ <entry>Allows use of '@' symbol as a parameter marker. See
+ <literal>MySqlCommand</literal> for more info. This is
+ for compatibility only. All future code should be
+ written to use the new '?' parameter marker.</entry>
+ </row>
+ <row>
+ <entry><literal>Pipe Name</literal>,
<literal>Pipe</literal></entry>
+ <entry>mysql</entry>
+ <entry>When set to the name of a named pipe, the
+ <literal>MySqlConnection</literal> will attempt to
+ connect to MySQL on that named pipe.This settings only
+ applies to the Windows platform.</entry>
+ </row>
+ <row>
+ <entry><literal>Procedure Cache</literal></entry>
+ <entry>25</entry>
+ <entry>Sets the size of the stored procedure cache. By default,
Connector/NET
+ will store the metadata (input/output datatypes) about
+ the last 25 stored procedures used. To disable the
+ stored procedure cache, set the value to zero (0).
+ This option was added in Connector/NET 5.0.2 and
+ Connector/NET 1.0.9.</entry>
+ </row>
+ <row>
+ <entry><literal>Use Procedure
Bodies</literal></entry>
+ <entry>true</entry>
+ <entry>Setting this option to <literal>false</literal>
indicates that the user
+ connecting to the database does not have the
+ <literal>SELECT</literal> privileges for the
+ <literal>mysql.proc</literal> (stored procedures)
+ table. When to set to <literal>false</literal>,
+ Connector/NET will not rely on this information being
+ available when the procedure is called. Because
+ Connector/NET will be unable to determine this
+ information, you should explicitly set the types of
+ the all the parameters before the call and the
+ parameters should be added to the command in the exact
+ same order as they appear in the procedure definition.
+ This option was added in Connector/NET 5.0.4 and
+ Connector/NET 1.0.10.</entry>
+ </row>
+ <row>
+ <entry><literal>default command
timeout</literal></entry>
+ <entry></entry>
+ <entry>Sets the default value of the command timeout to be used.
This does not
+ supercede the individual command timeout property on
+ an individual command object. If you set the command
+ timeout property, that will be used. This option was
+ added in Connector/NET 5.1.4</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ The following table lists the valid names for connection
+ pooling values within the <literal>ConnectionString</literal>.
+ For more information about connection pooling, see Connection
+ Pooling for the MySQL Data Provider.
+ </para>
+
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="35*"/>
+ <colspec colwidth="10*"/>
+ <colspec colwidth="55*"/>
+ <tbody>
+ <row>
+ <entry>Name</entry>
+ <entry>Default</entry>
+ <entry>Description</entry>
+ </row>
+ <row>
+ <entry><literal>Connection
Lifetime</literal></entry>
+ <entry>0</entry>
+ <entry>When a connection is returned to the pool, its creation time
is compared
+ with the current time, and the connection is destroyed
+ if that time span (in seconds) exceeds the value
+ specified by <literal>Connection Lifetime</literal>.
+ This is useful in clustered configurations to force
+ load balancing between a running server and a server
+ just brought online. A value of zero (0) causes pooled
+ connections to have the maximum connection timeout.</entry>
+ </row>
+ <row>
+ <entry><literal>Max Pool Size</literal></entry>
+ <entry>100</entry>
+ <entry>The maximum number of connections allowed in the
pool.</entry>
+ </row>
+ <row>
+ <entry><literal>Min Pool Size</literal></entry>
+ <entry>0</entry>
+ <entry>The minimum number of connections allowed in the
pool.</entry>
+ </row>
+ <row>
+ <entry><literal>Pooling</literal></entry>
+ <entry>true</entry>
+ <entry>When <literal>true</literal>, the
<literal>MySqlConnection</literal>
+ object is drawn from the appropriate pool, or if
+ necessary, is created and added to the appropriate
+ pool. Recognized values are <literal>true</literal>,
+ <literal>false</literal>,
<literal>yes</literal>, and
+ <literal>no</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>Reset Pooled Connections</literal>,
+ <literal>ResetConnections</literal>,
+ <literal>ResetPooledConnections</literal></entry>
+ <entry>true</entry>
+ <entry>Specifies whether a ping and a reset should be sent to the
server before
+ a pooled connection is returned. Not resetting will
+ yield faster connection opens but also will not clear
+ out session items such as temp tables.</entry>
+ </row>
+ <row>
+ <entry><literal>Cache Server Configuration</literal>,
+ <literal>CacheServerConfiguration</literal>,
+ <literal>CacheServerConfig</literal></entry>
+ <entry>false</entry>
+ <entry>Specifies whether server variables should be updated when a
pooled
+ connection is returned. Turning this one will yeild
+ faster opens but will also not catch any server
+ changes made by other connections.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ When setting keyword or connection pooling values that require
+ a Boolean value, you can use 'yes' instead of 'true', and 'no'
+ instead of 'false'.
+ </para>
+
+ <note>
+ <para>
+ The MySQL Data Provider uses the native socket protocol to
+ communicate with MySQL. Therefore, it does not support the
+ use of an ODBC data source name (DSN) when connecting to
+ MySQL because it does not add an ODBC layer.
+ </para>
+ </note>
+
+ <caution>
+ <para>
+ In this release, the application should use caution when
+ constructing a connection string based on user input (for
+ example when retrieving user ID and password information
+ from a dialog box, and appending it to the connection
+ string). The application should ensure that a user cannot
+ embed extra connection string parameters in these values
+ (for example, entering a password as
+ "validpassword;database=somedb" in an attempt to attach to a
+ different database).
+ </para>
+ </caution>
+
+ <para>
+ <emphasis role="bold">Examples</emphasis>
+ </para>
+
+ <para>
+ The following example creates a
+ <literal>MySqlConnection</literal> and sets some of its
+ properties
+ </para>
+
+ <para>
+ Visual Basic example:
+ </para>
+
+<programlisting> Public Sub CreateConnection()
+ Dim myConnection As New MySqlConnection()
+ myConnection.ConnectionString = "Persist Security
Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass"
+ myConnection.Open()
+ End Sub 'CreateConnection
+ </programlisting>
+
+ <para>
+ C# example:
+ </para>
+
+<programlisting> public void CreateConnection()
+ {
+ MySqlConnection myConnection = new MySqlConnection();
+ myConnection.ConnectionString = "Persist Security
Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass";
+ myConnection.Open();
+ }
+ </programlisting>
+
+ <para>
+ <emphasis role="bold">Examples</emphasis>
+ </para>
+
+ <para>
+ The following example creates a
+ <literal>MySqlConnection</literal> in Unix environment with
+ Mono installed. MySQL socket filename used in this example is
+ "/var/lib/mysql/mysql.sock". The actual filename depends on
+ your MySQL configuration.
+ </para>
+
+ <para>
+ Visual Basic example:
+ </para>
+
+<programlisting> Public Sub CreateConnection()
+ Dim myConnection As New MySqlConnection()
+ myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user
id=myUser; pwd=myPass"
+ myConnection.Open()
+ End Sub 'CreateConnection
+ </programlisting>
+
+ <para>
+ C# example:
+ </para>
+
+<programlisting> public void CreateConnection()
+ {
+ MySqlConnection myConnection = new MySqlConnection();
+ myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user
id=myUser; pwd=myPass";
+ myConnection.Open();
+ }
+ </programlisting>
+
+ </section>
+
<section id="connector-net-examples-mysqlconnection-open">
<title>Open</title>
@@ -3683,516 +4219,6 @@
</section>
- <section id="connector-net-examples-mysqlconnection-connectionstring">
-
- <title>ConnectionString</title>
-
- <para>
- Gets or sets the string used to connect to a MySQL Server
- database.
- </para>
-
- <para>
- The <literal>ConnectionString</literal> returned may not be
- exactly like what was originally set but will be indentical in
- terms of keyword/value pairs. Security information will not be
- included unless the Persist Security Info value is set to
- true.
- </para>
-
- <para>
- You can use the <literal>ConnectionString</literal> property
- to connect to a database. The following example illustrates a
- typical connection string.
- </para>
-
-<programlisting>"Persist Security Info=False;database=MyDB;»
- server=MySqlServer;user id=myUser;Password=myPass"</programlisting>
-
- <para>
- The <literal>ConnectionString</literal> property can be set
- only when the connection is closed. Many of the connection
- string values have corresponding read-only properties. When
- the connection string is set, all of these properties are
- updated, except when an error is detected. In this case, none
- of the properties are updated.
- <literal>MySqlConnection</literal> properties return only
- those settings contained in the
- <literal>ConnectionString</literal>.
- </para>
-
- <para>
- To connect to a local machine, specify "localhost" for the
- server. If you do not specify a server, localhost is assumed.
- </para>
-
- <para>
- Resetting the <literal>ConnectionString</literal> on a closed
- connection resets all connection string values (and related
- properties) including the password. For example, if you set a
- connection string that includes "Database= MyDb", and then
- reset the connection string to "Data Source=myserver;User
- Id=myUser;Password=myPass", the
- <literal>MySqlConnection.Database</literal> property is no
- longer set to MyDb.
- </para>
-
- <para>
- The connection string is parsed immediately after being set.
- If errors in syntax are found when parsing, a runtime
- exception, such as <literal>ArgumentException</literal>, is
- generated. Other errors can be found only when an attempt is
- made to open the connection.
- </para>
-
- <para>
- The basic format of a connection string consists of a series
- of keyword/value pairs separated by semicolons. The equal sign
- (<literal>=</literal>) connects each keyword and its value.
- Additional notes on setting values for options:
- </para>
-
- <itemizedlist>
-
- <listitem>
- <para>
- To include values that contain a semicolon, single-quote
- character, or double-quote character, the value must be
- enclosed in double quotes. If the value contains both a
- semicolon and a double-quote character, the value can be
- enclosed in single quotes. The single quote is also useful
- if the value begins with a double-quote character.
- Conversely, the double quote can be used if the value
- begins with a single quote. If the value contains both
- single-quote and double-quote characters, the quote
- character used to enclose the value must be doubled each
- time it occurs within the value.
- </para>
- </listitem>
-
- <listitem>
- <para>
- To include preceding or trailing spaces in the string
- value, the value must be enclosed in either single quotes
- or double quotes. Any leading or trailing spaces around
- integer, Boolean, or enumerated values are ignored, even
- if enclosed in quotes. However, spaces within a string
- literal keyword or value are preserved. Using .NET
- Framework version 1.1, single or double quotes may be used
- within a connection string without using delimiters (for
- example, Data Source= my'Server or Data Source=
- my"Server), unless a quote character is the first or last
- character in the value.
- </para>
- </listitem>
-
- <listitem>
- <para>
- To include an equal sign (=) in a keyword or value, it
- must be preceded by another equal sign. For example, in
- the hypothetical connection string
- </para>
-
-<programlisting>"key==word=value"</programlisting>
-
- <para>
- the keyword is "key=word" and the value is "value".
- </para>
- </listitem>
-
- <listitem>
- <para>
- If a specific keyword in a keyword= value pair occurs
- multiple times in a connection string, the last occurrence
- listed is used in the value set.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Keywords are not case sensitive.
- </para>
- </listitem>
-
- </itemizedlist>
-
- <para>
- The following table lists the valid names for keyword values
- within the <literal>ConnectionString</literal>.
- </para>
-
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="35*"/>
- <colspec colwidth="10*"/>
- <colspec colwidth="55*"/>
- <tbody>
- <row>
- <entry>Name</entry>
- <entry>Default</entry>
- <entry>Description</entry>
- </row>
- <row>
- <entry><literal>Connect Timeout</literal>,
<literal>Connection
- Timeout</literal></entry>
- <entry>15</entry>
- <entry>The length of time (in seconds) to wait for a connection to
the server
- before terminating the attempt and generating an
- error.</entry>
- </row>
- <row>
- <entry><literal>Host</literal>,
<literal>Server</literal>, <literal>Data
- Source</literal>, <literal>DataSource</literal>,
- <literal>Address</literal>,
<literal>Addr</literal>,
- <literal>Network Address</literal></entry>
- <entry>localhost</entry>
- <entry>The name or network address of the instance of MySQL to
which to
- connect. Multiple hosts can be specified separated by
- &. This can be useful where multiple MySQL servers
- are configured for replication and you are not
- concerned about the precise server you are connecting
- to. No attempt is made by the provider to synchronize
- writes to the database so care should be taken when
- using this option. In Unix environment with Mono, this
- can be a fully qualified path to MySQL socket
- filename. With this configuration, the Unix socket
- will be used instead of TCP/IP socket. Currently only
- a single socket name can be given so accessing MySQL
- in a replicated environment using Unix sockets is not
- currently supported.</entry>
- </row>
- <row>
- <entry><literal>Ignore Prepare</literal></entry>
- <entry>true</entry>
- <entry>When true, instructs the provider to ignore any calls to
- <literal>MySqlCommand.Prepare()</literal>. This option
- is provided to prevent issues with corruption of the
- statements when use with server side prepared
- statements. If you want to use server-side prepare
- statements, set this option to false. This option was
- added in Connector/NET 5.0.3 and Connector/NET 1.0.9.</entry>
- </row>
- <row>
- <entry><literal>Port</literal></entry>
- <entry>3306</entry>
- <entry>The port MySQL is using to listen for connections. Specify
-1 for this
- value to use a named pipe connection (Windows only).
- This value is ignored if Unix socket is used.</entry>
- </row>
- <row>
- <entry><literal>Protocol</literal></entry>
- <entry>socket</entry>
- <entry>Specifies the type of connection to make to the
server.Values can be:
- socket or tcp for a socket connection pipe for a named
- pipe connection unix for a Unix socket connection
- memory to use MySQL shared memory</entry>
- </row>
- <row>
- <entry><literal>CharSet</literal>,
<literal>Character Set</literal></entry>
- <entry/>
- <entry>Specifies the character set that should be used to encode
all queries
- sent to the server. Resultsets are still returned in
- the character set of the data returned.</entry>
- </row>
- <row>
- <entry><literal>Logging</literal></entry>
- <entry>false</entry>
- <entry>When true, various pieces of information is output to any
configured
- TraceListeners.</entry>
- </row>
- <row>
- <entry><literal>Allow Batch</literal></entry>
- <entry>true</entry>
- <entry>When true, multiple SQL statements can be sent with one
command
- execution. -Note- Starting with MySQL 4.1.1, batch
- statements should be separated by the server-defined
- seperator character. Commands sent to earlier versions
- of MySQL should be seperated with ';'.</entry>
- </row>
- <row>
- <entry><literal>Encrypt</literal></entry>
- <entry>false</entry>
- <entry>For Connector/NET 5.0.3 and later, when
<literal>true</literal>, SSL
- encryption is used for all data sent between the
- client and server if the server has a certificate
- installed. Recognized values are
- <literal>true</literal>,
<literal>false</literal>,
- <literal>yes</literal>, and
<literal>no</literal>. In
- versions before 5.0.3, this option had no effect.</entry>
- </row>
- <row>
- <entry><literal>Initial Catalog</literal>,
<literal>Database</literal></entry>
- <entry>mysql</entry>
- <entry>The name of the database to use intially</entry>
- </row>
- <row>
- <entry><literal>Password</literal>,
<literal>pwd</literal></entry>
- <entry/>
- <entry>The password for the MySQL account being used.</entry>
- </row>
- <row>
- <entry><literal>Persist Security
Info</literal></entry>
- <entry>false</entry>
- <entry>When set to <literal>false</literal> or
<literal>no</literal> (strongly
- recommended), security-sensitive information, such as
- the password, is not returned as part of the
- connection if the connection is open or has ever been
- in an open state. Resetting the connection string
- resets all connection string values including the
- password. Recognized values are
- <literal>true</literal>,
<literal>false</literal>,
- <literal>yes</literal>, and
<literal>no</literal>.</entry>
- </row>
- <row>
- <entry><literal>User Id</literal>,
<literal>Username</literal>,
- <literal>Uid</literal>, <literal>User
name</literal></entry>
- <entry/>
- <entry>The MySQL login account being used.</entry>
- </row>
- <row>
- <entry><literal>Shared Memory
Name</literal></entry>
- <entry>MYSQL</entry>
- <entry>The name of the shared memory object to use for
communication if the
- connection protocol is set to memory.</entry>
- </row>
- <row>
- <entry><literal>Allow Zero
Datetime</literal></entry>
- <entry>false</entry>
- <entry>True to have MySqlDataReader.GetValue() return a
MySqlDateTime for date
- or datetime columns that have illegal values. False
- will cause a <literal>System.DateTime</literal> object
- to be returned for legal values and an exception will
- be thrown for illegal values.</entry>
- </row>
- <row>
- <entry><literal>Convert Zero
Datetime</literal></entry>
- <entry>false</entry>
- <entry>True to have
<literal>MySqlDataReader.GetValue()</literal> and
- <literal>MySqlDataReader.GetDateTime()</literal>
- return DateTime.MinValue for date or datetime columns
- that have illegal values.</entry>
- </row>
- <row>
- <entry><literal>Old Syntax</literal>,
<literal>OldSyntax</literal></entry>
- <entry>false</entry>
- <entry>Allows use of '@' symbol as a parameter marker. See
- <literal>MySqlCommand</literal> for more info. This is
- for compatibility only. All future code should be
- written to use the new '?' parameter marker.</entry>
- </row>
- <row>
- <entry><literal>Pipe Name</literal>,
<literal>Pipe</literal></entry>
- <entry>mysql</entry>
- <entry>When set to the name of a named pipe, the
- <literal>MySqlConnection</literal> will attempt to
- connect to MySQL on that named pipe.This settings only
- applies to the Windows platform.</entry>
- </row>
- <row>
- <entry><literal>Procedure Cache</literal></entry>
- <entry>25</entry>
- <entry>Sets the size of the stored procedure cache. By default,
Connector/NET
- will store the metadata (input/output datatypes) about
- the last 25 stored procedures used. To disable the
- stored procedure cache, set the value to zero (0).
- This option was added in Connector/NET 5.0.2 and
- Connector/NET 1.0.9.</entry>
- </row>
- <row>
- <entry><literal>Use Procedure
Bodies</literal></entry>
- <entry>true</entry>
- <entry>Setting this option to <literal>false</literal>
indicates that the user
- connecting to the database does not have the
- <literal>SELECT</literal> privileges for the
- <literal>mysql.proc</literal> (stored procedures)
- table. When to set to <literal>false</literal>,
- Connector/NET will not rely on this information being
- available when the procedure is called. Because
- Connector/NET will be unable to determine this
- information, you should explicitly set the types of
- the all the parameters before the call and the
- parameters should be added to the command in the exact
- same order as they appear in the procedure definition.
- This option was added in Connector/NET 5.0.4 and
- Connector/NET 1.0.10.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- The following table lists the valid names for connection
- pooling values within the <literal>ConnectionString</literal>.
- For more information about connection pooling, see Connection
- Pooling for the MySQL Data Provider.
- </para>
-
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="35*"/>
- <colspec colwidth="10*"/>
- <colspec colwidth="55*"/>
- <tbody>
- <row>
- <entry>Name</entry>
- <entry>Default</entry>
- <entry>Description</entry>
- </row>
- <row>
- <entry><literal>Connection
Lifetime</literal></entry>
- <entry>0</entry>
- <entry>When a connection is returned to the pool, its creation time
is compared
- with the current time, and the connection is destroyed
- if that time span (in seconds) exceeds the value
- specified by <literal>Connection Lifetime</literal>.
- This is useful in clustered configurations to force
- load balancing between a running server and a server
- just brought online. A value of zero (0) causes pooled
- connections to have the maximum connection timeout.</entry>
- </row>
- <row>
- <entry><literal>Max Pool Size</literal></entry>
- <entry>100</entry>
- <entry>The maximum number of connections allowed in the
pool.</entry>
- </row>
- <row>
- <entry><literal>Min Pool Size</literal></entry>
- <entry>0</entry>
- <entry>The minimum number of connections allowed in the
pool.</entry>
- </row>
- <row>
- <entry><literal>Pooling</literal></entry>
- <entry>true</entry>
- <entry>When <literal>true</literal>, the
<literal>MySqlConnection</literal>
- object is drawn from the appropriate pool, or if
- necessary, is created and added to the appropriate
- pool. Recognized values are <literal>true</literal>,
- <literal>false</literal>,
<literal>yes</literal>, and
- <literal>no</literal>.</entry>
- </row>
- <row>
- <entry><literal>Reset Pooled Connections</literal>,
- <literal>ResetConnections</literal>,
- <literal>ResetPooledConnections</literal></entry>
- <entry>true</entry>
- <entry>Specifies whether a ping and a reset should be sent to the
server before
- a pooled connection is returned. Not resetting will
- yield faster connection opens but also will not clear
- out session items such as temp tables.</entry>
- </row>
- <row>
- <entry><literal>Cache Server Configuration</literal>,
- <literal>CacheServerConfiguration</literal>,
- <literal>CacheServerConfig</literal></entry>
- <entry>false</entry>
- <entry>Specifies whether server variables should be updated when a
pooled
- connection is returned. Turning this one will yeild
- faster opens but will also not catch any server
- changes made by other connections.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- When setting keyword or connection pooling values that require
- a Boolean value, you can use 'yes' instead of 'true', and 'no'
- instead of 'false'.
- </para>
-
- <note>
- <para>
- The MySQL Data Provider uses the native socket protocol to
- communicate with MySQL. Therefore, it does not support the
- use of an ODBC data source name (DSN) when connecting to
- MySQL because it does not add an ODBC layer.
- </para>
- </note>
-
- <caution>
- <para>
- In this release, the application should use caution when
- constructing a connection string based on user input (for
- example when retrieving user ID and password information
- from a dialog box, and appending it to the connection
- string). The application should ensure that a user cannot
- embed extra connection string parameters in these values
- (for example, entering a password as
- "validpassword;database=somedb" in an attempt to attach to a
- different database).
- </para>
- </caution>
-
- <para>
- <emphasis role="bold">Examples</emphasis>
- </para>
-
- <para>
- The following example creates a
- <literal>MySqlConnection</literal> and sets some of its
- properties
- </para>
-
- <para>
- Visual Basic example:
- </para>
-
-<programlisting> Public Sub CreateConnection()
- Dim myConnection As New MySqlConnection()
- myConnection.ConnectionString = "Persist Security
Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass"
- myConnection.Open()
- End Sub 'CreateConnection
- </programlisting>
-
- <para>
- C# example:
- </para>
-
-<programlisting> public void CreateConnection()
- {
- MySqlConnection myConnection = new MySqlConnection();
- myConnection.ConnectionString = "Persist Security
Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass";
- myConnection.Open();
- }
- </programlisting>
-
- <para>
- <emphasis role="bold">Examples</emphasis>
- </para>
-
- <para>
- The following example creates a
- <literal>MySqlConnection</literal> in Unix environment with
- Mono installed. MySQL socket filename used in this example is
- "/var/lib/mysql/mysql.sock". The actual filename depends on
- your MySQL configuration.
- </para>
-
- <para>
- Visual Basic example:
- </para>
-
-<programlisting> Public Sub CreateConnection()
- Dim myConnection As New MySqlConnection()
- myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user
id=myUser; pwd=myPass"
- myConnection.Open()
- End Sub 'CreateConnection
- </programlisting>
-
- <para>
- C# example:
- </para>
-
-<programlisting> public void CreateConnection()
- {
- MySqlConnection myConnection = new MySqlConnection();
- myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user
id=myUser; pwd=myPass";
- myConnection.Open();
- }
- </programlisting>
-
- </section>
-
</section>
<section id="connector-net-examples-mysqldataadapter">
@@ -19809,8 +19835,8 @@
<entry><link
linkend="connector-net-ref-mysqlclient-mysqlhelper-executedataset-overloads"
>ExecuteDataset</link></entry>
- <entry>Overloaded. Executes a single SQL statement and returns
the resultset in a
- DataSet. A new MySqlConnection object is created,
+ <entry>Overloaded. Executes a single SQL statement and returns
the resultset in
+ a DataSet. A new MySqlConnection object is created,
opened, and closed during this method.</entry>
</row>
<row>
@@ -19895,8 +19921,8 @@
<title><literal>MySqlHelper.ExecuteDataRow</literal>
Method</title>
<para>
- Executes a single SQL statement and returns the first row of
- the resultset. A new MySqlConnection object is created,
+ Executes a single SQL statement and returns the first row
+ of the resultset. A new MySqlConnection object is created,
opened, and closed during this method.
</para>
@@ -19976,8 +20002,8 @@
<title>ExecuteDataset Method</title>
<para>
- Executes a single SQL statement and returns the resultset in
- a DataSet. The state of the
+ Executes a single SQL statement and returns the resultset
+ in a DataSet. The state of the
<link
linkend="connector-net-ref-mysqlclient-mysqlconnection"
>MySqlConnection</link>
@@ -19989,8 +20015,8 @@
</para>
<para>
- Executes a single SQL statement and returns the resultset in
- a DataSet. The state of the
+ Executes a single SQL statement and returns the resultset
+ in a DataSet. The state of the
<link
linkend="connector-net-ref-mysqlclient-mysqlconnection"
>MySqlConnection</link>
@@ -20012,8 +20038,8 @@
</itemizedlist>
<para>
- Executes a single SQL statement and returns the resultset in
- a DataSet. The state of the
+ Executes a single SQL statement and returns the resultset
+ in a DataSet. The state of the
<link
linkend="connector-net-ref-mysqlclient-mysqlconnection"
>MySqlConnection</link>
@@ -20036,8 +20062,8 @@
</itemizedlist>
<para>
- Executes a single SQL statement and returns the resultset in
- a DataSet. A new MySqlConnection object is created,
+ Executes a single SQL statement and returns the resultset
+ in a DataSet. A new MySqlConnection object is created,
opened, and closed during this method.
</para>
@@ -20055,8 +20081,8 @@
</itemizedlist>
<para>
- Executes a single SQL statement and returns the resultset in
- a DataSet. A new MySqlConnection object is created,
+ Executes a single SQL statement and returns the resultset
+ in a DataSet. A new MySqlConnection object is created,
opened, and closed during this method.
</para>
@@ -20092,8 +20118,8 @@
<title><literal>MySqlHelper.ExecuteDataset</literal>
Method</title>
<para>
- Executes a single SQL statement and returns the resultset
- in a DataSet. The state of the
+ Executes a single SQL statement and returns the
+ resultset in a DataSet. The state of the
<link
linkend="connector-net-ref-mysqlclient-mysqlconnection"
>MySqlConnection</link>
@@ -20174,8 +20200,8 @@
<title><literal>MySqlHelper.ExecuteDataset</literal>
Method</title>
<para>
- Executes a single SQL statement and returns the resultset
- in a DataSet. The state of the
+ Executes a single SQL statement and returns the
+ resultset in a DataSet. The state of the
<link
linkend="connector-net-ref-mysqlclient-mysqlconnection"
>MySqlConnection</link>
@@ -20265,9 +20291,9 @@
<title><literal>MySqlHelper.ExecuteDataset</literal>
Method</title>
<para>
- Executes a single SQL statement and returns the resultset
- in a DataSet. A new MySqlConnection object is created,
- opened, and closed during this method.
+ Executes a single SQL statement and returns the
+ resultset in a DataSet. A new MySqlConnection object is
+ created, opened, and closed during this method.
</para>
<para>
@@ -20341,9 +20367,9 @@
<title><literal>MySqlHelper.ExecuteDataset</literal>
Method</title>
<para>
- Executes a single SQL statement and returns the resultset
- in a DataSet. A new MySqlConnection object is created,
- opened, and closed during this method.
+ Executes a single SQL statement and returns the
+ resultset in a DataSet. A new MySqlConnection object is
+ created, opened, and closed during this method.
</para>
<para>
@@ -21402,8 +21428,8 @@
<listitem>
<para>
- <literal>tablename</literal>: Tablename in the data set
- to update
+ <literal>tablename</literal>: Tablename in the data
+ set to update
</para>
</listitem>
@@ -24341,13 +24367,13 @@
</para>
<para>
- The second option is to create a data set in VB.NET and save it
- as XML. This XML file can then be used to design a report.
+ The second option is to create a data set in VB.NET and save
+ it as XML. This XML file can then be used to design a report.
This works quite well when displaying the report in your
application, but is less versatile at design time because you
- must choose all relevant columns when creating the data set. If
- you forget a column you must re-create the data set before the
- column can be added to the report.
+ must choose all relevant columns when creating the data set.
+ If you forget a column you must re-create the data set before
+ the column can be added to the report.
</para>
<para>
@@ -24623,9 +24649,10 @@
<para>
When a report is created from multiple tables using
- Connector/ODBC, a data set with multiple tables must be created
- in our application. This allows each table in the report data
- source to be replaced with a report in the data set.
+ Connector/ODBC, a data set with multiple tables must be
+ created in our application. This allows each table in the
+ report data source to be replaced with a report in the data
+ set.
</para>
<para>
@@ -24948,6 +24975,82 @@
</section>
+ <section id="connector-net-using-faq">
+
+ <title>Frequently Asked Questions</title>
+
+ <para>
+ The following details a number of frequently asked questions
+ about Connector/NET.
+ </para>
+
+ <qandaset>
+
+ <qandaentry>
+
+ <question>
+
+ <para>
+ How do I obtain the value of an auto-incremented column?
+ </para>
+
+ </question>
+
+ <answer>
+
+ <para>
+ When using the <classname>commandBuilder</classname> you
+ should make sure that you set the
+ <literal>ReturnGeneratedIdentifiers</literal> property to
+ <literal>true</literal>.
+ </para>
+
+ <para>
+ Then, you can use an active view on a table to access the
+ updated ID. For example:
+ </para>
+
+<programlisting>
+ conn = new MySql.Data.MySqlClient.MySqlConnection();
+ cmd = new MySql.Data.MySqlClient.MySqlCommand();
+ da = new MySql.Data.MySqlClient.MySqlDataAdapter();
+ cmdBuilder = new MySql.Data.MySqlClient.MySqlCommandBuilder();
+ SystemDataDataSet = new System.Data.DataSet();
+ SystemDataDataView = new System.Data.DataView();
+...
+ cmd.Connection = conn;
+ cmd.CommandText = "SELECT * FROM contacts";
+ da.SelectCommand = cmd;
+ da.Fill(SystemDataDataSet, "contacts");
+ cmdBuilder.DataAdapter = da;
+ cmdBuilder.ReturnGeneratedIdentifiers = true;
+ cmdBuilder.DataAdapter.SelectCommand.CommandText = "SELECT * FROM contacts";
+ cmdBuilder.RefreshSchema();
+
+ SystemDataDataView = SystemDataDataSet.Tables["contacts"].DefaultView;
+
+ SystemDataDataRow = SystemDataDataView.Table.NewRow();
+ SystemDataDataRow["status"] = 1;
+
+ SystemDataDataView.Table.Rows.Add(SystemDataDataRow);
+ da.Update(SystemDataDataSet, "contacts");
+ System.Console.WriteLine("ID after update: " + SystemDataDataRow["id"]);
+ </programlisting>
+
+ <para>
+ The <literal>SystemDataDataRow</literal> object in this
+ instance provides the interface to the updated
+ auto-increment value in the <literal>id</literal> column.
+ </para>
+
+ </answer>
+
+ </qandaentry>
+
+ </qandaset>
+
+ </section>
+
</section>
<section id="connect-net-support">
Modified: trunk/th/refman-common/connector-odbc.xml
===================================================================
--- trunk/th/refman-common/connector-odbc.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/connector-odbc.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 5, Lines Added: 456, Lines Deleted: 437; 40173 bytes
@@ -91,6 +91,14 @@
<listitem>
<para>
+ For information on the configuration options, see
+ <xref
+ linkend="myodbc-configuration-connection-parameters"/>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
For more information on connecting to a MySQL database from a
Windows host using Connector/ODBC see
<xref
@@ -2683,6 +2691,447 @@
</section>
+ <section id="myodbc-configuration-connection-parameters">
+
+ <title>Connector/ODBC Connection Parameters</title>
+
+ <para>
+ You can specify the parameters in the following tables for
+ Connector/ODBC when configuring a DSN. Users on Windows can use
+ the Options and Advanced panels when configuring a DSN to set
+ these parameters; see the table for information on which options
+ relate to which fields and checkboxes. On Unix and Mac OS X, use
+ the parameter name and value as the keyword/value pair in the
+ DSN configuration. Alternatively, you can set these parameters
+ within the <literal>InConnectionString</literal> argument in the
+ <literal>SQLDriverConnect()</literal> call.
+ </para>
+
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="15*"/>
+ <colspec colwidth="20*"/>
+ <colspec colwidth="65*"/>
+ <thead>
+ <row>
+ <entry>Parameter</entry>
+ <entry>Default Value</entry>
+ <entry>Comment</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>user</literal></entry>
+ <entry>ODBC</entry>
+ <entry>The username used to connect to MySQL.</entry>
+ </row>
+ <row>
+ <entry><literal>uid</literal></entry>
+ <entry>ODBC</entry>
+ <entry>Synonymous with <literal>user</literal>. Added in
3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>server</literal></entry>
+ <entry><literal>localhost</literal></entry>
+ <entry>The hostname of the MySQL server.</entry>
+ </row>
+ <row>
+ <entry><literal>database</literal></entry>
+ <entry/>
+ <entry>The default database.</entry>
+ </row>
+ <row>
+ <entry><literal>option</literal></entry>
+ <entry>0</entry>
+ <entry>Options that specify how Connector/ODBC should work. See
below.</entry>
+ </row>
+ <row>
+ <entry><literal>port</literal></entry>
+ <entry>3306</entry>
+ <entry>The TCP/IP port to use if
<literal>server</literal> is not
+ <literal>localhost</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>stmt</literal></entry>
+ <entry/>
+ <entry>A statement to execute when connecting to MySQL.</entry>
+ </row>
+ <row>
+ <entry><literal>password</literal></entry>
+ <entry/>
+ <entry>The password for the <literal>user</literal>
account on
+ <literal>server</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>pwd</literal></entry>
+ <entry/>
+ <entry>Synonymous with <literal>password</literal>. Added
in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>socket</literal></entry>
+ <entry/>
+ <entry>The Unix socket file or Windows named pipe to connect to if
+ <literal>server</literal> is
+ <literal>localhost</literal>.</entry>
+ </row>
+ <row>
+ <entry><literal>sslca</literal></entry>
+ <entry/>
+ <entry>The path to a file with a list of trust SSL CAs. Added in
3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslcapath</literal></entry>
+ <entry/>
+ <entry>The path to a directory that contains trusted SSL CA
certificates in PEM
+ format. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslcert</literal></entry>
+ <entry/>
+ <entry>The name of the SSL certificate file to use for establishing a
secure
+ connection. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslcipher</literal></entry>
+ <entry/>
+ <entry>A list of allowable ciphers to use for SSL encryption. The
cipher list
+ has the same format as the <literal>openssl
+ ciphers</literal> command Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>sslkey</literal></entry>
+ <entry/>
+ <entry>The name of the SSL key file to use for establishing a secure
+ connection. Added in 3.51.16.</entry>
+ </row>
+ <row>
+ <entry><literal>charset</literal></entry>
+ <entry/>
+ <entry>The character set to use for the connection. Added in
3.51.17.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <note>
+ <para>
+ The SSL configuration parameters can also be automatically
+ loaded from a <filename>my.ini</filename> or
+ <filename>my.cnf</filename> file.
+ </para>
+ </note>
+
+ <para>
+ The <literal>option</literal> argument is used to tell
+ Connector/ODBC that the client isn't 100% ODBC compliant. On
+ Windows, you normally select options by toggling the checkboxes
+ in the connection screen, but you can also select them in the
+ <literal>option</literal> argument. The following options are
+ listed in the order in which they appear in the Connector/ODBC
+ connect screen:
+ </para>
+
+ <informaltable>
+ <tgroup cols="4">
+ <colspec colwidth="10*"/>
+ <colspec colwidth="20*"/>
+ <colspec colwidth="20*"/>
+ <colspec colwidth="50*"/>
+ <tbody>
+ <row>
+ <entry><emphasis
role="bold">Value</emphasis></entry>
+ <entry><emphasis
role="bold">Flagname</emphasis></entry>
+ <entry><emphasis role="bold">GUI
Option</emphasis></entry>
+ <entry><emphasis
role="bold">Description</emphasis></entry>
+ </row>
+ <row>
+ <entry>1</entry>
+ <entry><literal>FLAG_FIELD_LENGTH</literal></entry>
+ <entry>Don't Optimize Column Width</entry>
+ <entry>The client can't handle that Connector/ODBC returns the real
width of a
+ column. This option was removed in 3.51.18.</entry>
+ </row>
+ <row>
+ <entry>2</entry>
+ <entry><literal>FLAG_FOUND_ROWS</literal></entry>
+ <entry>Return Matching Rows</entry>
+ <entry>The client can't handle that MySQL returns the true value of
affected
+ rows. If this flag is set, MySQL returns <quote>found
+ rows</quote> instead. You must have MySQL 3.21.14 or
+ newer to get this to work.</entry>
+ </row>
+ <row>
+ <entry>4</entry>
+ <entry><literal>FLAG_DEBUG</literal></entry>
+ <entry>Trace Driver Calls To myodbc.log</entry>
+ <entry>Make a debug log in
<filename>C:\myodbc.log</filename> on Windows, or
+ <filename>/tmp/myodbc.log</filename> on Unix
variants.</entry>
+ </row>
+ <row>
+ <entry>8</entry>
+ <entry><literal>FLAG_BIG_PACKETS</literal></entry>
+ <entry>Allow Big Results</entry>
+ <entry>Don't set any packet limit for results and
parameters.</entry>
+ </row>
+ <row>
+ <entry>16</entry>
+ <entry><literal>FLAG_NO_PROMPT</literal></entry>
+ <entry>Don't Prompt Upon Connect</entry>
+ <entry>Don't prompt for questions even if driver would like to
prompt.</entry>
+ </row>
+ <row>
+ <entry>32</entry>
+
<entry><literal>FLAG_DYNAMIC_CURSOR</literal></entry>
+ <entry>Enable Dynamic Cursor</entry>
+ <entry>Enable or disable the dynamic cursor support. (Not allowed in
+ Connector/ODBC 2.50.)</entry>
+ </row>
+ <row>
+ <entry>64</entry>
+ <entry><literal>FLAG_NO_SCHEMA</literal></entry>
+ <entry>Ignore # in Table Name</entry>
+ <entry>Ignore use of database name in
+ <literal>db_name.tbl_name.col_name</literal>.</entry>
+ </row>
+ <row>
+ <entry>128</entry>
+
<entry><literal>FLAG_NO_DEFAULT_CURSOR</literal></entry>
+ <entry>User Manager Cursors</entry>
+ <entry>Force use of ODBC manager cursors
(experimental).</entry>
+ </row>
+ <row>
+ <entry>256</entry>
+ <entry><literal>FLAG_NO_LOCALE</literal></entry>
+ <entry>Don't Use Set Locale</entry>
+ <entry>Disable the use of extended fetch
(experimental).</entry>
+ </row>
+ <row>
+ <entry>512</entry>
+ <entry><literal>FLAG_PAD_SPACE</literal></entry>
+ <entry>Pad Char To Full Length</entry>
+ <entry>Pad <literal>CHAR</literal> columns to full column
length.</entry>
+ </row>
+ <row>
+ <entry>1024</entry>
+
<entry><literal>FLAG_FULL_COLUMN_NAMES</literal></entry>
+ <entry>Return Table Names for SQLDescribeCol</entry>
+ <entry><literal>SQLDescribeCol()</literal> returns fully
qualified column
+ names.</entry>
+ </row>
+ <row>
+ <entry>2048</entry>
+
<entry><literal>FLAG_COMPRESSED_PROTO</literal></entry>
+ <entry>Use Compressed Protocol</entry>
+ <entry>Use the compressed client/server protocol.</entry>
+ </row>
+ <row>
+ <entry>4096</entry>
+ <entry><literal>FLAG_IGNORE_SPACE</literal></entry>
+ <entry>Ignore Space After Function Names</entry>
+ <entry>Tell server to ignore space after function name and before
+ <quote><literal>(</literal></quote> (needed by
+ PowerBuilder). This makes all function names keywords.</entry>
+ </row>
+ <row>
+ <entry>8192</entry>
+ <entry><literal>FLAG_NAMED_PIPE</literal></entry>
+ <entry>Force Use of Named Pipes</entry>
+ <entry>Connect with named pipes to a
<command>mysqld</command> server running
+ on NT.</entry>
+ </row>
+ <row>
+ <entry>16384</entry>
+ <entry><literal>FLAG_NO_BIGINT</literal></entry>
+ <entry>Change BIGINT Columns to Int</entry>
+ <entry>Change <literal>BIGINT</literal> columns to
<literal>INT</literal>
+ columns (some applications can't handle
+ <literal>BIGINT</literal>).</entry>
+ </row>
+ <row>
+ <entry>32768</entry>
+ <entry><literal>FLAG_NO_CATALOG</literal></entry>
+ <entry>No Catalog</entry>
+ <entry>Forces results from the catalog functions, such as
+ <literal>SQLTables</literal>, to always return
+ <literal>NULL</literal> and the driver to report that
+ catalogs are not supported.</entry>
+ </row>
+ <row>
+ <entry>65536</entry>
+ <entry><literal>FLAG_USE_MYCNF</literal></entry>
+ <entry>Read Options From
<literal>my.cnf</literal></entry>
+ <entry>Read parameters from the
<literal>[client]</literal> and
+ <literal>[odbc]</literal> groups from
+ <filename>my.cnf</filename>.</entry>
+ </row>
+ <row>
+ <entry>131072</entry>
+ <entry><literal>FLAG_SAFE</literal></entry>
+ <entry>Safe</entry>
+ <entry>Add some extra safety checks.</entry>
+ </row>
+ <row>
+ <entry>262144</entry>
+
<entry><literal>FLAG_NO_TRANSACTIONS</literal></entry>
+ <entry>Disable transactions</entry>
+ <entry>Disable transactions.</entry>
+ </row>
+ <row>
+ <entry>524288</entry>
+ <entry><literal>FLAG_LOG_QUERY</literal></entry>
+ <entry>Save queries to
<filename>myodbc.sql</filename></entry>
+ <entry>Enable query logging to
+
<filename>c:\myodbc.sql</filename>(<filename>/tmp/myodbc.sql</filename>)
+ file. (Enabled only in debug mode.)</entry>
+ </row>
+ <row>
+ <entry>1048576</entry>
+ <entry><literal>FLAG_NO_CACHE</literal></entry>
+ <entry>Don't Cache Result (forward only cursors)</entry>
+ <entry>Do not cache the results locally in the driver, instead read
from server
+ (<function role="capi">mysql_use_result()</function>).
+ This works only for forward-only cursors. This option is
+ very important in dealing with large tables when you
+ don't want the driver to cache the entire result set.</entry>
+ </row>
+ <row>
+ <entry>2097152</entry>
+
<entry><literal>FLAG_FORWARD_CURSOR</literal></entry>
+ <entry>Force Use Of Forward Only Cursors</entry>
+ <entry>Force the use of <literal>Forward-only</literal>
cursor type. In case of
+ applications setting the default static/dynamic cursor
+ type, and one wants the driver to use non-cache result
+ sets, then this option ensures the forward-only cursor
+ behavior.</entry>
+ </row>
+ <row>
+ <entry>4194304</entry>
+
<entry><literal>FLAG_AUTO_RECONNECT</literal></entry>
+ <entry>Enable auto-reconnect.</entry>
+ <entry>Enables auto-reconnection functionality. You should not use
this option
+ with transactions, since a auto reconnection during a
+ incomplete transaction may cause corruption. Note that
+ an auto-reconnected connection will not inherit the same
+ settings and environment as the original. This option
+ was enabled in Connector/ODBC 3.51.13.</entry>
+ </row>
+ <row>
+ <entry>8388608</entry>
+ <entry><literal>FLAG_AUTO_IS_NULL</literal></entry>
+ <entry>Flag Auto Is Null</entry>
+ <entry>When set, this option causes the connection to set the
+ <literal>SQL_AUTO_IS_NULL</literal> option to 1. This
+ disables the standard behavior, but may enable older
+ applications to correctly identify
+ <literal>AUTO_INCREMENT</literal> values. For more
+ information. See
+ <link linkend="operator_is-null"><literal>IS
+ NULL</literal></link> This option was enabled in
+ Connector/ODBC 3.51.13.</entry>
+ </row>
+ <row>
+ <entry>16777216</entry>
+
<entry><literal>FLAG_ZERO_DATE_TO_MIN</literal></entry>
+ <entry>Flag Zero Date to Min</entry>
+ <entry>Translates zero dates
(<literal>XXXX-00-00</literal>) into the minimum
+ date values supported by ODBC,
+ <literal>XXXX-01-01</literal>. This resolves an issue
+ where some statement swill not work because the date
+ returned and the minimumd ODBC date value are
+ incompatible.This option was enabled in Connector/ODBC
+ 3.51.17.</entry>
+ </row>
+ <row>
+ <entry>33554432</entry>
+
<entry><literal>FLAG_MIN_DATE_TO_ZERO</literal></entry>
+ <entry>Flag Min Date to Zero</entry>
+ <entry>Translates the minimum ODBC date value
(<literal>XXXX-01-01</literal>)
+ to the zero date format supported by MySQL
+ (<literal>XXXX-00-00</literal>). This resolves an issue
+ where some statement swill not work because the date
+ returned and the minimumd ODBC date value are
+ incompatible. This option was enabled in Connector/ODBC
+ 3.51.17.</entry>
+ </row>
+ <row>
+ <entry>67108864</entry>
+
<entry><literal>FLAG_MULTI_STATEMENTS</literal></entry>
+ <entry>Allow multiple statements</entry>
+ <entry>Enables support for batched statements. This option was
enabled in
+ Connector/ODBC 3.51.18.</entry>
+ </row>
+ <row>
+ <entry>134217728</entry>
+
<entry><literal>FLAG_COLUMN_SIZE_S32</literal></entry>
+ <entry>Limit column size to 32-bit value</entry>
+ <entry>Limits the column size to a signed 32-bit value to prevent
problems with
+ larger column sizes in applications that do not support
+ them. This option is automatically enabled when working
+ with ADO applications. This option was enabled in
+ Connector/ODBC 3.51.22.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ To select multiple options, add together their values. For
+ example, setting <literal>option</literal> to 12 (4+8) gives you
+ debugging without packet limits.
+ </para>
+
+ <para>
+ The following table shows some recommended
+ <literal>option</literal> values for various configurations:
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colwidth="85*"/>
+ <colspec colwidth="15*"/>
+ <tbody>
+ <row>
+ <entry><emphasis
role="bold">Configuration</emphasis></entry>
+ <entry><emphasis role="bold">Option
Value</emphasis></entry>
+ </row>
+ <row>
+ <entry>Microsoft Access, Visual Basic</entry>
+ <entry>3</entry>
+ </row>
+ <row>
+ <entry>Driver trace generation (Debug mode)</entry>
+ <entry>4</entry>
+ </row>
+ <row>
+ <entry>Microsoft Access (with improved DELETE queries)</entry>
+ <entry>35</entry>
+ </row>
+ <row>
+ <entry>Large tables with too many rows</entry>
+ <entry>2049</entry>
+ </row>
+ <row>
+ <entry>Sybase PowerBuilder</entry>
+ <entry>135168</entry>
+ </row>
+ <row>
+ <entry>Query log generation (Debug mode)</entry>
+ <entry>524288</entry>
+ </row>
+ <row>
+ <entry>Generate driver trace as well as query log (Debug
mode)</entry>
+ <entry>524292</entry>
+ </row>
+ <row>
+ <entry>Large tables with no-cache results</entry>
+ <entry>3145731</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ </section>
+
<section id="myodbc-configuration-dsn-windows">
<title>Configuring a Connector/ODBC DSN on Windows</title>
@@ -3421,437 +3870,6 @@
</section>
- <section id="myodbc-configuration-connection-parameters">
-
- <title>Connector/ODBC Connection Parameters</title>
-
- <para>
- You can specify the parameters in the following tables for
- Connector/ODBC when configuring a DSN. Users on Windows can use
- the Options and Advanced panels when configuring a DSN to set
- these parameters; see the table for information on which options
- relate to which fields and checkboxes. On Unix and Mac OS X, use
- the parameter name and value as the keyword/value pair in the
- DSN configuration. Alternatively, you can set these parameters
- within the <literal>InConnectionString</literal> argument in the
- <literal>SQLDriverConnect()</literal> call.
- </para>
-
- <informaltable>
- <tgroup cols="3">
- <colspec colwidth="15*"/>
- <colspec colwidth="20*"/>
- <colspec colwidth="65*"/>
- <thead>
- <row>
- <entry>Parameter</entry>
- <entry>Default Value</entry>
- <entry>Comment</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>user</literal></entry>
- <entry>ODBC (on Windows)</entry>
- <entry>The username used to connect to MySQL.</entry>
- </row>
- <row>
- <entry><literal>uid</literal></entry>
- <entry>ODBC (on Windows)</entry>
- <entry>Synonymous with <literal>user</literal>. Added in
3.51.16.</entry>
- </row>
- <row>
- <entry><literal>server</literal></entry>
- <entry><literal>localhost</literal></entry>
- <entry>The hostname of the MySQL server.</entry>
- </row>
- <row>
- <entry><literal>database</literal></entry>
- <entry/>
- <entry>The default database.</entry>
- </row>
- <row>
- <entry><literal>option</literal></entry>
- <entry>0</entry>
- <entry>Options that specify how Connector/ODBC should work. See
below.</entry>
- </row>
- <row>
- <entry><literal>port</literal></entry>
- <entry>3306</entry>
- <entry>The TCP/IP port to use if
<literal>server</literal> is not
- <literal>localhost</literal>.</entry>
- </row>
- <row>
- <entry><literal>stmt</literal></entry>
- <entry/>
- <entry>A statement to execute when connecting to MySQL.</entry>
- </row>
- <row>
- <entry><literal>password</literal></entry>
- <entry/>
- <entry>The password for the <literal>user</literal>
account on
- <literal>server</literal>.</entry>
- </row>
- <row>
- <entry><literal>pwd</literal></entry>
- <entry/>
- <entry>Synonymous with <literal>password</literal>. Added
in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>socket</literal></entry>
- <entry/>
- <entry>The Unix socket file or Windows named pipe to connect to if
- <literal>server</literal> is
- <literal>localhost</literal>.</entry>
- </row>
- <row>
- <entry><literal>sslca</literal></entry>
- <entry/>
- <entry>The path to a file with a list of trust SSL CAs. Added in
3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslcapath</literal></entry>
- <entry/>
- <entry>The path to a directory that contains trusted SSL CA
certificates in PEM
- format. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslcert</literal></entry>
- <entry/>
- <entry>The name of the SSL certificate file to use for establishing a
secure
- connection. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslcipher</literal></entry>
- <entry/>
- <entry>A list of allowable ciphers to use for SSL encryption. The
cipher list
- has the same format as the <literal>openssl
- ciphers</literal> command Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>sslkey</literal></entry>
- <entry/>
- <entry>The name of the SSL key file to use for establishing a secure
- connection. Added in 3.51.16.</entry>
- </row>
- <row>
- <entry><literal>charset</literal></entry>
- <entry/>
- <entry>The character set to use for the connection. Added in
3.51.17.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <note>
- <para>
- The SSL configuration parameters can also be automatically
- loaded from a <filename>my.ini</filename> or
- <filename>my.cnf</filename> file.
- </para>
- </note>
-
- <para>
- The <literal>option</literal> argument is used to tell
- Connector/ODBC that the client isn't 100% ODBC compliant. On
- Windows, you normally select options by toggling the checkboxes
- in the connection screen, but you can also select them in the
- <literal>option</literal> argument. The following options are
- listed in the order in which they appear in the Connector/ODBC
- connect screen:
- </para>
-
- <informaltable>
- <tgroup cols="4">
- <colspec colwidth="10*"/>
- <colspec colwidth="20*"/>
- <colspec colwidth="20*"/>
- <colspec colwidth="50*"/>
- <tbody>
- <row>
- <entry><emphasis
role="bold">Value</emphasis></entry>
- <entry><emphasis
role="bold">Flagname</emphasis></entry>
- <entry><emphasis role="bold">GUI
Option</emphasis></entry>
- <entry><emphasis
role="bold">Description</emphasis></entry>
- </row>
- <row>
- <entry>1</entry>
- <entry><literal>FLAG_FIELD_LENGTH</literal></entry>
- <entry>Don't Optimize Column Width</entry>
- <entry>The client can't handle that Connector/ODBC returns the real
width of a
- column. This option was removed in 3.51.18.</entry>
- </row>
- <row>
- <entry>2</entry>
- <entry><literal>FLAG_FOUND_ROWS</literal></entry>
- <entry>Return Matching Rows</entry>
- <entry>The client can't handle that MySQL returns the true value of
affected
- rows. If this flag is set, MySQL returns <quote>found
- rows</quote> instead. You must have MySQL 3.21.14 or
- newer to get this to work.</entry>
- </row>
- <row>
- <entry>4</entry>
- <entry><literal>FLAG_DEBUG</literal></entry>
- <entry>Trace Driver Calls To myodbc.log</entry>
- <entry>Make a debug log in
<filename>C:\myodbc.log</filename> on Windows, or
- <filename>/tmp/myodbc.log</filename> on Unix
variants.</entry>
- </row>
- <row>
- <entry>8</entry>
- <entry><literal>FLAG_BIG_PACKETS</literal></entry>
- <entry>Allow Big Results</entry>
- <entry>Don't set any packet limit for results and
parameters.</entry>
- </row>
- <row>
- <entry>16</entry>
- <entry><literal>FLAG_NO_PROMPT</literal></entry>
- <entry>Don't Prompt Upon Connect</entry>
- <entry>Don't prompt for questions even if driver would like to
prompt.</entry>
- </row>
- <row>
- <entry>32</entry>
-
<entry><literal>FLAG_DYNAMIC_CURSOR</literal></entry>
- <entry>Enable Dynamic Cursor</entry>
- <entry>Enable or disable the dynamic cursor support. (Not allowed in
- Connector/ODBC 2.50.)</entry>
- </row>
- <row>
- <entry>64</entry>
- <entry><literal>FLAG_NO_SCHEMA</literal></entry>
- <entry>Ignore # in Table Name</entry>
- <entry>Ignore use of database name in
- <literal>db_name.tbl_name.col_name</literal>.</entry>
- </row>
- <row>
- <entry>128</entry>
-
<entry><literal>FLAG_NO_DEFAULT_CURSOR</literal></entry>
- <entry>User Manager Cursors</entry>
- <entry>Force use of ODBC manager cursors
(experimental).</entry>
- </row>
- <row>
- <entry>256</entry>
- <entry><literal>FLAG_NO_LOCALE</literal></entry>
- <entry>Don't Use Set Locale</entry>
- <entry>Disable the use of extended fetch
(experimental).</entry>
- </row>
- <row>
- <entry>512</entry>
- <entry><literal>FLAG_PAD_SPACE</literal></entry>
- <entry>Pad Char To Full Length</entry>
- <entry>Pad <literal>CHAR</literal> columns to full column
length.</entry>
- </row>
- <row>
- <entry>1024</entry>
-
<entry><literal>FLAG_FULL_COLUMN_NAMES</literal></entry>
- <entry>Return Table Names for SQLDescribeCol</entry>
- <entry><literal>SQLDescribeCol()</literal> returns fully
qualified column
- names.</entry>
- </row>
- <row>
- <entry>2048</entry>
-
<entry><literal>FLAG_COMPRESSED_PROTO</literal></entry>
- <entry>Use Compressed Protocol</entry>
- <entry>Use the compressed client/server protocol.</entry>
- </row>
- <row>
- <entry>4096</entry>
- <entry><literal>FLAG_IGNORE_SPACE</literal></entry>
- <entry>Ignore Space After Function Names</entry>
- <entry>Tell server to ignore space after function name and before
- <quote><literal>(</literal></quote> (needed by
- PowerBuilder). This makes all function names keywords.</entry>
- </row>
- <row>
- <entry>8192</entry>
- <entry><literal>FLAG_NAMED_PIPE</literal></entry>
- <entry>Force Use of Named Pipes</entry>
- <entry>Connect with named pipes to a
<command>mysqld</command> server running
- on NT.</entry>
- </row>
- <row>
- <entry>16384</entry>
- <entry><literal>FLAG_NO_BIGINT</literal></entry>
- <entry>Change BIGINT Columns to Int</entry>
- <entry>Change <literal>BIGINT</literal> columns to
<literal>INT</literal>
- columns (some applications can't handle
- <literal>BIGINT</literal>).</entry>
- </row>
- <row>
- <entry>32768</entry>
- <entry><literal>FLAG_NO_CATALOG</literal></entry>
- <entry>No Catalog</entry>
- <entry>Forces results from the catalog functions, such as
- <literal>SQLTables</literal>, to always return
- <literal>NULL</literal> and the driver to report that
- catalogs are not supported.</entry>
- </row>
- <row>
- <entry>65536</entry>
- <entry><literal>FLAG_USE_MYCNF</literal></entry>
- <entry>Read Options From
<literal>my.cnf</literal></entry>
- <entry>Read parameters from the
<literal>[client]</literal> and
- <literal>[odbc]</literal> groups from
- <filename>my.cnf</filename>.</entry>
- </row>
- <row>
- <entry>131072</entry>
- <entry><literal>FLAG_SAFE</literal></entry>
- <entry>Safe</entry>
- <entry>Add some extra safety checks.</entry>
- </row>
- <row>
- <entry>262144</entry>
-
<entry><literal>FLAG_NO_TRANSACTIONS</literal></entry>
- <entry>Disable transactions</entry>
- <entry>Disable transactions.</entry>
- </row>
- <row>
- <entry>524288</entry>
- <entry><literal>FLAG_LOG_QUERY</literal></entry>
- <entry>Save queries to
<filename>myodbc.sql</filename></entry>
- <entry>Enable query logging to
-
<filename>c:\myodbc.sql</filename>(<filename>/tmp/myodbc.sql</filename>)
- file. (Enabled only in debug mode.)</entry>
- </row>
- <row>
- <entry>1048576</entry>
- <entry><literal>FLAG_NO_CACHE</literal></entry>
- <entry>Don't Cache Result (forward only cursors)</entry>
- <entry>Do not cache the results locally in the driver, instead read
from server
- (<function role="capi">mysql_use_result()</function>).
- This works only for forward-only cursors. This option is
- very important in dealing with large tables when you
- don't want the driver to cache the entire result set.</entry>
- </row>
- <row>
- <entry>2097152</entry>
-
<entry><literal>FLAG_FORWARD_CURSOR</literal></entry>
- <entry>Force Use Of Forward Only Cursors</entry>
- <entry>Force the use of <literal>Forward-only</literal>
cursor type. In case of
- applications setting the default static/dynamic cursor
- type, and one wants the driver to use non-cache result
- sets, then this option ensures the forward-only cursor
- behavior.</entry>
- </row>
- <row>
- <entry>4194304</entry>
-
<entry><literal>FLAG_AUTO_RECONNECT</literal></entry>
- <entry>Enable auto-reconnect.</entry>
- <entry>Enables auto-reconnection functionality. You should not use
this option
- with transactions, since a auto reconnection during a
- incomplete transaction may cause corruption. Note that
- an auto-reconnected connection will not inherit the same
- settings and environment as the original. This option
- was enabled in Connector/ODBC 3.5.13.</entry>
- </row>
- <row>
- <entry>8388608</entry>
- <entry><literal>FLAG_AUTO_IS_NULL</literal></entry>
- <entry>Flag Auto Is Null</entry>
- <entry>When set, this option causes the connection to set the
- <literal>SQL_AUTO_IS_NULL</literal> option to 1. This
- disables the standard behavior, but may enable older
- applications to correctly identify
- <literal>AUTO_INCREMENT</literal> values. For more
- information. See
- <link linkend="operator_is-null"><literal>IS
- NULL</literal></link> This option was enabled in
- Connector/ODBC 3.5.13.</entry>
- </row>
- <row>
- <entry>16777216</entry>
-
<entry><literal>FLAG_ZERO_DATE_TO_MIN</literal></entry>
- <entry>Flag Zero Date to Min</entry>
- <entry>Translates zero dates
(<literal>XXXX-00-00</literal>) into the minimum
- date values supported by ODBC,
- <literal>XXXX-01-01</literal>. This resolves an issue
- where some statement swill not work because the date
- returned and the minimumd ODBC date value are
- incompatible.This option was enabled in Connector/ODBC
- 3.5.17.</entry>
- </row>
- <row>
- <entry>33554432</entry>
-
<entry><literal>FLAG_MIN_DATE_TO_ZERO</literal></entry>
- <entry>Flag Min Date to Zero</entry>
- <entry>Translates the minimum ODBC date value
(<literal>XXXX-01-01</literal>)
- to the zero date format supported by MySQL
- (<literal>XXXX-00-00</literal>). This resolves an issue
- where some statement swill not work because the date
- returned and the minimumd ODBC date value are
- incompatible. This option was enabled in Connector/ODBC
- 3.5.17.</entry>
- </row>
- <row>
- <entry>67108864</entry>
-
<entry><literal>FLAG_MULTI_STATEMENTS</literal></entry>
- <entry>Allow multiple statements</entry>
- <entry>Enables support for batched statements. This option was
enabled in
- Connector/ODBC 3.5.18.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- To select multiple options, add together their values. For
- example, setting <literal>option</literal> to 12 (4+8) gives you
- debugging without packet limits.
- </para>
-
- <para>
- The following table shows some recommended
- <literal>option</literal> values for various configurations:
- </para>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colwidth="85*"/>
- <colspec colwidth="15*"/>
- <tbody>
- <row>
- <entry><emphasis
role="bold">Configuration</emphasis></entry>
- <entry><emphasis role="bold">Option
Value</emphasis></entry>
- </row>
- <row>
- <entry>Microsoft Access, Visual Basic</entry>
- <entry>3</entry>
- </row>
- <row>
- <entry>Driver trace generation (Debug mode)</entry>
- <entry>4</entry>
- </row>
- <row>
- <entry>Microsoft Access (with improved DELETE queries)</entry>
- <entry>35</entry>
- </row>
- <row>
- <entry>Large tables with too many rows</entry>
- <entry>2049</entry>
- </row>
- <row>
- <entry>Sybase PowerBuilder</entry>
- <entry>135168</entry>
- </row>
- <row>
- <entry>Query log generation (Debug mode)</entry>
- <entry>524288</entry>
- </row>
- <row>
- <entry>Generate driver trace as well as query log (Debug
mode)</entry>
- <entry>524292</entry>
- </row>
- <row>
- <entry>Large tables with no-cache results</entry>
- <entry>3145731</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- </section>
-
<section id="myodbc-configuration-connection-without-dsn">
<title>Connecting Without a Predefined DSN</title>
@@ -7356,7 +7374,7 @@
number of different ways. To obtain the value immediately
after an <literal>INSERT</literal>, use a
<literal>SELECT</literal> query with the
- <literal>LAST_INSERT_ID()</literal> function.
+ <function role="sql">LAST_INSERT_ID()</function> function.
</para>
<para>
@@ -8755,11 +8773,12 @@
<answer>
<para>
- This error occurs because the <literal>COUNT(*)</literal>
- expression is returning a <literal>BIGINT</literal>, and
- ADO can't make sense of a number this big. Select the
- <literal>Change BIGINT columns to INT</literal> option
- (option value 16384).
+ This error occurs because the
+ <function role="sql">COUNT(*)</function> expression is
+ returning a <literal>BIGINT</literal>, and ADO can't make
+ sense of a number this big. Select the <literal>Change
+ BIGINT columns to INT</literal> option (option value
+ 16384).
</para>
</answer>
Modified: trunk/th/refman-common/credits.xml
===================================================================
--- trunk/th/refman-common/credits.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/credits.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 4, Lines Added: 11, Lines Deleted: 10; 1964 bytes
@@ -363,14 +363,14 @@
<listitem>
<para>
- The <literal>CASE</literal> expression.
+ The <function role="sqlop">CASE</function> expression.
</para>
</listitem>
<listitem>
<para>
- The <literal>MD5()</literal> and
- <literal>COALESCE()</literal> functions.
+ The <function role="sql">MD5()</function> and
+ <function role="sql">COALESCE()</function> functions.
</para>
</listitem>
@@ -781,9 +781,9 @@
<listitem>
<para>
- <literal>SHA1()</literal>,
- <literal>AES_ENCRYPT()</literal> and
- <literal>AES_DECRYPT()</literal> functions.
+ <function role="sql">SHA1()</function>,
+ <function role="sql">AES_ENCRYPT()</function> and
+ <function role="sql">AES_DECRYPT()</function> functions.
</para>
</listitem>
@@ -922,7 +922,7 @@
<listitem>
<para>
- Author of <literal>mysql_tableinfo</literal>.
+ Author of <command>mysql_tableinfo</command>.
</para>
</listitem>
@@ -1463,9 +1463,10 @@
</para>
<para>
- <literal>FROM_UNIXTIME()</literal> time formatting,
- <literal>ENCRYPT()</literal> functions, and
- <command>bison</command> advisor. Active mailing list member.
+ <function role="sql">FROM_UNIXTIME()</function> time
+ formatting, <function role="sql">ENCRYPT()</function>
+ functions, and <command>bison</command> advisor. Active
+ mailing list member.
</para>
</listitem>
Modified: trunk/th/refman-common/manual-conventions.en.xml
===================================================================
--- trunk/th/refman-common/manual-conventions.en.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/manual-conventions.en.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 4, Lines Deleted: 4; 948 bytes
@@ -188,10 +188,10 @@
<para>
An ellipsis (<literal>...</literal>) indicates the omission of a
section of a statement, typically to provide a shorter version of
- more complex syntax. For example, <literal>INSERT ...
- SELECT</literal> is shorthand for the form of
- <literal>INSERT</literal> statement that is followed by a
- <literal>SELECT</literal> statement.
+ more complex syntax. For example, <literal>SELECT ... INTO
+ OUTFILE</literal> is shorthand for the form of
+ <literal>SELECT</literal> statement that has an <literal>INTO
+ OUTFILE</literal> clause following other parts of the statement.
</para>
<para>
Modified: trunk/th/refman-common/mysql-proxy.xml
===================================================================
--- trunk/th/refman-common/mysql-proxy.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/mysql-proxy.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 10, Lines Deleted: 1; 1162 bytes
@@ -225,6 +225,15 @@
</itemizedlist>
+ <note>
+ <para>
+ On some operating systems you may need to manually build the
+ required components to get the latest version. If you are
+ having trouble compiling MySQL Proxy then consider using one
+ of the binary distributions.
+ </para>
+ </note>
+
<para>
Once these components are installed, you need to configure and
then build:
@@ -1947,7 +1956,7 @@
<para>
The example below injects additional <literal>SELECT
- NOW()</literal> statements into the query queue, given them a
+ NOW()</literal> statements into the query queue, giving them a
different ID to the ID of the original query. Within
<function>read_query_result()</function>, if the ID for the
injected queries is identified, we display the result row, and
Modified: trunk/th/refman-common/news-cj-core.xml
===================================================================
--- trunk/th/refman-common/news-cj-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-cj-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 0, Lines Deleted: 2; 568 bytes
@@ -5,7 +5,6 @@
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
-
<!--
WARNING:
@@ -13,7 +12,6 @@
Do not add changelog entries to this file - use the changelog XML in
dynamic-docs/changelog.
-->
-
<section id="cj-news">
<title>MySQL Connector/J Change History</title>
Modified: trunk/th/refman-common/news-cmxj-core.xml
===================================================================
--- trunk/th/refman-common/news-cmxj-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-cmxj-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 0, Lines Deleted: 2; 587 bytes
@@ -5,7 +5,6 @@
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
-
<!--
WARNING:
@@ -13,7 +12,6 @@
Do not add changelog entries to this file - use the changelog XML in
dynamic-docs/changelog.
-->
-
<section id="news-connector-mxj">
<title>MySQL Connector/MXJ Change History</title>
Modified: trunk/th/refman-common/news-cnet-core.xml
===================================================================
--- trunk/th/refman-common/news-cnet-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-cnet-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 34, Lines Added: 52, Lines Deleted: 38; 8115 bytes
@@ -6,7 +6,6 @@
%all.entities;
<!ENTITY connector_net "MySQL Connector/NET">
]>
-
<!--
WARNING:
@@ -14,22 +13,29 @@
Do not add changelog entries to this file - use the changelog XML in
dynamic-docs/changelog.
-->
-
<section id="connector-net-news">
- <title>Connector/NET Change History</title>
+ <title>MySQL Connector/NET Change History</title>
<remark role="dynamic-dependency-list"/>
- <section id="connector-net-news-5.1.3">
+ <section id="connector-net-news-5-1-4">
+ <title condition="dynamic:changelog:vertitle" role="5.1.4:connector-net:all"/>
+
+ <para condition="dynamic:changelog:entrylist" role="5.1.4:connector-net:all"/>
+
+ </section>
+
+ <section id="connector-net-news-5-1-3">
+
<title condition="dynamic:changelog:vertitle" role="5.1.3:connector-net:all"/>
<para condition="dynamic:changelog:entrylist" role="5.1.3:connector-net:all"/>
</section>
- <section id="connector-net-news-5.1.2">
+ <section id="connector-net-news-5-1-2">
<title condition="dynamic:changelog:vertitle" role="5.1.2:connector-net:all"/>
@@ -37,7 +43,7 @@
</section>
- <section id="connector-net-news-5.1.1">
+ <section id="connector-net-news-5-1-1">
<title condition="dynamic:changelog:vertitle" role="5.1.1:connector-net:all"/>
@@ -45,7 +51,7 @@
</section>
- <section id="connector-net-news-5.1.0">
+ <section id="connector-net-news-5-1-0">
<title condition="dynamic:changelog:vertitle" role="5.1.0:connector-net:all"/>
@@ -53,15 +59,23 @@
</section>
- <section id="connector-net-news-5.0.8">
+ <section id="connector-net-news-5-0-9">
+ <title condition="dynamic:changelog:vertitle" role="5.0.9:connector-net:all"/>
+
+ <para condition="dynamic:changelog:entrylist" role="5.0.9:connector-net:all"/>
+
+ </section>
+
+ <section id="connector-net-news-5-0-8">
+
<title condition="dynamic:changelog:vertitle" role="5.0.8:connector-net:all"/>
<para condition="dynamic:changelog:entrylist" role="5.0.8:connector-net:all"/>
</section>
- <section id="connector-net-news-5.0.7">
+ <section id="connector-net-news-5-0-7">
<title condition="dynamic:changelog:vertitle" role="5.0.7:connector-net:all"/>
@@ -69,7 +83,7 @@
</section>
- <section id="connector-net-news-5.0.6">
+ <section id="connector-net-news-5-0-6">
<title condition="dynamic:changelog:vertitle" role="5.0.6:connector-net:all"/>
@@ -77,7 +91,7 @@
</section>
- <section id="connector-net-news-5.0.5">
+ <section id="connector-net-news-5-0-5">
<title condition="dynamic:changelog:vertitle" role="5.0.5:connector-net:all"/>
@@ -85,7 +99,7 @@
</section>
- <section id="connector-net-news-5.0.4">
+ <section id="connector-net-news-5-0-4">
<title condition="dynamic:changelog:vertitle" role="5.0.4:connector-net:all"/>
@@ -93,7 +107,7 @@
</section>
- <section id="connector-net-news-5.0.3">
+ <section id="connector-net-news-5-0-3">
<title condition="dynamic:changelog:vertitle" role="5.0.3:connector-net:all"/>
@@ -101,7 +115,7 @@
</section>
- <section id="connector-net-news-5.0.2">
+ <section id="connector-net-news-5-0-2">
<title condition="dynamic:changelog:vertitle" role="5.0.2:connector-net:all"/>
@@ -109,7 +123,7 @@
</section>
- <section id="connector-net-news-5.0.1">
+ <section id="connector-net-news-5-0-1">
<title condition="dynamic:changelog:vertitle" role="5.0.1:connector-net:all"/>
@@ -117,7 +131,7 @@
</section>
- <section id="connector-net-news-5.0.0">
+ <section id="connector-net-news-5-0-0">
<title condition="dynamic:changelog:vertitle" role="5.0.0:connector-net:all"/>
@@ -125,7 +139,7 @@
</section>
- <section id="connector-net-news-1.0.11">
+ <section id="connector-net-news-1-0-11">
<title condition="dynamic:changelog:vertitle" role="1.0.11:connector-net:all"/>
@@ -133,7 +147,7 @@
</section>
- <section id="connector-net-news-1.0.10">
+ <section id="connector-net-news-1-0-10">
<title condition="dynamic:changelog:vertitle" role="1.0.10:connector-net:all"/>
@@ -141,7 +155,7 @@
</section>
- <section id="connector-net-news-1.0.9">
+ <section id="connector-net-news-1-0-9">
<title condition="dynamic:changelog:vertitle" role="1.0.9:connector-net:all"/>
@@ -149,7 +163,7 @@
</section>
- <section id="connector-net-news-1.0.8">
+ <section id="connector-net-news-1-0-8">
<title condition="dynamic:changelog:vertitle" role="1.0.8:connector-net:all"/>
@@ -157,7 +171,7 @@
</section>
- <section id="connector-net-news-1.0.7">
+ <section id="connector-net-news-1-0-7">
<title condition="dynamic:changelog:vertitle" role="1.0.7:connector-net:all"/>
@@ -165,7 +179,7 @@
</section>
- <section id="connector-net-news-1.0.6">
+ <section id="connector-net-news-1-0-6">
<title condition="dynamic:changelog:vertitle" role="1.0.6:connector-net:all"/>
@@ -173,7 +187,7 @@
</section>
- <section id="connector-net-news-1.0.5">
+ <section id="connector-net-news-1-0-5">
<title condition="dynamic:changelog:vertitle" role="1.0.5:connector-net:all"/>
@@ -181,7 +195,7 @@
</section>
- <section id="connector-net-news-1.0.4">
+ <section id="connector-net-news-1-0-4">
<title condition="dynamic:changelog:vertitle" role="1.0.4:connector-net:all"/>
@@ -189,7 +203,7 @@
</section>
- <section id="connector-net-news-1.0.3">
+ <section id="connector-net-news-1-0-3">
<title condition="dynamic:changelog:vertitle" role="1.0.3:connector-net:all"/>
@@ -197,7 +211,7 @@
</section>
- <section id="connector-net-news-1.0.2">
+ <section id="connector-net-news-1-0-2">
<title condition="dynamic:changelog:vertitle" role="1.0.2:connector-net:all"/>
@@ -205,7 +219,7 @@
</section>
- <section id="connector-net-news-1.0.1">
+ <section id="connector-net-news-1-0-1">
<title condition="dynamic:changelog:vertitle" role="1.0.1:connector-net:all"/>
@@ -213,7 +227,7 @@
</section>
- <section id="connector-net-news-1.0.0">
+ <section id="connector-net-news-1-0-0">
<title condition="dynamic:changelog:vertitle" role="1.0.0:connector-net:all"/>
@@ -221,7 +235,7 @@
</section>
- <section id="connector-net-0.9.0">
+ <section id="connector-net-0-9-0">
<title>Changes in MySQL Connector/NET Version 0.9.0 (30 August
2004)</title>
@@ -889,7 +903,7 @@
</section>
- <section id="connector-net-news-0.76">
+ <section id="connector-net-news-0-76">
<title>Changes in MySQL Connector/NET Version 0.76</title>
@@ -1059,7 +1073,7 @@
</section>
- <section id="connector-net-news-0.75">
+ <section id="connector-net-news-0-75">
<title>Changes in MySQL Connector/NET Version 0.75</title>
@@ -1212,7 +1226,7 @@
</section>
- <section id="connector-net-0.74">
+ <section id="connector-net-0-74">
<title>Changes in MySQL Connector/NET Version 0.74</title>
@@ -1574,7 +1588,7 @@
</section>
- <section id="connector-net-news-0.71">
+ <section id="connector-net-news-0-71">
<title>Changes in MySQL Connector/NET Version 0.71</title>
@@ -1625,7 +1639,7 @@
</section>
- <section id="connector-net-news-0.70">
+ <section id="connector-net-news-0-70">
<title>Changes in MySQL Connector/NET Version 0.70</title>
@@ -2008,7 +2022,7 @@
</section>
- <section id="connector-net-news-0.68">
+ <section id="connector-net-news-0-68">
<title>Changes in MySQL Connector/NET Version 0.68</title>
@@ -2092,7 +2106,7 @@
</section>
- <section id="connector-net-news-0.65">
+ <section id="connector-net-news-0-65">
<title>Changes in MySQL Connector/NET Version 0.65</title>
@@ -2147,7 +2161,7 @@
</section>
- <section id="connector-net-news-0.60">
+ <section id="connector-net-news-0-60">
<title>Changes in MySQL Connector/NET Version 0.60</title>
@@ -2184,7 +2198,7 @@
</section>
- <section id="connector-net-news-0.50">
+ <section id="connector-net-news-0-50">
<title>Changes in MySQL Connector/NET Version 0.50</title>
Modified: trunk/th/refman-common/news-codbc-core.xml
===================================================================
--- trunk/th/refman-common/news-codbc-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-codbc-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 6, Lines Added: 12, Lines Deleted: 6; 1751 bytes
@@ -5,7 +5,6 @@
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
-
<!--
WARNING:
@@ -13,14 +12,13 @@
Do not add changelog entries to this file - use the changelog XML in
dynamic-docs/changelog.
-->
-
<section id="myodbc-news">
<title>MySQL Connector/ODBC (MyODBC) Change History</title>
<remark role="dynamic-dependency-list"/>
- <section id="myodbc-news-5.1.1">
+ <section id="myodbc-news-5-1-1">
<title condition="dynamic:changelog:vertitle" role="5.1.1:connector-odbc:all"/>
@@ -28,7 +26,7 @@
</section>
- <section id="myodbc-news-5.1.0">
+ <section id="myodbc-news-5-1-0">
<title condition="dynamic:changelog:vertitle" role="5.1.0:connector-odbc:all"/>
@@ -36,7 +34,7 @@
</section>
- <section id="myodbc-news-5.0.12">
+ <section id="myodbc-news-5-0-12">
<title condition="dynamic:changelog:vertitle"
role="5.0.12:connector-odbc:all"/>
@@ -44,7 +42,7 @@
</section>
- <section id="myodbc-news-5.0.11">
+ <section id="myodbc-news-5-0-11">
<title condition="dynamic:changelog:vertitle"
role="5.0.11:connector-odbc:all"/>
@@ -393,6 +391,14 @@
</section>
+ <section id="myodbc-news-3-51-22">
+
+ <title condition="dynamic:changelog:vertitle"
role="3.51.22:connector-odbc:all"/>
+
+ <para condition="dynamic:changelog:entrylist"
role="3.51.22:connector-odbc:all"/>
+
+ </section>
+
<section id="myodbc-news-3-51-21">
<title condition="dynamic:changelog:vertitle"
role="3.51.21:connector-odbc:all"/>
Modified: trunk/th/refman-common/news-innodb.xml
===================================================================
--- trunk/th/refman-common/news-innodb.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-innodb.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 4, Lines Added: 9, Lines Deleted: 9; 2302 bytes
@@ -897,7 +897,7 @@
<literal>AUTOCOMMIT=1</literal>, then we do not need to make a
plain <literal>SELECT</literal> set shared locks even on the
<literal>SERIALIZABLE</literal> isolation level, because we
- know that the transaction is read-only. A read-only
+ know that the transaction is read only. A read-only
transaction can always be performed on the <literal>REPEATABLE
READ</literal> level, and that does not endanger the
serializability.
@@ -1688,10 +1688,10 @@
<listitem>
<para>
- Fixed a bug: If <literal>MIN()</literal> or
- <literal>MAX()</literal> resulted in a deadlock or a lock wait
- timeout, MySQL did not return an error, but returned
- <literal>NULL</literal> as the function value.
+ Fixed a bug: If <function role="sql">MIN()</function> or
+ <function role="sql">MAX()</function> resulted in a deadlock
+ or a lock wait timeout, MySQL did not return an error, but
+ returned <literal>NULL</literal> as the function value.
</para>
</listitem>
@@ -2682,8 +2682,8 @@
<listitem>
<para>
- A new SQL statement SHOW INNODB STATUS returns the output of the
- <literal>InnoDB</literal> Monitor to the client. The
+ A new SQL statement SHOW INNODB STATUS returns the output of
+ the <literal>InnoDB</literal> Monitor to the client. The
<literal>InnoDB</literal> Monitor now prints detailed
information on the latest detected deadlock.
</para>
@@ -3576,8 +3576,8 @@
<listitem>
<para>
Fixed a crash when
- <literal>MAX(<replaceable>col</replaceable>)</literal>
is
- selected from an empty table, and
+ <function
role="sql">MAX(<replaceable>col</replaceable>)</function>
+ is selected from an empty table, and
<replaceable>col</replaceable> is a not the first column in a
multi-column index.
</para>
Modified: trunk/th/refman-common/news-mysql-proxy-core.xml
===================================================================
--- trunk/th/refman-common/news-mysql-proxy-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-mysql-proxy-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 0, Lines Deleted: 2; 598 bytes
@@ -5,7 +5,6 @@
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
-
<!--
WARNING:
@@ -13,7 +12,6 @@
Do not add changelog entries to this file - use the changelog XML in
dynamic-docs/changelog.
-->
-
<section id="mysql-proxy-news">
<title>MySQL Proxy Change History</title>
Modified: trunk/th/refman-common/news-vstudioplugin-core.xml
===================================================================
--- trunk/th/refman-common/news-vstudioplugin-core.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/news-vstudioplugin-core.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 0, Lines Deleted: 2; 622 bytes
@@ -5,7 +5,6 @@
<!ENTITY % all.entities SYSTEM "all-entities.ent">
%all.entities;
]>
-
<!--
WARNING:
@@ -13,7 +12,6 @@
Do not add changelog entries to this file - use the changelog XML in
dynamic-docs/changelog.
-->
-
<section id="vstudio-plugin-news">
<title>MySQL Visual Studio Plugin Change History</title>
Modified: trunk/th/refman-common/regexp.xml
===================================================================
--- trunk/th/refman-common/regexp.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/regexp.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 1, Lines Added: 3, Lines Deleted: 1; 706 bytes
@@ -57,7 +57,9 @@
The <literal>REGEXP</literal> and <literal>RLIKE</literal>
operators work in byte-wise fashion, so they are not multi-byte
safe and may produce unexpected results with multi-byte character
- sets.
+ sets. In addition, these operators compare characters by their
+ byte values and accented characters may not compare as equal even
+ if a given collation treats them as equal.
</para>
</warning>
Modified: trunk/th/refman-common/replication-drbd.xml
===================================================================
--- trunk/th/refman-common/replication-drbd.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/replication-drbd.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 9, Lines Added: 516, Lines Deleted: 523; 43878 bytes
@@ -261,7 +261,7 @@
<section id="replication-drbd-install-os">
- <title>Setting Up the Operating System</title>
+ <title>Setting Up the OS for DRBD</title>
<para>
To set your Linux environment for using DRBD there are a number
@@ -533,23 +533,47 @@
<filename>/etc/portage/package.keywords</filename>:
</para>
-<programlisting>sys-cluster/drbd ~x86</programlisting>
+<programlisting>sys-cluster/drbd ~x86
+sys-cluster/drbd-kernel ~x86</programlisting>
<para>
If your kernel does not already have the userspace to
- kernelspace linker enabled, then you will need to add the
- following line to your kernel configuration
- (<filename>/etc/kernels/kernel-config-*</filename> file):
+ kernelspace linker enabled, then you will need to rebuild
+ the kernel with this option. The best way to do this is to
+ use <command>genkernel</command> with the
+ <option>--menuconfig</option> option to select the option
+ and then rebuild the kernel. For example, at the command
+ line as <literal>root</literal>:
</para>
-<programlisting>CONFIG_CONNECTOR=y</programlisting>
+<programlisting># genkernel --menuconfig all</programlisting>
<para>
+ Then through the menu options, select <guimenu>Device
+ Drivers</guimenu>, <guimenu>Connector - unified userspace
+ $lt;-> kernelspace linker</guimenu> and finally press 'y'
+ or 'space' to select the <guimenu>Connector - unified
+ userspace $lt;-> kernelspace linker</guimenu> option.
+ Then exit the menu configuration. The kernel will be rebuilt
+ and installed. If this is a new kernel, make sure you update
+ your bootloader accordingly. Now reboot to enable the new
+ kernel.
+ </para>
+
+ <para>
You can now <command>emerge</command> DRBD 0.8.x into your
Gentoo installation:
</para>
<programlisting># emerge drbd</programlisting>
+
+ <para>
+ Once <literal>drbd</literal> has been downloaded and
+ installed, you need to decompress and copy the default
+ configuration file from
+ <filename>/usr/share/doc/drbd-8.0.7/drbd.conf.bz2</filename>
+ into <filename>/etc/drbd.conf</filename>.
+ </para>
</listitem>
</itemizedlist>
@@ -585,31 +609,10 @@
</para>
<para>
- <emphasis> To install DRBD on Gentoo</emphasis>:
- </para>
-
-<programlisting># emerge drbd</programlisting>
-
- <note>
- <para>
- Note that this may install an older version of the DRBD
- software. In this case you must install DRBD from the source
- tarball by hand.
- </para>
- </note>
-
- <para>
- Once DRBD has been configured and installed you must copy the
- default DRBD configuration file from
-
<filename>/usr/share/<replaceable>drbd-0.7.23</replaceable>/drbd.conf.bz2</filename>
- to <filename>/etc</filename> and then uncompress it using
- <command>bunzip2</command>.
- </para>
-
- <para>
Once DRBD has been built and installed, you need to edit the
<filename>/etc/drbd.conf</filename> file and then run a number
- of commands to build the block device and setup the replication.
+ of commands to build the block device and set up the
+ replication.
</para>
<para>
@@ -620,125 +623,124 @@
DRBD block device.
</para>
- <section id="replication-drbd-install-drbd-primary">
+ </section>
- <title>Setting Up a DRBD Primary Node</title>
+ <section id="replication-drbd-install-drbd-primary">
- <para>
- To set up a DRBD primary node you need to configure the DRBD
- service, create the first DRBD block device and then create a
- filesystem on the device so that you can store files and data.
- </para>
+ <title>Setting Up a DRBD Primary Node</title>
- <para>
- The DRBD configuration file
- (<filename>/etc/drbd.conf</filename>) defined a number of
- parameters for your DRBD configuration, including the
- frequency of updates and block sizes, security information and
- the definition of the DRBD devices that you want to create.
- </para>
+ <para>
+ To set up a DRBD primary node you need to configure the DRBD
+ service, create the first DRBD block device and then create a
+ filesystem on the device so that you can store files and data.
+ </para>
- <para>
- The key elements to configure are the <literal>on</literal>
- sections which specify the configuration of each node.
- </para>
+ <para>
+ The DRBD configuration file
+ (<filename>/etc/drbd.conf</filename>) defined a number of
+ parameters for your DRBD configuration, including the frequency
+ of updates and block sizes, security information and the
+ definition of the DRBD devices that you want to create.
+ </para>
- <para>
- To follow the configuration, the sequence below shows only the
- changes from the default <filename>drbd.conf</filename> file.
- Configurations within the file can be both global or tied to
- specific resource.
- </para>
+ <para>
+ The key elements to configure are the <literal>on</literal>
+ sections which specify the configuration of each node.
+ </para>
- <orderedlist>
+ <para>
+ To follow the configuration, the sequence below shows only the
+ changes from the default <filename>drbd.conf</filename> file.
+ Configurations within the file can be both global or tied to
+ specific resource.
+ </para>
- <listitem>
- <para>
- Set the synchronization rate between the two nodes. You
- should keep this in check compared to the speed of your
- network connection. Gigabit Ethernet can support up to 125
- MB/second, 100Mbps Ethernet slightly less than a tenth of
- that (12MBps). If you are using a shared network
- connection, rather than a dedicated, then you should gauge
- accordingly.
- </para>
+ <orderedlist>
- <para>
- To set the synchronization rate, edit the
- <literal>rate</literal> setting within the
- <literal>syncer</literal> block:
- </para>
+ <listitem>
+ <para>
+ Set the synchronization rate between the two nodes. You
+ should keep this in check compared to the speed of your
+ network connection. Gigabit Ethernet can support up to 125
+ MB/second, 100Mbps Ethernet slightly less than a tenth of
+ that (12MBps). If you are using a shared network connection,
+ rather than a dedicated, then you should gauge accordingly.
+ </para>
+ <para>
+ To set the synchronization rate, edit the
+ <literal>rate</literal> setting within the
+ <literal>syncer</literal> block:
+ </para>
+
<programlisting>syncer {
rate 10M;
}</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Set up some basic authentication. DRBD supports a simple
- password hash exchange mechanism. This helps to ensure
- that only those hosts with the same shared secret are able
- to join the DRBD node group.
- </para>
+ <listitem>
+ <para>
+ Set up some basic authentication. DRBD supports a simple
+ password hash exchange mechanism. This helps to ensure that
+ only those hosts with the same shared secret are able to
+ join the DRBD node group.
+ </para>
<programlisting>cram-hmac-alg “sha1”;
shared-secret
"<replaceable>shared-string</replaceable>";</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Now you must configure the host information. Remember that
- you must have the node information for the primary and
- secondary nodes in the <filename>drbd.conf</filename> file
- on each host. You need to configure the following
- information for each node:
- </para>
+ <listitem>
+ <para>
+ Now you must configure the host information. Remember that
+ you must have the node information for the primary and
+ secondary nodes in the <filename>drbd.conf</filename> file
+ on each host. You need to configure the following
+ information for each node:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>device</literal> — the path of the
- logical block device that will be created by DRBD.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>device</literal> — the path of the
+ logical block device that will be created by DRBD.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>disk</literal> — the block device that
- will be used to store the data.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>disk</literal> — the block device that
+ will be used to store the data.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>address</literal> — the IP address and
- port number of the host that will hold this DRBD
- device.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>address</literal> — the IP address and
+ port number of the host that will hold this DRBD device.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>meta-disk</literal> — the location
- where the metadata about the DRBD device will be
- stored. You can set this to
- <literal>internal</literal> and DRBD will use the
- physical block device to store the information, by
- recording the metadata within the last sections of the
- disk. The exact size will depend on the size of the
- logical block device you have created, but it may
- involve up to 128MB.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>meta-disk</literal> — the location where
+ the metadata about the DRBD device will be stored. You
+ can set this to <literal>internal</literal> and DRBD
+ will use the physical block device to store the
+ information, by recording the metadata within the last
+ sections of the disk. The exact size will depend on the
+ size of the logical block device you have created, but
+ it may involve up to 128MB.
+ </para>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- <para>
- A sample configuration for our primary server might look
- like this:
- </para>
+ <para>
+ A sample configuration for our primary server might look
+ like this:
+ </para>
<programlisting>on drbd-master {
device /dev/drbd0;
@@ -747,10 +749,10 @@
meta-disk internal;
}</programlisting>
- <para>
- The <literal>on</literal> configuration block should be
- repeated for the secondary node (and any further) nodes:
- </para>
+ <para>
+ The <literal>on</literal> configuration block should be
+ repeated for the secondary node (and any further) nodes:
+ </para>
<programlisting>on drbd-slave {
device /dev/drbd0;
@@ -759,144 +761,143 @@
meta-disk internal;
}</programlisting>
- <para>
- The IP address of eac <literal>on</literal> block must
- match the IP address of the corresponding host. Do not set
- this value to the IP address of the corresponding primary
- or secondary in each case.
- </para>
- </listitem>
+ <para>
+ The IP address of eac <literal>on</literal> block must match
+ the IP address of the corresponding host. Do not set this
+ value to the IP address of the corresponding primary or
+ secondary in each case.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Before starting the primary node, you should create the
- metadata for the devices:
- </para>
+ <listitem>
+ <para>
+ Before starting the primary node, you should create the
+ metadata for the devices:
+ </para>
-<programlisting># drbdmeta create-md all</programlisting>
- </listitem>
+<programlisting># drbdadm create-md all</programlisting>
+ </listitem>
- <listitem>
- <para>
- You are now ready to start DRBD:
- </para>
+ <listitem>
+ <para>
+ You are now ready to start DRBD:
+ </para>
<programlisting># /etc/init.d/drbd start</programlisting>
- <para>
- DRBD should now start and initialize, creating the DRBD
- devices that you have configured.
- </para>
- </listitem>
+ <para>
+ DRBD should now start and initialize, creating the DRBD
+ devices that you have configured.
+ </para>
+ </listitem>
- <listitem>
- <para>
- DRBD creates a standard block device - to make it usable,
- you must create a filesystem on the block device just as
- you would with any standard disk partition. Before you can
- create the filesystem, you must mark the new device as the
- primary device (i.e. where the data will be written and
- stored), and and initialize the device. Because this is a
- destructive operation, you must specify the command line
- option to overwrite the raw data:
- </para>
+ <listitem>
+ <para>
+ DRBD creates a standard block device - to make it usable,
+ you must create a filesystem on the block device just as you
+ would with any standard disk partition. Before you can
+ create the filesystem, you must mark the new device as the
+ primary device (i.e. where the data will be written and
+ stored), and and initialize the device. Because this is a
+ destructive operation, you must specify the command line
+ option to overwrite the raw data:
+ </para>
<programlisting># drbdadm -- --overwrite-data-of-peer primary
all</programlisting>
- <para>
- If you are using a version of DRBD earlier than 0.8.0,
- then you need to use a different command-line option:
- </para>
+ <para>
+ If you are using a version of DRBD earlier than 0.8.0, then
+ you need to use a different command-line option:
+ </para>
<programlisting># drbdadm -- --do-what-I-say primary all</programlisting>
- <para>
- Now create a filesystem using your chosen filesystem type:
- </para>
+ <para>
+ Now create a filesystem using your chosen filesystem type:
+ </para>
<programlisting># mkfs.ext3 /dev/drbd0</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- You can now mount the filesystem and if necessary copy
- files to the mount point:
- </para>
+ <listitem>
+ <para>
+ You can now mount the filesystem and if necessary copy files
+ to the mount point:
+ </para>
<programlisting># mkdir /mnt/drbd
# mount /dev/drbd0 /mnt/drbd
# echo "DRBD Device" >/mnt/drbd/samplefile</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- Your primary node is now ready to use. You should now
- configure your secondary node or nodes.
- </para>
+ <para>
+ Your primary node is now ready to use. You should now configure
+ your secondary node or nodes.
+ </para>
- </section>
+ </section>
- <section id="replication-drbd-install-drbd-secondary">
+ <section id="replication-drbd-install-drbd-secondary">
- <title>Setting Up a DRBD Secondary Node</title>
+ <title>Setting Up a DRBD Secondary Node</title>
- <para>
- The configuration process for setting up a secondary node is
- the same as for the primary node, except that you do not have
- to create the filesystem on the secondary node device, as this
- information will automatically be transferred from the primary
- node.
- </para>
+ <para>
+ The configuration process for setting up a secondary node is the
+ same as for the primary node, except that you do not have to
+ create the filesystem on the secondary node device, as this
+ information will automatically be transferred from the primary
+ node.
+ </para>
- <para>
- To setup a secondary node:
- </para>
+ <para>
+ To set up a secondary node:
+ </para>
- <orderedlist>
+ <orderedlist>
- <listitem>
- <para>
- Copy the <filename>/etc/drbd.conf</filename> file from
- your primary node to your secondary node. It should
- already contain all the information and configuration that
- you need, since you had to specify the secondary node IP
- address and other information for the primary node
- configuration.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Copy the <filename>/etc/drbd.conf</filename> file from your
+ primary node to your secondary node. It should already
+ contain all the information and configuration that you need,
+ since you had to specify the secondary node IP address and
+ other information for the primary node configuration.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Create the DRBD metadata on the underlying disk device:
- </para>
+ <listitem>
+ <para>
+ Create the DRBD metadata on the underlying disk device:
+ </para>
-<programlisting># drbdmeta create-md all</programlisting>
- </listitem>
+<programlisting># drbdadm create-md all</programlisting>
+ </listitem>
- <listitem>
- <para>
- Start DRBD:
- </para>
+ <listitem>
+ <para>
+ Start DRBD:
+ </para>
<programlisting># /etc/init.d/drbd start</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- Once DRBD has started, it will start the copy the data from
- the primary node to the secondary node. Even with an empty
- filesystem this will take some time, since DRBD is copying the
- block information from a block device, not simply copying the
- filesystem data.
- </para>
+ <para>
+ Once DRBD has started, it will start the copy the data from the
+ primary node to the secondary node. Even with an empty
+ filesystem this will take some time, since DRBD is copying the
+ block information from a block device, not simply copying the
+ filesystem data.
+ </para>
- <para>
- You can monitor the progress of the copy between the primary
- and secondary nodes by viewing the output of
- <filename>/proc/drbd</filename>:
- </para>
+ <para>
+ You can monitor the progress of the copy between the primary and
+ secondary nodes by viewing the output of
+ <filename>/proc/drbd</filename>:
+ </para>
<programlisting># cat /proc/drbd
version: 8.0.4 (api:86/proto:86)
@@ -908,18 +909,18 @@
resync: used:1/31 hits:15901 misses:16 starving:0 dirty:0 changed:16
act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0
changed:0</programlisting>
- </section>
+ </section>
- <section id="replication-drbd-install-drbd-using">
+ <section id="replication-drbd-install-drbd-using">
- <title>Monitoring and Managing Your DRBD Device</title>
+ <title>Monitoring and Managing Your DRBD Device</title>
- <para>
- Once the primary and secondary machines are configured and
- synchronized, you can get the status information about your
- DRBD device by viewing the output from
- <filename>/proc/drbd</filename>:
- </para>
+ <para>
+ Once the primary and secondary machines are configured and
+ synchronized, you can get the status information about your DRBD
+ device by viewing the output from
+ <filename>/proc/drbd</filename>:
+ </para>
<programlisting># cat /proc/drbd
version: 8.0.4 (api:86/proto:86)
@@ -929,378 +930,372 @@
resync: used:0/31 hits:134841 misses:135 starving:0 dirty:0 changed:135
act_log: used:0/257 hits:24765 misses:33 starving:0 dirty:0
changed:33</programlisting>
- <para>
- The first line provides the version/revision and build
- information.
- </para>
+ <para>
+ The first line provides the version/revision and build
+ information.
+ </para>
- <para>
- The second line starts the detailed status information for an
- individual resource. The individual field headings are as
- follows:
- </para>
+ <para>
+ The second line starts the detailed status information for an
+ individual resource. The individual field headings are as
+ follows:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- cs — connection state
- </para>
- </listitem>
+ <listitem>
+ <para>
+ cs — connection state
+ </para>
+ </listitem>
- <listitem>
- <para>
- st — node state (local/remote)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ st — node state (local/remote)
+ </para>
+ </listitem>
- <listitem>
- <para>
- ld — local data consistency
- </para>
- </listitem>
+ <listitem>
+ <para>
+ ld — local data consistency
+ </para>
+ </listitem>
- <listitem>
- <para>
- ds — data consistency
- </para>
- </listitem>
+ <listitem>
+ <para>
+ ds — data consistency
+ </para>
+ </listitem>
- <listitem>
- <para>
- ns — network send
- </para>
- </listitem>
+ <listitem>
+ <para>
+ ns — network send
+ </para>
+ </listitem>
- <listitem>
- <para>
- nr — network receive
- </para>
- </listitem>
+ <listitem>
+ <para>
+ nr — network receive
+ </para>
+ </listitem>
- <listitem>
- <para>
- dw — disk write
- </para>
- </listitem>
+ <listitem>
+ <para>
+ dw — disk write
+ </para>
+ </listitem>
- <listitem>
- <para>
- dr — disk read
- </para>
- </listitem>
+ <listitem>
+ <para>
+ dr — disk read
+ </para>
+ </listitem>
- <listitem>
- <para>
- pe — pending (waiting for ack)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ pe — pending (waiting for ack)
+ </para>
+ </listitem>
- <listitem>
- <para>
- ua — unack'd (still need to send ack)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ ua — unack'd (still need to send ack)
+ </para>
+ </listitem>
- <listitem>
- <para>
- al — access log write count
- </para>
- </listitem>
+ <listitem>
+ <para>
+ al — access log write count
+ </para>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- <para>
- In the previous example, the information shown indicates that
- the nodes are connected, the local node is the primary
- (because it is listed first), and the local and remote data is
- up to date with each other. The remainder of the information
- is statistical data about the device, and the data exchanged
- that kept the information up to date.
- </para>
+ <para>
+ In the previous example, the information shown indicates that
+ the nodes are connected, the local node is the primary (because
+ it is listed first), and the local and remote data is up to date
+ with each other. The remainder of the information is statistical
+ data about the device, and the data exchanged that kept the
+ information up to date.
+ </para>
- <para>
- For administration, the main command is
- <command>drbdadm</command>. There are a number of commands
- supported by this tool the control the connectivity and status
- of the DRBD devices.
- </para>
+ <para>
+ For administration, the main command is
+ <command>drbdadm</command>. There are a number of commands
+ supported by this tool the control the connectivity and status
+ of the DRBD devices.
+ </para>
- <para>
- The most common commands are those to set the
- primary/secondary status of the local device. You can manually
- set this information for a number of reasons, including when
- you want to check the physical status of the secondary device
- (since you cannot mount a DRBD device in primary mode), or
- when you are temporarily moving the responsibility of keeping
- the data in check to a different machine (for example, during
- an upgrade or physical move of the normal primary node). You
- can set state of all local device to be the primary using this
- command:
- </para>
+ <para>
+ The most common commands are those to set the primary/secondary
+ status of the local device. You can manually set this
+ information for a number of reasons, including when you want to
+ check the physical status of the secondary device (since you
+ cannot mount a DRBD device in primary mode), or when you are
+ temporarily moving the responsibility of keeping the data in
+ check to a different machine (for example, during an upgrade or
+ physical move of the normal primary node). You can set state of
+ all local device to be the primary using this command:
+ </para>
<programlisting># drbdadm primary all</programlisting>
- <para>
- Or switch the local device to be the secondary using:
- </para>
+ <para>
+ Or switch the local device to be the secondary using:
+ </para>
<programlisting># drbdadm secondary all</programlisting>
- <para>
- To change only a single DRBD resource, specify the resource
- name instead of <literal>all</literal>.
- </para>
+ <para>
+ To change only a single DRBD resource, specify the resource name
+ instead of <literal>all</literal>.
+ </para>
- <para>
- You can temporarily disconnect the DRBD nodes:
- </para>
+ <para>
+ You can temporarily disconnect the DRBD nodes:
+ </para>
<programlisting># drbdadm disconnect all</programlisting>
- <para>
- Reconnect them using <literal>connect</literal>:
- </para>
+ <para>
+ Reconnect them using <literal>connect</literal>:
+ </para>
<programlisting># drbdadm connect all</programlisting>
- <para>
- For other commands and help with <command>drbdadm</command>
- see the DRBD documentation.
- </para>
+ <para>
+ For other commands and help with <command>drbdadm</command> see
+ the DRBD documentation.
+ </para>
- </section>
+ </section>
- <section id="replication-drbd-install-drbd-othercfg">
+ <section id="replication-drbd-install-drbd-othercfg">
- <title>Additional DRBD Configuration Options</title>
+ <title>Additional DRBD Configuration Options</title>
- <para>
- Additional options you may want to configure:
- </para>
+ <para>
+ Additional options you may want to configure:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>protocol</literal> — specifies the level of
- consistency to be used when information is written to the
- block device. The option is similar in principle to the
- <link
+ <listitem>
+ <para>
+ <literal>protocol</literal> — specifies the level of
+ consistency to be used when information is written to the
+ block device. The option is similar in principle to the
+ <link
linkend="option_mysqld_innodb_flush_log_at_trx_commit"><literal>innodb_flush_log_at_trx_commit</literal></link>
- option within MySQL. Three levels are supported:
- </para>
+ option within MySQL. Three levels are supported:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- <literal>A</literal> — data is considered
- written when the information reaches the TCP send
- buffer and the local physical disk. There is no
- guarantee that the data has been written to the remote
- server or the remote physical disk.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>A</literal> — data is considered written
+ when the information reaches the TCP send buffer and the
+ local physical disk. There is no guarantee that the data
+ has been written to the remote server or the remote
+ physical disk.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>B</literal> — data is considered
- written when the data has reached the local disk and
- the remote node's network buffer. The data has reached
- the remote server, but there is no guarantee it has
- reached the remote server's physical disk.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>B</literal> — data is considered written
+ when the data has reached the local disk and the remote
+ node's network buffer. The data has reached the remote
+ server, but there is no guarantee it has reached the
+ remote server's physical disk.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>C</literal> — data is considered
- written when the data has reached the local disk and
- the remote node's physical disk.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>C</literal> — data is considered written
+ when the data has reached the local disk and the remote
+ node's physical disk.
+ </para>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- <para>
- The preferred and recommended protocol is C, as it is the
- only protocol which ensures the consistency of the local
- and remote physical storage.
- </para>
- </listitem>
+ <para>
+ The preferred and recommended protocol is C, as it is the
+ only protocol which ensures the consistency of the local and
+ remote physical storage.
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>on-io-error</literal> — specifies what
- should happen when there is an error with the physical
- block device. Suitable values include
- <literal>panic</literal>, which causes the node to leave
- the DRBD cluster by causing a kernel panic (and which
- would trigger automatic failover if you were using
- Heartbeat); and <literal>detach</literal>, which switches
- DRBD into a diskless mode (that is, data is not written to
- the lower level block device).
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <literal>on-io-error</literal> — specifies what should
+ happen when there is an error with the physical block
+ device. Suitable values include <literal>panic</literal>,
+ which causes the node to leave the DRBD cluster by causing a
+ kernel panic (and which would trigger automatic failover if
+ you were using Heartbeat); and <literal>detach</literal>,
+ which switches DRBD into a diskless mode (that is, data is
+ not written to the lower level block device).
+ </para>
+ </listitem>
- <listitem>
- <para>
- <literal>size</literal> — if you do not want to use
- the entire partition space with your DRBD block device
- then you can specify the size of the DRBD device to be
- created. The size specification can include a quantifier.
- For example, to set the maximum size of the DRBD partition
- to 1GB you would use:
- </para>
+ <listitem>
+ <para>
+ <literal>size</literal> — if you do not want to use
+ the entire partition space with your DRBD block device then
+ you can specify the size of the DRBD device to be created.
+ The size specification can include a quantifier. For
+ example, to set the maximum size of the DRBD partition to
+ 1GB you would use:
+ </para>
<programlisting>size 1G;</programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- <para>
- With the configuration file suitably configured and ready to
- use, you now need to populate the lower-level device with the
- metadata information, and then start the DRBD service.
- </para>
+ <para>
+ With the configuration file suitably configured and ready to
+ use, you now need to populate the lower-level device with the
+ metadata information, and then start the DRBD service.
+ </para>
- </section>
-
</section>
- <section id="replication-drbd-install-mysql">
+ </section>
- <title>Configuring MySQL for DRBD</title>
+ <section id="replication-drbd-install-mysql">
- <para>
- Once you have configured DRBD and have an active DRBD device and
- filesystem, you can configure MySQL to use the chosen device to
- store the MySQL data.
- </para>
+ <title>Configuring MySQL for DRBD</title>
- <para>
- When performing a new installation of MySQL, you can either
- select to install MySQL entirely onto the DRBD device, or just
- configure the data directory to be located on the new
- filesystem.
- </para>
+ <para>
+ Once you have configured DRBD and have an active DRBD device and
+ filesystem, you can configure MySQL to use the chosen device to
+ store the MySQL data.
+ </para>
- <para>
- In either case, the files and installation must take place on
- the primary node, because that is the only DRBD node on which
- you can mount the DRBD device filesystem as read/write.
- </para>
+ <para>
+ When performing a new installation of MySQL, you can either select
+ to install MySQL entirely onto the DRBD device, or just configure
+ the data directory to be located on the new filesystem.
+ </para>
- <para>
- You should store the following files and information on your
- DRBD device:
- </para>
+ <para>
+ In either case, the files and installation must take place on the
+ primary node, because that is the only DRBD node on which you can
+ mount the DRBD device filesystem as read/write.
+ </para>
- <itemizedlist>
+ <para>
+ You should store the following files and information on your DRBD
+ device:
+ </para>
- <listitem>
- <para>
- MySQL data files, including the binary log, and InnoDB data
- files.
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- MySQL configuration file (<filename>my.cnf</filename>).
- </para>
- </listitem>
+ <listitem>
+ <para>
+ MySQL data files, including the binary log, and InnoDB data
+ files.
+ </para>
+ </listitem>
- </itemizedlist>
+ <listitem>
+ <para>
+ MySQL configuration file (<filename>my.cnf</filename>).
+ </para>
+ </listitem>
- <para>
- To setup MySQL to use your new DRBD device and filesystem:
- </para>
+ </itemizedlist>
- <orderedlist>
+ <para>
+ To set up MySQL to use your new DRBD device and filesystem:
+ </para>
- <listitem>
- <para>
- If you are migrating an existing MySQL installation, stop
- MySQL:
- </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ If you are migrating an existing MySQL installation, stop
+ MySQL:
+ </para>
+
<programlisting>$ mysqladmin shutdown</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Copy the <filename>my.cnf</filename> onto the DRBD device.
- If you are not already using a configuration file, copy one
- of the sample configuration files from the MySQL
- distribution.
- </para>
+ <listitem>
+ <para>
+ Copy the <filename>my.cnf</filename> onto the DRBD device. If
+ you are not already using a configuration file, copy one of
+ the sample configuration files from the MySQL distribution.
+ </para>
<programlisting># mkdir /mnt/drbd/mysql
# cp /etc/my.cnf /mnt/drbd/mysql</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Copy your MySQL data directory to the DRBD device and
- mounted filesystem.
- </para>
+ <listitem>
+ <para>
+ Copy your MySQL data directory to the DRBD device and mounted
+ filesystem.
+ </para>
<programlisting># cp -R /var/lib/mysql /drbd/mysql/data</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Edit the configuration file to reflect the change of
- directory by setting the value of the
- <literal>datadir</literal> option. If you have not already
- enabled the binary log, also set the value of the
- <literal>log-bin</literal> option.
- </para>
+ <listitem>
+ <para>
+ Edit the configuration file to reflect the change of directory
+ by setting the value of the <literal>datadir</literal> option.
+ If you have not already enabled the binary log, also set the
+ value of the <literal>log-bin</literal> option.
+ </para>
<programlisting>datadir = /drbd/mysql/data
log-bin = mysql-bin</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Create a symbolic link from <filename>/etc/my.cnf</filename>
- to the new configuration file on the DRBD device filesystem.
- </para>
+ <listitem>
+ <para>
+ Create a symbolic link from <filename>/etc/my.cnf</filename>
+ to the new configuration file on the DRBD device filesystem.
+ </para>
<programlisting># ln -s /drbd/mysql/my.cnf /etc/my.cnf</programlisting>
- </listitem>
+ </listitem>
- <listitem>
- <para>
- Now start MySQL and check that the data that you copied to
- the DRBD device filesystem is present.
- </para>
+ <listitem>
+ <para>
+ Now start MySQL and check that the data that you copied to the
+ DRBD device filesystem is present.
+ </para>
<programlisting># /etc/init.d/mysql start</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- <para>
- Your MySQL data should now be located on the filesystem running
- on your DRBD device. The data will be physically stored on the
- underlying device that you configured for the DRBD device.
- Meanwhile, the content of your MySQL databases will be copied to
- the secondary DRBD node.
- </para>
+ <para>
+ Your MySQL data should now be located on the filesystem running on
+ your DRBD device. The data will be physically stored on the
+ underlying device that you configured for the DRBD device.
+ Meanwhile, the content of your MySQL databases will be copied to
+ the secondary DRBD node.
+ </para>
- <para>
- Note that you cannot access the information on your secondary
- node, as a DRBD device working in secondary mode is not
- available for use.
- </para>
+ <para>
+ Note that you cannot access the information on your secondary
+ node, as a DRBD device working in secondary mode is not available
+ for use.
+ </para>
- </section>
-
</section>
+</section>
<!--
<section id="replication-drbd-performance">
@@ -1332,5 +1327,3 @@
</section>
-->
-
-</section>
Modified: trunk/th/refman-common/what-is.en.xml
===================================================================
--- trunk/th/refman-common/what-is.en.xml 2007-11-26 20:41:25 UTC (rev 8896)
+++ trunk/th/refman-common/what-is.en.xml 2007-11-26 21:45:38 UTC (rev 8897)
Changed blocks: 2, Lines Added: 10, Lines Deleted: 6; 1458 bytes
@@ -478,11 +478,15 @@
<para>
Full support for SQL <literal>GROUP BY</literal> and
<literal>ORDER BY</literal> clauses. Support for group
- functions (<literal>COUNT()</literal>,
<literal>COUNT(DISTINCT
- ...)</literal>, <literal>AVG()</literal>,
- <literal>STD()</literal>, <literal>SUM()</literal>,
- <literal>MAX()</literal>, <literal>MIN()</literal>, and
- <literal>GROUP_CONCAT()</literal>).
+ functions (<function role="sql">COUNT()</function>,
+ <function
+role="sql">COUNT(DISTINCT ...)</function>,
+ <function role="sql">AVG()</function>,
+ <literal>STD()</literal>,
+ <function role="sql">SUM()</function>,
+ <function role="sql">MAX()</function>,
+ <function role="sql">MIN()</function>, and
+ <function role="sql">GROUP_CONCAT()</function>).
</para>
</listitem>
@@ -706,7 +710,7 @@
<listitem>
<para>
The server can provide error messages to clients in many
- languages. See <xref linkend="languages"/>.
+ languages. See <xref linkend="error-message-language"/>.
</para>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r8897 - in trunk: . it/refman-common pt/refman-common th/refman-common | paul | 26 Nov |