List:Commits« Previous MessageNext Message »
From:paul Date:July 12 2007 7:32pm
Subject:svn commit - mysqldoc@docsrva: r7103 - in trunk: . refman-5.1 refman-5.2
View as plain text  
Author: paul
Date: 2007-07-12 21:32:29 +0200 (Thu, 12 Jul 2007)
New Revision: 7103

Log:
 r27603@polar:  paul | 2007-07-12 12:39:28 -0500
 SQLPS prepared statements now can be cached in query cache, even if they
 contain ? parameter markers. (Bug#29318)


Modified:
   trunk/refman-5.1/news-5.1.xml
   trunk/refman-5.1/optimization.xml
   trunk/refman-5.2/optimization.xml

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:27602
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:22686
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:27603
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:22686
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/news-5.1.xml
===================================================================
--- trunk/refman-5.1/news-5.1.xml	2007-07-12 19:32:03 UTC (rev 7102)
+++ trunk/refman-5.1/news-5.1.xml	2007-07-12 19:32:29 UTC (rev 7103)
Changed blocks: 2, Lines Added: 5, Lines Deleted: 2; 814 bytes

@@ -53,7 +53,6 @@
 
     &enterprise-offering-note;
     
-<!--
     <para>
       Functionality added or changed:
     </para>

@@ -62,11 +61,15 @@
 
       <listitem>
         <para>
+          Previously, prepared statements processed using
+          <literal>PREPARE</literal> and <literal>EXECUTE</literal> were
+          not subject to caching in the query cache if they contained
+          any <literal>?</literal> parameter markers. This limitation
+          has been lifted. (Bug #29318)
         </para>
       </listitem>
 
     </itemizedlist>
--->
 
     <para>
       Bugs fixed:


Modified: trunk/refman-5.1/optimization.xml
===================================================================
--- trunk/refman-5.1/optimization.xml	2007-07-12 19:32:03 UTC (rev 7102)
+++ trunk/refman-5.1/optimization.xml	2007-07-12 19:32:29 UTC (rev 7103)
Changed blocks: 3, Lines Added: 8, Lines Deleted: 5; 1700 bytes

@@ -10541,9 +10541,9 @@
 
         <para>
           Before MySQL 5.1.17, prepared statements do not use the query
-          cache. As of 5.1.17, prepared statements use the query cache
-          under certain conditions, which differ depending on the
-          preparation method:
+          cache. Beginning with 5.1.17, prepared statements use the
+          query cache under certain conditions, which differ depending
+          on the preparation method:
         </para>
 
         <itemizedlist>

@@ -10577,7 +10577,7 @@
             </para>
 
             <para>
-              For a prepared statement executed via
+              Before MySQL 5.1.21, for a prepared statement executed via
               <literal>PREPARE</literal> and <literal>EXECUTE</literal>,
               it is not cached if it contains any <literal>?</literal>
               parameter markers. In that case, the statement after

@@ -10587,7 +10587,10 @@
               statement is compared with statements in the query cache
               that were executed via the text protocol (that is, it is
               compared with other SQL PS statements and non-prepared
-              statements).
+              statements). As of MySQL 5.1.21, this limitation is lifted
+              and prepared statments that contain parameter markers can
+              be cached because expansion directly substitutes the user
+              variable values.
             </para>
           </listitem>
 


Modified: trunk/refman-5.2/optimization.xml
===================================================================
--- trunk/refman-5.2/optimization.xml	2007-07-12 19:32:03 UTC (rev 7102)
+++ trunk/refman-5.2/optimization.xml	2007-07-12 19:32:29 UTC (rev 7103)
Changed blocks: 1, Lines Added: 12, Lines Deleted: 51; 3546 bytes

@@ -10530,59 +10530,20 @@
         </para>
 
         <para>
-          Before MySQL 5.1.17, prepared statements do not use the query
-          cache. As of 5.1.17, prepared statements use the query cache
-          under certain conditions, which differ depending on the
-          preparation method:
+          Prepared statements that are issued via the binary protocol
+          using <literal>mysql_stmt_prepare()</literal> and
+          <literal>mysql_stmt_execute()</literal> (see
+          <xref linkend="c-api-prepared-statements"/>), are subject to
+          limitations on caching. Comparison with statements in the
+          query cache is based on the text of the statement after
+          expansion of <literal>?</literal> parameter markers. The
+          statement is compared only with other cached statements that
+          were executed via the binary protocol. That is, for query
+          cache purposes, prepared statements issued via the binary
+          protocol are distinct from prepared statements issued via the
+          text protocol (see <xref linkend="sqlps"/>).
         </para>
 
-        <itemizedlist>
-
-          <listitem>
-            <para>
-              Statements that are issued via the binary protocol using
-              <literal>mysql_stmt_prepare()</literal> and
-              <literal>mysql_stmt_execute()</literal>. See
-              <xref linkend="c-api-prepared-statements"/>.
-            </para>
-
-            <para>
-              For a prepared statement executed via the binary protocol,
-              comparison with statements in the query cache is based on
-              the text of the statement after expansion of
-              <literal>?</literal> parameter markers. The statement is
-              compared only with other cached statements that were
-              executed via the binary protocol. That is, for query cache
-              purposes, statements issued via the binary protocol are
-              distinct from statements issued via the text protocol.
-            </para>
-          </listitem>
-
-          <listitem>
-            <para>
-              Statements that are issued via the text (non-binary)
-              protocol using <literal>PREPARE</literal> and
-              <literal>EXECUTE</literal>. See <xref linkend="sqlps"/>.
-              These are denoted SQL PS statements here.
-            </para>
-
-            <para>
-              For a prepared statement executed via
-              <literal>PREPARE</literal> and <literal>EXECUTE</literal>,
-              it is not cached if it contains any <literal>?</literal>
-              parameter markers. In that case, the statement after
-              parameter expansion contains references to user variables,
-              which prevents caching, even for non-prepared statements.
-              If the statement contains no parameter markers, the
-              statement is compared with statements in the query cache
-              that were executed via the text protocol (that is, it is
-              compared with other SQL PS statements and non-prepared
-              statements).
-            </para>
-          </listitem>
-
-        </itemizedlist>
-
         <para>
           A query cannot be cached if it contains any of the functions
           shown in the following table:


Thread
svn commit - mysqldoc@docsrva: r7103 - in trunk: . refman-5.1 refman-5.2paul12 Jul