Author: paul
Date: 2007-07-11 22:16:17 +0200 (Wed, 11 Jul 2007)
New Revision: 7090
Log:
r27563@polar: paul | 2007-07-11 15:15:03 -0500
Document bugfixes:
Bug#11986
Bug#16291
Bug#19443
Bug#21249
Bug#25212
Bug#25221
(all part of a single patch)
Modified:
2004-08-03 15:29:37
2004-08-03 15:29:37
2004-08-03 15:29:37
2004-08-03 15:29:37
trunk/refman-5.1/information-schema.xml
trunk/refman-5.1/news-5.1.xml
trunk/refman-5.1/sql-syntax.xml
trunk/refman-5.2/information-schema.xml
trunk/refman-5.2/sql-syntax.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:27557
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:22668
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:18941
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:27563
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:22668
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:18941
Modified: trunk/refman-5.1/information-schema.xml
===================================================================
--- trunk/refman-5.1/information-schema.xml 2007-07-11 18:05:34 UTC (rev 7089)
+++ trunk/refman-5.1/information-schema.xml 2007-07-11 20:16:17 UTC (rev 7090)
Changed blocks: 8, Lines Added: 107, Lines Deleted: 2; 5832 bytes
@@ -2795,6 +2795,21 @@
<entry><literal>definer</literal></entry>
<entry>MySQL extension</entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>DATABASE_COLLATION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -2832,6 +2847,20 @@
</itemizedlist>
</listitem>
+ <listitem>
+ <para>
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the routine was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the routine was created.
+ <literal>DATABASE_COLLATION</literal> is the collation of the
+ database with which the routine is associated. These columns
+ were added in MySQL 5.1.21.
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
@@ -2903,6 +2932,16 @@
<entry/>
<entry></entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
<!--
<row>
<entry>
@@ -2986,6 +3025,18 @@
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the view was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the view was created. These columns were added in MySQL
+ 5.1.21.
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
@@ -3134,6 +3185,21 @@
<entry/>
<entry>MySQL extension</entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>DATABASE_COLLATION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -3244,6 +3310,20 @@
<listitem>
<para>
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the trigger was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the trigger was created.
+ <literal>DATABASE_COLLATION</literal> is the collation of the
+ database with which the trigger is associated. These columns
+ were added in MySQL 5.1.21.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
The following columns currently always contain
<literal>NULL</literal>: <literal>TRIGGER_CATALOG</literal>,
<literal>EVENT_OBJECT_CATALOG</literal>,
@@ -4097,6 +4177,21 @@
<entry>Originator</entry>
<entry>MySQL extension</entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>DATABASE_COLLATION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -4357,11 +4452,21 @@
<para>
<literal>ORIGINATOR</literal>: The server ID of the MySQL
server on which the event was created; used in replication.
- The default value is 0.
+ The default value is 0. This column was added in MySQL 5.1.18.
</para>
+ </listitem>
+ <listitem>
<para>
- This column was added in MySQL 5.1.18.
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the event was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the event was created.
+ <literal>DATABASE_COLLATION</literal> is the collation of the
+ database with which the event is associated. These columns
+ were added in MySQL 5.1.21.
</para>
</listitem>
Modified: trunk/refman-5.1/news-5.1.xml
===================================================================
--- trunk/refman-5.1/news-5.1.xml 2007-07-11 18:05:34 UTC (rev 7089)
+++ trunk/refman-5.1/news-5.1.xml 2007-07-11 20:16:17 UTC (rev 7090)
Changed blocks: 1, Lines Added: 109, Lines Deleted: 6; 4887 bytes
@@ -413,13 +413,116 @@
<listitem>
<para>
- <literal>SHOW TRIGGERS</literal> did not handle non-Latin
- symbols in column names correctly;
- <command>mysqldump</command> also did not work properly with
- such triggers. Both of these issues were also related to
- improper handling of non-Latin characters sets in
- <literal>INFORMATION_SCHEMA</literal> tables. (Bug #19443)
+ Several issues were identified for stored programs containing
+ non-ASCII symbols. These issues involved conversion errors due
+ to incomplete character set information when translating these
+ objects to and from stored format, such as:
</para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ Parsing the original object definition so that it can be
+ stored.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Compiling the stored definition into executable form when
+ the object is invoked.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Retrieval of object definitions from
+ <literal>INFORMATION_SCHEMA</literal> tables.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Displaying the object definition in
+ <literal>SHOW</literal> statements. This issue also
+ affected <command>mysqldump</command>, which uses
+ <literal>SHOW</literal>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
+ The fix for the problems is to store character set information
+ from the object creation context so that this information is
+ available when the object needs to be used later. The context
+ includes the client character set, the connection character
+ set and collation, and the collation of the database with
+ which the object is associated.
+ </para>
+
+ <para>
+ As a result of the patch, several tables have new columns:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ In the <literal>mysql</literal> database, the
+ <literal>proc</literal> and <literal>event</literal>
+ tables now have these columns:
+ <literal>character_set_client</literal>,
+ <literal>collation_connection</literal>,
+ <literal>db_collation</literal>,
+ <literal>body_utf8</literal>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ In <literal>INFORMATION_SCHEMA</literal>, the
+ <literal>VIEWS</literal> table now has these columns:
+ <literal>CHARACTER_SET_CLIENT</literal>,
+ <literal>COLLATION_CONNECTION</literal>. The
+ <literal>ROUTINES</literal>, <literal>TRIGGERS</literal>,
+ and <literal>EVENT</literal> tables now have these
+ columns: <literal>CHARACTER_SET_CLIENT</literal>,
+ <literal>COLLATION_CONNECTION</literal>,
+ <literal>DATABASE_COLLATION</literal>.
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
+ These columns store the session values of the
+ <literal>character_set_client</literal> and
+ <literal>collation_connection</literal> system variables, and
+ the collation of the database with which the object is
+ associated. The values are those in effect at object creation
+ time. (The saved database collation is not the value of the
+ <literal>collation_database</literal> system variable, which
+ applies to the default database; the database that contains
+ the object is not necessarily the default database.)
+ </para>
+
+ <para>
+ Several <literal>SHOW</literal> statements now display
+ additional columns corresponding to the new table columns.
+ These statements are: <literal>SHOW CREATE EVENT</literal>,
+ <literal>SHOW CREATE FUNCTION</literal>, <literal>SHOW CREATE
+ PROCEDURE</literal>, <literal>SHOW CREATE VIEW</literal>,
+ <literal>SHOW EVENTS</literal>, <literal>SHOW FUNCTION
+ STATUS</literal>, <literal>SHOW PROCEDURE STATUS</literal>,
+ <literal>SHOW TRIGGERS</literal>.
+ </para>
+
+ <para>
+ (Bug #11986, Bug #16291, Bug #19443, Bug #21249, Bug #25212,
+ Bug #25221)
+ </para>
</listitem>
<listitem>
Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml 2007-07-11 18:05:34 UTC (rev 7089)
+++ trunk/refman-5.1/sql-syntax.xml 2007-07-11 20:16:17 UTC (rev 7090)
Changed blocks: 7, Lines Added: 100, Lines Deleted: 48; 8408 bytes
@@ -18913,22 +18913,37 @@
mysql> SHOW CREATE EVENT test.e_daily\G
*************************** 1. row ***************************
- Event: e_daily
-Create Event: CREATE EVENT e_daily
- ON SCHEDULE EVERY 1 DAY
- STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
- ENABLE
- COMMENT 'Saves total number of sessions and
- clears the table once per day.'
- DO
- BEGIN
- INSERT INTO site_activity.totals (when, total)
- SELECT CURRENT_TIMESTAMP, COUNT(*)
- FROM site_activity.sessions;
- DELETE FROM site_activity.sessions;
- END
+ Event: e_daily
+ Create Event: CREATE EVENT e_daily
+ ON SCHEDULE EVERY 1 DAY
+ STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
+ ENABLE
+ COMMENT 'Saves total number of sessions and
+ clears the table once per day.'
+ DO
+ BEGIN
+ INSERT INTO site_activity.totals (when, total)
+ SELECT CURRENT_TIMESTAMP, COUNT(*)
+ FROM site_activity.sessions;
+ DELETE FROM site_activity.sessions;
+ END
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
+ <para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the event was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the event was created. <literal>Database
+ Collation</literal> is the collation of the database with
+ which the event is associated. These columns were added in
+ MySQL 5.1.21.
+ </para>
+
<remark role="help-example-end"/>
<para>
@@ -18986,13 +19001,28 @@
<programlisting>
mysql> <userinput>SHOW CREATE FUNCTION test.hello\G</userinput>
*************************** 1. row ***************************
- Function: hello
- sql_mode:
-Create Function: CREATE FUNCTION `test`.`hello`(s CHAR(20)) »
- RETURNS CHAR(50)
- RETURN CONCAT('Hello, ',s,'!')
+ Function: hello
+ sql_mode:
+ Create Function: CREATE FUNCTION `test`.`hello`(s CHAR(20)) »
+ RETURNS CHAR(50)
+ RETURN CONCAT('Hello, ',s,'!')
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
+ <para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the routine was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the routine was created. <literal>Database
+ Collation</literal> is the collation of the database with
+ which the routine is associated. These columns were added in
+ MySQL 5.1.21.
+ </para>
+
</section>
<section id="show-create-table">
@@ -19126,15 +19156,28 @@
<remark role="help-description-end"/>
<programlisting>
-mysql> <userinput>SHOW CREATE VIEW v;</userinput>
-+------+----------------------------------------------------+
-| View | Create View |
-+------+----------------------------------------------------+
-| v | CREATE VIEW `test`.`v` AS select 1 AS `a`,2 AS `b` |
-+------+----------------------------------------------------+
+mysql> <userinput>SHOW CREATE VIEW v\G</userinput>
+*************************** 1. row ***************************
+ View: v
+ Create View: CREATE ALGORITHM=UNDEFINED
+ DEFINER=`bob`@`localhost`
+ SQL SECURITY DEFINER VIEW
+ `v` AS select 1 AS `a`,2 AS `b`
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
</programlisting>
<para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the routine was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the routine was created. These columns were added in
+ MySQL 5.1.21.
+ </para>
+
+ <para>
Use of <literal>SHOW CREATE VIEW</literal> requires the
<literal>SHOW VIEW</literal> privilege and the
<literal>SELECT</literal> privilege for the view in question.
@@ -19931,19 +19974,21 @@
mysql> <userinput>SHOW EVENTS\G</userinput>
*************************** 1. row ***************************
- Db: myschema
- Name: e_daily
- Definer: jon@ghidora
- Time zone: SYSTEM
- Type: RECURRING
- Execute at: NULL
-Interval value: 10
-Interval field: INTERVAL_SECOND
- Starts: 2006-02-09 10:41:23
- Ends: 0000-00-00 00:00:00
- Status: ENABLED
- Originator: 0
-1 row in set (0.01 sec)
+ Db: myschema
+ Name: e_daily
+ Definer: jon@ghidora
+ Time zone: SYSTEM
+ Type: RECURRING
+ Execute at: NULL
+ Interval value: 10
+ Interval field: INTERVAL_SECOND
+ Starts: 2006-02-09 10:41:23
+ Ends: 0000-00-00 00:00:00
+ Status: ENABLED
+ Originator: 0
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
<para>
@@ -20091,11 +20136,22 @@
<listitem>
<para>
<literal>Originator</literal>: The server ID of the MySQL
- server on which the event was created. Defaults to 0.
+ server on which the event was created. Defaults to 0. This
+ column was added in MySQL 5.1.18.
</para>
+ </listitem>
+ <listitem>
<para>
- This column was added in MySQL 5.1.18.
+ <literal>character_set_client</literal> is the session
+ value of the <literal>character_set_client</literal>
+ system variable when the routine was created.
+ <literal>collation_connection</literal> is the session
+ value of the <literal>collation_connection</literal>
+ system variable when the routine was created.
+ <literal>Database Collation</literal> is the collation of
+ the database with which the routine is associated. These
+ columns were added in MySQL 5.1.21.
</para>
</listitem>
@@ -20832,10 +20888,10 @@
<para>
These statements are MySQL extensions. They return
characteristics of routines, such as the database, name, type,
- creator, and creation and modification dates. If no pattern is
- specified, the information for all stored procedures or all
- stored functions is listed, depending on which statement you
- use.
+ creator, creation and modification dates, and character set
+ information. If no pattern is specified, the information for
+ all stored procedures or all stored functions is listed,
+ depending on which statement you use.
</para>
<remark role="help-description-end"/>
@@ -20845,17 +20901,32 @@
<programlisting>
mysql> <userinput>SHOW FUNCTION STATUS LIKE 'hello'\G</userinput>
*************************** 1. row ***************************
- Db: test
- Name: hello
- Type: FUNCTION
- Definer: testuser@localhost
Modified: trunk/refman-5.2/information-schema.xml
===================================================================
--- trunk/refman-5.2/information-schema.xml 2007-07-11 18:05:34 UTC (rev 7089)
+++ trunk/refman-5.2/information-schema.xml 2007-07-11 20:16:17 UTC (rev 7090)
Changed blocks: 8, Lines Added: 103, Lines Deleted: 2; 5624 bytes
@@ -2795,6 +2795,21 @@
<entry><literal>definer</literal></entry>
<entry>MySQL extension</entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>DATABASE_COLLATION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -2832,6 +2847,19 @@
</itemizedlist>
</listitem>
+ <listitem>
+ <para>
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the routine was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the routine was created.
+ <literal>DATABASE_COLLATION</literal> is the collation of the
+ database with which the routine is associated.
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
@@ -2903,6 +2931,16 @@
<entry/>
<entry></entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
<!--
<row>
<entry>
@@ -2986,6 +3024,17 @@
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the view was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the view was created.
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
@@ -3134,6 +3183,21 @@
<entry/>
<entry>MySQL extension</entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>DATABASE_COLLATION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -3244,6 +3308,19 @@
<listitem>
<para>
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the trigger was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the trigger was created.
+ <literal>DATABASE_COLLATION</literal> is the collation of the
+ database with which the trigger is associated.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
The following columns currently always contain
<literal>NULL</literal>: <literal>TRIGGER_CATALOG</literal>,
<literal>EVENT_OBJECT_CATALOG</literal>,
@@ -4097,6 +4174,21 @@
<entry>Originator</entry>
<entry>MySQL extension</entry>
</row>
+ <row>
+ <entry><literal>CHARACTER_SET_CLIENT</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>COLLATION_CONNECTION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
+ <row>
+ <entry><literal>DATABASE_COLLATION</literal></entry>
+ <entry/>
+ <entry>MySQL extension</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -4357,11 +4449,20 @@
<para>
<literal>ORIGINATOR</literal>: The server ID of the MySQL
server on which the event was created; used in replication.
- The default value is 0.
+ The default value is 0. This column was added in MySQL 5.1.18.
</para>
+ </listitem>
+ <listitem>
<para>
- This column was added in MySQL 5.1.18.
+ <literal>CHARACTER_SET_CLIENT</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the event was created.
+ <literal>COLLATION_CONNECTION</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the event was created.
+ <literal>DATABASE_COLLATION</literal> is the collation of the
+ database with which the event is associated.
</para>
</listitem>
Modified: trunk/refman-5.2/sql-syntax.xml
===================================================================
--- trunk/refman-5.2/sql-syntax.xml 2007-07-11 18:05:34 UTC (rev 7089)
+++ trunk/refman-5.2/sql-syntax.xml 2007-07-11 20:16:17 UTC (rev 7090)
Changed blocks: 7, Lines Added: 96, Lines Deleted: 48; 8196 bytes
@@ -18930,22 +18930,36 @@
mysql> SHOW CREATE EVENT test.e_daily\G
*************************** 1. row ***************************
- Event: e_daily
-Create Event: CREATE EVENT e_daily
- ON SCHEDULE EVERY 1 DAY
- STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
- ENABLE
- COMMENT 'Saves total number of sessions and
- clears the table once per day.'
- DO
- BEGIN
- INSERT INTO site_activity.totals (when, total)
- SELECT CURRENT_TIMESTAMP, COUNT(*)
- FROM site_activity.sessions;
- DELETE FROM site_activity.sessions;
- END
+ Event: e_daily
+ Create Event: CREATE EVENT e_daily
+ ON SCHEDULE EVERY 1 DAY
+ STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
+ ENABLE
+ COMMENT 'Saves total number of sessions and
+ clears the table once per day.'
+ DO
+ BEGIN
+ INSERT INTO site_activity.totals (when, total)
+ SELECT CURRENT_TIMESTAMP, COUNT(*)
+ FROM site_activity.sessions;
+ DELETE FROM site_activity.sessions;
+ END
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
+ <para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the event was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the event was created. <literal>Database
+ Collation</literal> is the collation of the database with
+ which the event is associated.
+ </para>
+
<remark role="help-example-end"/>
<para>
@@ -19003,13 +19017,27 @@
<programlisting>
mysql> <userinput>SHOW CREATE FUNCTION test.hello\G</userinput>
*************************** 1. row ***************************
- Function: hello
- sql_mode:
-Create Function: CREATE FUNCTION `test`.`hello`(s CHAR(20)) »
- RETURNS CHAR(50)
- RETURN CONCAT('Hello, ',s,'!')
+ Function: hello
+ sql_mode:
+ Create Function: CREATE FUNCTION `test`.`hello`(s CHAR(20)) »
+ RETURNS CHAR(50)
+ RETURN CONCAT('Hello, ',s,'!')
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
+ <para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the routine was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the routine was created. <literal>Database
+ Collation</literal> is the collation of the database with
+ which the routine is associated.
+ </para>
+
</section>
<section id="show-create-table">
@@ -19143,15 +19171,27 @@
<remark role="help-description-end"/>
<programlisting>
-mysql> <userinput>SHOW CREATE VIEW v;</userinput>
-+------+----------------------------------------------------+
-| View | Create View |
-+------+----------------------------------------------------+
-| v | CREATE VIEW `test`.`v` AS select 1 AS `a`,2 AS `b` |
-+------+----------------------------------------------------+
+mysql> <userinput>SHOW CREATE VIEW v\G</userinput>
+*************************** 1. row ***************************
+ View: v
+ Create View: CREATE ALGORITHM=UNDEFINED
+ DEFINER=`bob`@`localhost`
+ SQL SECURITY DEFINER VIEW
+ `v` AS select 1 AS `a`,2 AS `b`
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
</programlisting>
<para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the routine was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the routine was created.
+ </para>
+
+ <para>
Use of <literal>SHOW CREATE VIEW</literal> requires the
<literal>SHOW VIEW</literal> privilege and the
<literal>SELECT</literal> privilege for the view in question.
@@ -19948,19 +19988,21 @@
mysql> <userinput>SHOW EVENTS\G</userinput>
*************************** 1. row ***************************
- Db: myschema
- Name: e_daily
- Definer: jon@ghidora
- Time zone: SYSTEM
- Type: RECURRING
- Execute at: NULL
-Interval value: 10
-Interval field: INTERVAL_SECOND
- Starts: 2006-02-09 10:41:23
- Ends: 0000-00-00 00:00:00
- Status: ENABLED
- Originator: 0
-1 row in set (0.01 sec)
+ Db: myschema
+ Name: e_daily
+ Definer: jon@ghidora
+ Time zone: SYSTEM
+ Type: RECURRING
+ Execute at: NULL
+ Interval value: 10
+ Interval field: INTERVAL_SECOND
+ Starts: 2006-02-09 10:41:23
+ Ends: 0000-00-00 00:00:00
+ Status: ENABLED
+ Originator: 0
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
<para>
@@ -20108,11 +20150,21 @@
<listitem>
<para>
<literal>Originator</literal>: The server ID of the MySQL
- server on which the event was created. Defaults to 0.
+ server on which the event was created. Defaults to 0. This
+ column was added in MySQL 5.1.18.
</para>
+ </listitem>
+ <listitem>
<para>
- This column was added in MySQL 5.1.18.
+ <literal>character_set_client</literal> is the session
+ value of the <literal>character_set_client</literal>
+ system variable when the routine was created.
+ <literal>collation_connection</literal> is the session
+ value of the <literal>collation_connection</literal>
+ system variable when the routine was created.
+ <literal>Database Collation</literal> is the collation of
+ the database with which the routine is associated.
</para>
</listitem>
@@ -20849,10 +20901,10 @@
<para>
These statements are MySQL extensions. They return
characteristics of routines, such as the database, name, type,
- creator, and creation and modification dates. If no pattern is
- specified, the information for all stored procedures or all
- stored functions is listed, depending on which statement you
- use.
+ creator, creation and modification dates, and character set
+ information. If no pattern is specified, the information for
+ all stored procedures or all stored functions is listed,
+ depending on which statement you use.
</para>
<remark role="help-description-end"/>
@@ -20862,17 +20914,31 @@
<programlisting>
mysql> <userinput>SHOW FUNCTION STATUS LIKE 'hello'\G</userinput>
*************************** 1. row ***************************
- Db: test
- Name: hello
- Type: FUNCTION
- Definer: testuser@localhost
Modified: 2004-08-03 15:29:37
===================================================================
Changed blocks: 1, Lines Added: 22, Lines Deleted: 8; 2289 bytes
@@ -21757,16 +21823,30 @@
<programlisting>
mysql> <userinput>SHOW TRIGGERS LIKE 'acc%'\G</userinput>
*************************** 1. row ***************************
- Trigger: ins_sum
- Event: INSERT
- Table: account
-Statement: SET @sum = @sum + NEW.amount
- Timing: BEFORE
- Created: NULL
- sql_mode:
- Definer: myname@localhost
+ Trigger: ins_sum
+ Event: INSERT
+ Table: account
+ Statement: SET @sum = @sum + NEW.amount
+ Timing: BEFORE
+ Created: NULL
+ sql_mode:
+ Definer: myname@localhost
+character_set_client: latin1
+collation_connection: latin1_swedish_ci
+ Database Collation: latin1_swedish_ci
</programlisting>
+ <para>
+ <literal>character_set_client</literal> is the session value
+ of the <literal>character_set_client</literal> system variable
+ when the trigger was created.
+ <literal>collation_connection</literal> is the session value
+ of the <literal>collation_connection</literal> system variable
+ when the trigger was created. <literal>Database
+ Collation</literal> is the collation of the database with
+ which the trigger is associated.
+ </para>
+
<remark role="help-description-end"/>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r7090 - in trunk: . refman-5.1 refman-5.2 | paul | 11 Jul |