List:Commits« Previous MessageNext Message »
From:mcbrown Date:February 10 2007 4:47pm
Subject:svn commit - mysqldoc@docsrva: r4888 - in trunk: refman-4.1 refman-5.0 refman-5.1
View as plain text  
Author: mcbrown
Date: 2007-02-10 17:47:13 +0100 (Sat, 10 Feb 2007)
New Revision: 4888

Log:
Documenting Merge Engine conformance improvements (WL #3567)



Modified:
   trunk/refman-4.1/storage-engines.xml
   trunk/refman-5.0/se-merge.xml
   trunk/refman-5.1/se-merge.xml


Modified: trunk/refman-4.1/storage-engines.xml
===================================================================
--- trunk/refman-4.1/storage-engines.xml	2007-02-10 04:33:53 UTC (rev 4887)
+++ trunk/refman-4.1/storage-engines.xml	2007-02-10 16:47:13 UTC (rev 4888)
Changed blocks: 1, Lines Added: 129, Lines Deleted: 0; 3935 bytes

@@ -1763,6 +1763,135 @@
     </para>
 
     <para>
+      In MySQL 4.1.23 and higher, when a table that is part of a
+      <literal>MERGE</literal> table is opened, the following checks are
+      applied before opening each table. If any table fails the
+      conformance checks, then the operation that triggered the opening
+      of the table will fail. The conformance checks applied to each
+      table are:
+    </para>
+
+    <itemizedlist>
+
+      <listitem>
+        <para>
+          Table must have exactly the same amount of columns that
+          <literal>MERGE</literal> table has.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Column order in the <literal>MERGE</literal> table must match
+          the column order in the underlying tables.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          Additionally, the specification for each column in the parent
+          <literal>MERGE</literal> table and the underlying table are
+          compared. For each each column, MySQL checks:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Column type in the underlying table equals the column type
+              of <literal>MERGE</literal> table.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Column length in the underlying table equals the column
+              length of <literal>MERGE</literal> table.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Column of underlying table and column of
+              <literal>MERGE</literal> table can be
+              <literal>NULL</literal>.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+      </listitem>
+
+      <listitem>
+        <para>
+          Underlying table must have at least the same amount of keys
+          that merge table has. The underlying table may have morekeys
+          than the <literal>MERGE</literal> table, but cannot have less.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          For each key:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              Check if the key type of underlying table equals the key
+              type of merge table.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              Check if number of key parts (i.e. multiple columns within
+              a compound key) in the underlying table key definition
+              equals the number of key parts in merge table key
+              definition.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              For each key part:
+            </para>
+
+            <itemizedlist>
+
+              <listitem>
+                <para>
+                  Check if key part lengths are equal.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Check if key part types are equal.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Check if key part languages are equal.
+                </para>
+              </listitem>
+
+              <listitem>
+                <para>
+                  Check if key part can be <literal>NULL</literal>.
+                </para>
+              </listitem>
+
+            </itemizedlist>
+          </listitem>
+
+        </itemizedlist>
+      </listitem>
+
+    </itemizedlist>
+
+    <para>
       After creating the <literal>MERGE</literal> table, you can issue
       queries that operate on the group of tables as a whole:
     </para>


Modified: trunk/refman-5.0/se-merge.xml
===================================================================
--- trunk/refman-5.0/se-merge.xml	2007-02-10 04:33:53 UTC (rev 4887)
+++ trunk/refman-5.0/se-merge.xml	2007-02-10 16:47:13 UTC (rev 4888)
Changed blocks: 3, Lines Added: 154, Lines Deleted: 15; 6168 bytes

@@ -69,6 +69,16 @@
   </para>
 
   <para>
+    Starting with MySQL 5.0.36 the underlying table definitions and
+    indexes must conform more closely to the definition of the
+    <literal>MERGE</literal> table. Conformance will be checked when the
+    merged tables are opened, not when the <literal>MERGE</literal>
+    table is created. This means that changes to the definitions of
+    tables within a <literal>MERGE</literal> may cause a failure when
+    the <literal>MERGE</literal> table is accessed.
+  </para>
+
+  <para>
     You can use <literal>SELECT</literal>, <literal>DELETE</literal>,
     <literal>UPDATE</literal>, and <literal>INSERT</literal> on
     <literal>MERGE</literal> tables. You must have

@@ -78,21 +88,22 @@
     <literal>MERGE</literal> table.
   </para>
 
-  <para>
-    <emphasis role="bold">Note</emphasis>: The use of
-    <literal>MERGE</literal> tables entails the following security
-    issue: If a user has access to <literal>MyISAM</literal> table
-    <replaceable>t</replaceable>, that user can create a
-    <literal>MERGE</literal> table <replaceable>m</replaceable> that
-    accesses <replaceable>t</replaceable>. However, if the user's
-    privileges on <replaceable>t</replaceable> are subsequently revoked,
-    the user can continue to access <replaceable>t</replaceable> by
-    doing so through <replaceable>m</replaceable>. If this behavior is
-    undesirable, you can start the server with the new
-    <option>--skip-merge</option> option to disable the
-    <literal>MERGE</literal> storage engine. This option is available as
-    of MySQL 5.0.24.
-  </para>
+  <note>
+    <para>
+      The use of <literal>MERGE</literal> tables entails the following
+      security issue: If a user has access to <literal>MyISAM</literal>
+      table <replaceable>t</replaceable>, that user can create a
+      <literal>MERGE</literal> table <replaceable>m</replaceable> that
+      accesses <replaceable>t</replaceable>. However, if the user's
+      privileges on <replaceable>t</replaceable> are subsequently
+      revoked, the user can continue to access
+      <replaceable>t</replaceable> by doing so through
+      <replaceable>m</replaceable>. If this behavior is undesirable, you
+      can start the server with the new <option>--skip-merge</option>
+      option to disable the <literal>MERGE</literal> storage engine.
+      This option is available as of MySQL 5.0.24.
+    </para>
+  </note>
 
   <para>
     If you <literal>DROP</literal> the <literal>MERGE</literal> table,

@@ -154,6 +165,134 @@
   </para>
 
   <para>
+    In MySQL 5.0.36 and higher, when a table that is part of a
+    <literal>MERGE</literal> table is opened, the following checks are
+    applied before opening each table. If any table fails the
+    conformance checks, then the operation that triggered the opening of
+    the table will fail. The conformance checks applied to each table
+    are:
+  </para>
+
+  <itemizedlist>
+
+    <listitem>
+      <para>
+        Table must have exactly the same amount of columns that
+        <literal>MERGE</literal> table has.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        Column order in the <literal>MERGE</literal> table must match
+        the column order in the underlying tables.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        Additionally, the specification for each column in the parent
+        <literal>MERGE</literal> table and the underlying table are
+        compared. For each each column, MySQL checks:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Column type in the underlying table equals the column type
+            of <literal>MERGE</literal> table.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Column length in the underlying table equals the column
+            length of <literal>MERGE</literal> table.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Column of underlying table and column of
+            <literal>MERGE</literal> table can be
+            <literal>NULL</literal>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>
+        Underlying table must have at least the same amount of keys that
+        merge table has. The underlying table may have morekeys than the
+        <literal>MERGE</literal> table, but cannot have less.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        For each key:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Check if the key type of underlying table equals the key
+            type of merge table.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Check if number of key parts (i.e. multiple columns within a
+            compound key) in the underlying table key definition equals
+            the number of key parts in merge table key definition.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            For each key part:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                Check if key part lengths are equal.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Check if key part types are equal.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Check if key part languages are equal.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Check if key part can be <literal>NULL</literal>.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+        </listitem>
+
+      </itemizedlist>
+    </listitem>
+
+  </itemizedlist>
+
+  <para>
     After creating the <literal>MERGE</literal> table, you can issue
     queries that operate on the group of tables as a whole:
   </para>


Modified: trunk/refman-5.1/se-merge.xml
===================================================================
--- trunk/refman-5.1/se-merge.xml	2007-02-10 04:33:53 UTC (rev 4887)
+++ trunk/refman-5.1/se-merge.xml	2007-02-10 16:47:13 UTC (rev 4888)
Changed blocks: 1, Lines Added: 128, Lines Deleted: 0; 3680 bytes

@@ -147,6 +147,134 @@
   </para>
 
   <para>
+    In MySQL 5.1.15 and higher, when a table that is part of a
+    <literal>MERGE</literal> table is opened, the following checks are
+    applied before opening each table. If any table fails the
+    conformance checks, then the operation that triggered the opening of
+    the table will fail. The conformance checks applied to each table
+    are:
+  </para>
+
+  <itemizedlist>
+
+    <listitem>
+      <para>
+        Table must have exactly the same amount of columns that
+        <literal>MERGE</literal> table has.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        Column order in the <literal>MERGE</literal> table must match
+        the column order in the underlying tables.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        Additionally, the specification for each column in the parent
+        <literal>MERGE</literal> table and the underlying table are
+        compared. For each each column, MySQL checks:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Column type in the underlying table equals the column type
+            of <literal>MERGE</literal> table.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Column length in the underlying table equals the column
+            length of <literal>MERGE</literal> table.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Column of underlying table and column of
+            <literal>MERGE</literal> table can be
+            <literal>NULL</literal>.
+          </para>
+        </listitem>
+
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>
+        Underlying table must have at least the same amount of keys that
+        merge table has. The underlying table may have morekeys than the
+        <literal>MERGE</literal> table, but cannot have less.
+      </para>
+    </listitem>
+
+    <listitem>
+      <para>
+        For each key:
+      </para>
+
+      <itemizedlist>
+
+        <listitem>
+          <para>
+            Check if the key type of underlying table equals the key
+            type of merge table.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            Check if number of key parts (i.e. multiple columns within a
+            compound key) in the underlying table key definition equals
+            the number of key parts in merge table key definition.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
+            For each key part:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                Check if key part lengths are equal.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Check if key part types are equal.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Check if key part languages are equal.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Check if key part can be <literal>NULL</literal>.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+        </listitem>
+
+      </itemizedlist>
+    </listitem>
+
+  </itemizedlist>
+
+  <para>
     After creating the <literal>MERGE</literal> table, you can issue
     queries that operate on the group of tables as a whole:
   </para>


Thread
svn commit - mysqldoc@docsrva: r4888 - in trunk: refman-4.1 refman-5.0 refman-5.1mcbrown10 Feb