Author: paul
Date: 2008-08-29 19:53:33 +0200 (Fri, 29 Aug 2008)
New Revision: 11626
Log:
r33554@frost: paul | 2008-08-29 12:14:51 -0500
mysqlbinlog:
- Revisions to --base64-output, --verbose descriptions
- Add info about limitations of row event display
Modified:
trunk/dynamic-docs/command-optvars/mysqlbinlog.xml
trunk/refman-5.1/programs-admin-util-core.xml
trunk/refman-6.0/programs-admin-util-core.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:33552
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:32819
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:33554
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:32819
Modified: trunk/dynamic-docs/command-optvars/mysqlbinlog.xml
===================================================================
--- trunk/dynamic-docs/command-optvars/mysqlbinlog.xml 2008-08-29 15:51:56 UTC (rev 11625)
+++ trunk/dynamic-docs/command-optvars/mysqlbinlog.xml 2008-08-29 17:53:33 UTC (rev 11626)
Changed blocks: 2, Lines Added: 2, Lines Deleted: 2; 750 bytes
@@ -333,7 +333,7 @@
<name>verbose</name>
<shortdescription lang="en">
- Reconstruct SQL statements from row events
+ Reconstruct row events as SQL statements
</shortdescription>
<types>
@@ -382,7 +382,7 @@
<name>base64-output</name>
<shortdescription lang="en">
- Print all binary log entries using base64 encoding
+ Print binary log entries using base-64 encoding
</shortdescription>
<types>
Modified: trunk/refman-5.1/programs-admin-util-core.xml
===================================================================
--- trunk/refman-5.1/programs-admin-util-core.xml 2008-08-29 15:51:56 UTC (rev 11625)
+++ trunk/refman-5.1/programs-admin-util-core.xml 2008-08-29 17:53:33 UTC (rev 11626)
Changed blocks: 16, Lines Added: 152, Lines Deleted: 43; 12961 bytes
@@ -3720,9 +3720,10 @@
</para>
<para>
- This option determines when events should be displayed as
- base 64-encoded <literal>BINLOG</literal> statements. The
- option has these allowable values (not case sensitive):
+ This option determines when events should be displayed
+ encoded as base-64 strings using <literal>BINLOG</literal>
+ statements. The option has these allowable values (not case
+ sensitive):
</para>
<itemizedlist>
@@ -3731,21 +3732,23 @@
<para>
<literal>AUTO</literal> ("automatic") or
<literal>UNSPEC</literal> ("unspecified") displays
- BINLOG statements automatically when necessary (that is,
- for format description events and row events). This is
- the default if the <option>--base64-output</option>
- option is not given.
+ <literal>BINLOG</literal> statements automatically when
+ necessary (that is, for format description events and
+ row events). This is the default if no
+ <option>--base64-output</option> option is given.
</para>
- <para>
- Automatic <literal>BINLOG</literal> display is the only
- safe behavior if you intend to use the output of
- <command>mysqlbinlog</command> to re-execute binary log
- file contents. The other option values are intended only
- for debugging or testing purposes because they may
- produce output that does not include all events in
- executable form.
- </para>
+ <note>
+ <para>
+ Automatic <literal>BINLOG</literal> display is the
+ only safe behavior if you intend to use the output of
+ <command>mysqlbinlog</command> to re-execute binary
+ log file contents. The other option values are
+ intended only for debugging or testing purposes
+ because they may produce output that does not include
+ all events in executable form.
+ </para>
+ </note>
</listitem>
<listitem>
@@ -3799,7 +3802,7 @@
<para>
For examples that show the effect of
<option>--base64-output</option> and
- <option>--verbose</option> on row event display, see
+ <option>--verbose</option> on row event output, see
<xref linkend="mysqlbinlog-row-events"/>.
</para>
</listitem>
@@ -4480,15 +4483,16 @@
</para>
<para>
- Reconstruct SQL statements from row events. If given twice,
- the output includes comments to indicate column data types
- and some metadata. This option was added in MySQL 5.1.28.
+ Reconstruct row events and display them as commented SQL
+ statements. If given twice, the output includes comments to
+ indicate column data types and some metadata. This option
+ was added in MySQL 5.1.28.
</para>
<para>
For examples that show the effect of
<option>--base64-output</option> and
- <option>--verbose</option> on row event display, see
+ <option>--verbose</option> on row event output, see
<xref linkend="mysqlbinlog-row-events"/>.
</para>
</listitem>
@@ -5024,8 +5028,8 @@
<para>
The following examples illustrate how
- <command>mysqlbinlog</command> displays row events. These
- correspond to events with the
+ <command>mysqlbinlog</command> displays row events that specify
+ data modifications. These correspond to events with the
<literal>WRITE_ROWS_EVENT</literal>,
<literal>UPDATE_ROWS_EVENT</literal>, and
<literal>DELETE_ROWS_EVENT</literal> type codes. The
@@ -5045,6 +5049,7 @@
name VARCHAR(20) NOT NULL,
date DATE NULL
) ENGINE = InnoDB;
+
START TRANSACTION;
INSERT INTO t VALUES(1, 'apple', NULL);
UPDATE t SET name = 'pear', date = '2009-01-01' WHERE id = 1;
@@ -5054,24 +5059,32 @@
<para>
By default, <command>mysqlbinlog</command> displays row events
- using <literal>BINLOG</literal> statements that specify data
- modifications as base 64-encoded strings. The output looks like
- this (omitting extraneous lines):
+ encoded as base-64 strings using <literal>BINLOG</literal>
+ statements. Omitting extraneous lines, the output for the row
+ events produced by the preceding statement sequence looks like
+ this:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
BINLOG '
fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ==
'/*!*/;
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
BINLOG '
fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP
'/*!*/;
+...
+# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5081,13 +5094,17 @@
</programlisting>
<para>
- To see the row events as comments in the form of "pseudo-SQL"
- statements, run <command>mysqlbinlog</command> with the
- <option>--verbose</option> option. The output will contain lines
- beginning with <literal>###</literal>:
+ To see the row events as comments in the form of
+ <quote>pseudo-SQL</quote> statements, run
+ <command>mysqlbinlog</command> with the
+ <option>--verbose</option> or <option>-v</option> option.
The
+ output will contain lines beginning with <literal>###</literal>:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog -v
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5099,6 +5116,8 @@
### @1=1
### @2='apple'
### @3=NULL
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5114,7 +5133,7 @@
### @1=1
### @2='pear'
### @3='2009:01:01'
-# at 356
+...
# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
@@ -5130,12 +5149,16 @@
</programlisting>
<para>
- To also display data types and some metadata for each column,
- specify <option>--verbose</option> twice. The output will
- contain an additional comment follow each column change:
+ Specify <option>--verbose</option> or <option>-v</option>
twice
+ to also display data types and some metadata for each column.
+ The output will contain an additional comment following each
+ column change:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog -vv
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5147,6 +5170,8 @@
### @1=1 /* INT meta=0 nullable=0 is_null=0 */
### @2='apple' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
### @3=NULL /* VARSTRING(20) meta=0 nullable=1 is_null=1 */
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5162,6 +5187,8 @@
### @1=1 /* INT meta=0 nullable=0 is_null=0 */
### @2='pear' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
### @3='2009:01:01' /* DATE meta=0 nullable=1 is_null=0 */
+...
+# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5176,22 +5203,28 @@
</programlisting>
<para>
- When you use <option>--verbose</option> to display row events as
- commented SQL, you can tell <command>mysqlbinlog</command> to
- suppress the accompanying <literal>BINLOG</literal> statements
- by using the <option>--base64-output=DECODE-ROWS</option>
- option. This is similar to
- <option>--base64-output=NEVER</option> but does not exit with an
- error if a row event is found:
+ You can tell <command>mysqlbinlog</command> to suppress the
+ <literal>BINLOG</literal> statements for row events by using the
+ <option>--base64-output=DECODE-ROWS</option> option. This is
+ similar to <option>--base64-output=NEVER</option> but does not
+ exit with an error if a row event is found. The combination of
+ <option>--base64-output=DECODE-ROWS</option> and
+ <option>--verbose</option> provides a convenient way to see row
+ events only as SQL statements:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog -v --base64-output=DECODE-ROWS
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
### INSERT INTO test.t
### SET
### @1=1
### @2='apple'
### @3=NULL
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
### UPDATE test.t
### WHERE
@@ -5202,6 +5235,8 @@
### @1=1
### @2='pear'
### @3='2009:01:01'
+...
+# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
### DELETE FROM test.t
### WHERE
@@ -5210,11 +5245,85 @@
### @3='2009:01:01'
</programlisting>
+ <note>
+ <para>
+ You should not suppress <literal>BINLOG</literal> statements
+ if you intend to re-execute <command>mysqlbinlog</command>
+ output.
+ </para>
+ </note>
+
<para>
- You should not suppress <literal>BINLOG</literal> statements if
- you intend to re-execute <command>mysqlbinlog</command> output.
+ The SQL statements produced by <option>--verbose</option> for
+ row events are much more readable than the corresponding
+ <literal>BINLOG</literal> statements. However, they do not
+ correspond exactly to the original SQL statements that generated
+ the events. The following limitations apply:
</para>
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ The original column names are lost and replace by
+ <literal>@<replaceable>N</replaceable></literal>,
where
+ <replaceable>N</replaceable> is a column number.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Character set information is not available in the binary
+ log, which affects string column display:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ There is no distinction made between corresponding
+ binary and non-binary string types
+ (<literal>BINARY</literal> and
<literal>CHAR</literal>,
+ <literal>VARBINARY</literal> and
+ <literal>VARCHAR</literal>,
<literal>BLOB</literal> and
+ <literal>TEXT</literal>). The output uses a data type of
+ <literal>STRING</literal> for fixed-length strings and
+ <literal>VARSTRING</literal> for variable-length
+ strings.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ For multi-byte character sets, the maximum number of
+ bytes per character is not present in the binary log, so
+ the length for string types is displayed in bytes rather
+ than in characters. For example,
+ <literal>STRING(4)</literal> will be used as the data
+ type for values from either of these column types:
+ </para>
+
+<programlisting>
+CHAR(4) CHARACTER SET latin1
+CHAR(2) CHARACTER SET ucs2
+</programlisting>
+ </listitem>
+
+ <listitem>
+ <para>
+ Due to the storage format for events of type
+ <literal>UPDATE_ROWS_EVENT</literal>,
+ <literal>UPDATE</literal> statements are displayed with
+ the <literal>WHERE</literal> clause preceding the
+ <literal>SET</literal> clause.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </listitem>
+
+ </itemizedlist>
+
</refsection>
</refentry>
Modified: trunk/refman-6.0/programs-admin-util-core.xml
===================================================================
--- trunk/refman-6.0/programs-admin-util-core.xml 2008-08-29 15:51:56 UTC (rev 11625)
+++ trunk/refman-6.0/programs-admin-util-core.xml 2008-08-29 17:53:33 UTC (rev 11626)
Changed blocks: 16, Lines Added: 152, Lines Deleted: 43; 12959 bytes
@@ -3720,9 +3720,10 @@
</para>
<para>
- This option determines when events should be displayed as
- base 64-encoded <literal>BINLOG</literal> statements. The
- option has these allowable values (not case sensitive):
+ This option determines when events should be displayed
+ encoded as base-64 strings using <literal>BINLOG</literal>
+ statements. The option has these allowable values (not case
+ sensitive):
</para>
<itemizedlist>
@@ -3731,21 +3732,23 @@
<para>
<literal>AUTO</literal> ("automatic") or
<literal>UNSPEC</literal> ("unspecified") displays
- BINLOG statements automatically when necessary (that is,
- for format description events and row events). This is
- the default if the <option>--base64-output</option>
- option is not given.
+ <literal>BINLOG</literal> statements automatically when
+ necessary (that is, for format description events and
+ row events). This is the default if no
+ <option>--base64-output</option> option is given.
</para>
- <para>
- Automatic <literal>BINLOG</literal> display is the only
- safe behavior if you intend to use the output of
- <command>mysqlbinlog</command> to re-execute binary log
- file contents. The other option values are intended only
- for debugging or testing purposes because they may
- produce output that does not include all events in
- executable form.
- </para>
+ <note>
+ <para>
+ Automatic <literal>BINLOG</literal> display is the
+ only safe behavior if you intend to use the output of
+ <command>mysqlbinlog</command> to re-execute binary
+ log file contents. The other option values are
+ intended only for debugging or testing purposes
+ because they may produce output that does not include
+ all events in executable form.
+ </para>
+ </note>
</listitem>
<listitem>
@@ -3799,7 +3802,7 @@
<para>
For examples that show the effect of
<option>--base64-output</option> and
- <option>--verbose</option> on row event display, see
+ <option>--verbose</option> on row event output, see
<xref linkend="mysqlbinlog-row-events"/>.
</para>
</listitem>
@@ -4477,15 +4480,16 @@
</para>
<para>
- Reconstruct SQL statements from row events. If given twice,
- the output includes comments to indicate column data types
- and some metadata. This option was added in MySQL 6.0.7.
+ Reconstruct row events and display them as commented SQL
+ statements. If given twice, the output includes comments to
+ indicate column data types and some metadata. This option
+ was added in MySQL 6.0.7.
</para>
<para>
For examples that show the effect of
<option>--base64-output</option> and
- <option>--verbose</option> on row event display, see
+ <option>--verbose</option> on row event output, see
<xref linkend="mysqlbinlog-row-events"/>.
</para>
</listitem>
@@ -5025,8 +5029,8 @@
<para>
The following examples illustrate how
- <command>mysqlbinlog</command> displays row events. These
- correspond to events with the
+ <command>mysqlbinlog</command> displays row events that specify
+ data modifications. These correspond to events with the
<literal>WRITE_ROWS_EVENT</literal>,
<literal>UPDATE_ROWS_EVENT</literal>, and
<literal>DELETE_ROWS_EVENT</literal> type codes. The
@@ -5046,6 +5050,7 @@
name VARCHAR(20) NOT NULL,
date DATE NULL
) ENGINE = InnoDB;
+
START TRANSACTION;
INSERT INTO t VALUES(1, 'apple', NULL);
UPDATE t SET name = 'pear', date = '2009-01-01' WHERE id = 1;
@@ -5055,24 +5060,32 @@
<para>
By default, <command>mysqlbinlog</command> displays row events
- using <literal>BINLOG</literal> statements that specify data
- modifications as base 64-encoded strings. The output looks like
- this (omitting extraneous lines):
+ encoded as base-64 strings using <literal>BINLOG</literal>
+ statements. Omitting extraneous lines, the output for the row
+ events produced by the preceding statement sequence looks like
+ this:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
BINLOG '
fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ==
'/*!*/;
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
BINLOG '
fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ=
fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP
'/*!*/;
+...
+# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5082,13 +5095,17 @@
</programlisting>
<para>
- To see the row events as comments in the form of "pseudo-SQL"
- statements, run <command>mysqlbinlog</command> with the
- <option>--verbose</option> option. The output will contain lines
- beginning with <literal>###</literal>:
+ To see the row events as comments in the form of
+ <quote>pseudo-SQL</quote> statements, run
+ <command>mysqlbinlog</command> with the
+ <option>--verbose</option> or <option>-v</option> option.
The
+ output will contain lines beginning with <literal>###</literal>:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog -v
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5100,6 +5117,8 @@
### @1=1
### @2='apple'
### @3=NULL
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5115,7 +5134,7 @@
### @1=1
### @2='pear'
### @3='2009:01:01'
-# at 356
+...
# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
@@ -5131,12 +5150,16 @@
</programlisting>
<para>
- To also display data types and some metadata for each column,
- specify <option>--verbose</option> twice. The output will
- contain an additional comment follow each column change:
+ Specify <option>--verbose</option> or <option>-v</option>
twice
+ to also display data types and some metadata for each column.
+ The output will contain an additional comment following each
+ column change:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog -vv
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5148,6 +5171,8 @@
### @1=1 /* INT meta=0 nullable=0 is_null=0 */
### @2='apple' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
### @3=NULL /* VARSTRING(20) meta=0 nullable=1 is_null=1 */
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5163,6 +5188,8 @@
### @1=1 /* INT meta=0 nullable=0 is_null=0 */
### @2='pear' /* VARSTRING(20) meta=20 nullable=0 is_null=0 */
### @3='2009:01:01' /* DATE meta=0 nullable=1 is_null=0 */
+...
+# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
BINLOG '
@@ -5177,22 +5204,28 @@
</programlisting>
<para>
- When you use <option>--verbose</option> to display row events as
- commented SQL, you can tell <command>mysqlbinlog</command> to
- suppress the accompanying <literal>BINLOG</literal> statements
- by using the <option>--base64-output=DECODE-ROWS</option>
- option. This is similar to
- <option>--base64-output=NEVER</option> but does not exit with an
- error if a row event is found:
+ You can tell <command>mysqlbinlog</command> to suppress the
+ <literal>BINLOG</literal> statements for row events by using the
+ <option>--base64-output=DECODE-ROWS</option> option. This is
+ similar to <option>--base64-output=NEVER</option> but does not
+ exit with an error if a row event is found. The combination of
+ <option>--base64-output=DECODE-ROWS</option> and
+ <option>--verbose</option> provides a convenient way to see row
+ events only as SQL statements:
</para>
<programlisting>
+shell> <userinput>mysqlbinlog -v --base64-output=DECODE-ROWS
<replaceable>log_file</replaceable></userinput>
+...
+# at 218
#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F
### INSERT INTO test.t
### SET
### @1=1
### @2='apple'
### @3=NULL
+...
+# at 302
#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F
### UPDATE test.t
### WHERE
@@ -5203,6 +5236,8 @@
### @1=1
### @2='pear'
### @3='2009:01:01'
+...
+# at 400
#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F
### DELETE FROM test.t
### WHERE
@@ -5211,11 +5246,85 @@
### @3='2009:01:01'
</programlisting>
+ <note>
+ <para>
+ You should not suppress <literal>BINLOG</literal> statements
+ if you intend to re-execute <command>mysqlbinlog</command>
+ output.
+ </para>
+ </note>
+
<para>
- You should not suppress <literal>BINLOG</literal> statements if
- you intend to re-execute <command>mysqlbinlog</command> output.
+ The SQL statements produced by <option>--verbose</option> for
+ row events are much more readable than the corresponding
+ <literal>BINLOG</literal> statements. However, they do not
+ correspond exactly to the original SQL statements that generated
+ the events. The following limitations apply:
</para>
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ The original column names are lost and replace by
+ <literal>@<replaceable>N</replaceable></literal>,
where
+ <replaceable>N</replaceable> is a column number.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Character set information is not available in the binary
+ log, which affects string column display:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ There is no distinction made between corresponding
+ binary and non-binary string types
+ (<literal>BINARY</literal> and
<literal>CHAR</literal>,
+ <literal>VARBINARY</literal> and
+ <literal>VARCHAR</literal>,
<literal>BLOB</literal> and
+ <literal>TEXT</literal>). The output uses a data type of
+ <literal>STRING</literal> for fixed-length strings and
+ <literal>VARSTRING</literal> for variable-length
+ strings.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ For multi-byte character sets, the maximum number of
+ bytes per character is not present in the binary log, so
+ the length for string types is displayed in bytes rather
+ than in characters. For example,
+ <literal>STRING(4)</literal> will be used as the data
+ type for values from either of these column types:
+ </para>
+
+<programlisting>
+CHAR(4) CHARACTER SET latin1
+CHAR(2) CHARACTER SET ucs2
+</programlisting>
+ </listitem>
+
+ <listitem>
+ <para>
+ Due to the storage format for events of type
+ <literal>UPDATE_ROWS_EVENT</literal>,
+ <literal>UPDATE</literal> statements are displayed with
+ the <literal>WHERE</literal> clause preceding the
+ <literal>SET</literal> clause.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+ </listitem>
+
+ </itemizedlist>
+
</refsection>
</refentry>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r11626 - in trunk: . dynamic-docs/command-optvars refman-5.1 refman-6.0 | paul.dubois | 29 Aug 2008 |