List:Commits« Previous MessageNext Message »
From:martin.brown Date:December 4 2009 12:51pm
Subject:svn commit - mysqldoc@docsrva: r18006 - trunk/refman-common
View as plain text  
Author: mcbrown
Date: 2009-12-04 13:51:12 +0100 (Fri, 04 Dec 2009)
New Revision: 18006

Log:
Fixing the examples for where resultset_is_needed is now required



Modified:
   trunk/refman-common/mysql-proxy-core.xml


Modified: trunk/refman-common/mysql-proxy-core.xml
===================================================================
--- trunk/refman-common/mysql-proxy-core.xml	2009-12-04 12:44:40 UTC (rev 18005)
+++ trunk/refman-common/mysql-proxy-core.xml	2009-12-04 12:51:12 UTC (rev 18006)
Changed blocks: 2, Lines Added: 8, Lines Deleted: 4; 1652 bytes

@@ -2260,7 +2260,11 @@
             <literal>id</literal> &mdash; the ID of the result set,
             which corresponds to the ID that was set when the query
             packet was submitted to the server when using
-            <function>append(id)</function> on the query queue.
+            <function>append(id)</function> on the query queue. You must
+            have set the <literal>resultset_is_needed</literal> flag to
+            <function>append</function> to intercept the resultset
+            before it is returned to the client. See
+            <xref linkend="mysql-proxy-scripting-structures-queries"/>.
           </para>
         </listitem>
 

@@ -2365,9 +2369,9 @@
 
 <programlisting>function read_query( packet )
         if packet:byte() == proxy.COM_QUERY then
-                proxy.queries:append(2, string.char(proxy.COM_QUERY) .. "SELECT NOW()" )
-                proxy.queries:append(1, packet )
-                proxy.queries:append(2, string.char(proxy.COM_QUERY) .. "SELECT NOW()" )
+                proxy.queries:append(2, string.char(proxy.COM_QUERY) .. "SELECT NOW()", {resultset_is_needed = true} )
+                proxy.queries:append(1, packet, {resultset_is_needed = true})
+                proxy.queries:append(2, string.char(proxy.COM_QUERY) .. "SELECT NOW()", {resultset_is_needed = true} )
 
                 return proxy.PROXY_SEND_QUERY
         end


Thread
svn commit - mysqldoc@docsrva: r18006 - trunk/refman-commonmartin.brown4 Dec