Author: jstephens
Date: 2007-02-02 10:41:43 +0100 (Fri, 02 Feb 2007)
New Revision: 4747
Log:
DROP USER and RENAME USER do not invalidate or migrate scheduled events
(or other DB objects)
Fixes Docs Bug #20319
Modified:
trunk/refman-5.1/events.xml
trunk/refman-5.1/sql-syntax.xml
Modified: trunk/refman-5.1/events.xml
===================================================================
--- trunk/refman-5.1/events.xml 2007-02-02 08:47:46 UTC (rev 4746)
+++ trunk/refman-5.1/events.xml 2007-02-02 09:41:43 UTC (rev 4747)
Changed blocks: 2, Lines Added: 41, Lines Deleted: 9; 2387 bytes
@@ -1602,14 +1602,20 @@
REVOKE EVENT ON myschema.* FROM jon@ghidora;
</programlisting>
+ <important>
+ <para>
+ Revoking the <literal>EVENT</literal> privilege from a user does
+ not delete or disable any events that may have been created by
+ that user.
+ </para>
+
+ <para>
+ An event is not migrated or dropped as a result of the renaming
+ or dropping of the user who created it.
+ </para>
+ </important>
+
<para>
- <emphasis role="bold">Important</emphasis>: Revoking the
- <literal>EVENT</literal> privilege from a user account does
- <emphasis>not</emphasis> delete or disable any events that may
- have been created by that account.
- </para>
-
- <para>
For example, suppose that that user <literal>jon@ghidora</literal>
has been granted the <literal>EVENT</literal> and
<literal>INSERT</literal> privileges on the
@@ -1630,9 +1636,35 @@
the <literal>EVENT</literal> privilege for
<literal>jon@ghidora</literal>. However,
<literal>e_insert</literal> continues to execute, inserting a new
- row into <literal>mytable</literal> each seven seconds.
+ row into <literal>mytable</literal> each seven seconds. The same
+ would be true if <literal>root</literal> had issued either of
+ these statements:
</para>
-
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>DROP USER jon@ghidora;</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>RENAME USER jon@ghidora TO someotherguy@ghidora;</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ You can verify that this is true by examining the
+ <literal>mysql.event</literal> table (discussed later in this
+ section) or the <literal>INFORMATION_SCHEMA.EVENTS</literal>
+ table (see <xref linkend="events-table"/>) before and after
+ issuing a <literal>DROP USER</literal> or <literal>RENAME
+ USER</literal> statement.
+ </para>
+
+
<indexterm>
<primary><literal>mysql.event</literal> table</primary>
</indexterm>
Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml 2007-02-02 08:47:46 UTC (rev 4746)
+++ trunk/refman-5.1/sql-syntax.xml 2007-02-02 09:41:43 UTC (rev 4747)
Changed blocks: 2, Lines Added: 15, Lines Deleted: 0; 1132 bytes
@@ -14019,6 +14019,13 @@
that user's next attempt to log in will fail. <emphasis>This
is by design</emphasis>.
</para>
+
+ <para>
+ <literal>DROP USER</literal> does not automatically delete or
+ invalidate any database objects that the user created. This
+ applies to tables, views, stored routines, triggers, and
+ events.
+ </para>
</section>
@@ -15139,6 +15146,14 @@
</para>
<remark role="help-description-end"/>
+
+ <para>
+ <literal>RENAME USER</literal> does not automatically migrate
+ any database objects that the user created, nor does it
+ migrate any privileges that the user had prior to the
+ renaming. This applies to tables, views, stored routines,
+ triggers, and events.
+ </para>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r4747 - trunk/refman-5.1 | jon | 2 Feb |