Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1424/compiler/mil

Modified Files:
      Tag: XQuery_0-16
        milprint_summer.c 
Log Message:
Fix of bug [ 1644610 ] Conflict between normal query and XRPC query

To print the XRPC response message, we need the module NS and the name
of called method.  Previously, we search for these two values in
'shredBAT'.  This is error prone, because (i) we expect shredBAT to be
in the container 1, which is not always true and (ii) shredBAT is not
always added, because of the reuse of MIL tree.

Solution: store these two value explicitly in struct xquery_client.

Changes:

- struct xquery_client get two new variable 'moduleNS' and 'method'
- signature of xquery_print_result_loop is changed, added two new
  parameters.
- all calls to the MIL Command print_result have been adapted.
- added two new tests:

  conflict_normal_xrpc_queries_nx.SF-1644610: first a normal query with
  a function call, then an XRPC query with call to the same function

  conflict_normal_xrpc_queries_xn.SF-1644610: first an XRPC query with
  a function call, then a normal query with call to the same function




Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.318.2.6
retrieving revision 1.318.2.7
diff -u -d -r1.318.2.6 -r1.318.2.7
--- milprint_summer.c   1 Feb 2007 18:35:54 -0000       1.318.2.6
+++ milprint_summer.c   8 Feb 2007 18:15:23 -0000       1.318.2.7
@@ -10942,6 +10942,10 @@
         "var time_print := 0LL;\n"
         "var time_exec := 0LL;\n"
         "var time_start := 0LL;\n"
+        "# To print XRPC response message, we need to know the module\n"
+        "# and the method specified in the request message.\n"
+        "var moduleNS := str_nil;\n"
+        "var method := str_nil;\n"
         "var genType := \"xml\";\n";
 }
 
@@ -11040,11 +11044,6 @@
                                    (PF_STARTMIL_NORMAL("1"));
 }
 
-const char* PFdocbatMIL(void) {
-    /* NjN why isn't this moved to the pathfinder.mx file */
-    return  " ws_opencoll(ws, bat(shredBAT), \"\", TEMP_DOC);\n";
-}
-
 /* debug statement for PFstopMIL to print result set 
 "if (genType.search(\"debug\") >= 0) 
print(item.slice(0,10).col_name(\"tot_items_\"+str(item.count())));\n" 
 */
@@ -11055,7 +11054,7 @@
 #define PF_STOPMIL_RDONLY PF_STOPMIL_START\
            "  # 'none' could theoretically occur in genType as root tagname 
('xml-root-none'), so check for 'xml'\n"\
            "  if ((genType.search(\"none\") < 0) or (genType.search(\"xml\") 
>= 0))\n"\
-           "   
print_result(genType,ws,tunique(iter),constant2bat(iter),item.materialize(ipik),constant2bat(kind),int_values,dbl_values,str_values);\n"\
+           "   
print_result(genType,moduleNS,method,ws,tunique(iter),constant2bat(iter),item.materialize(ipik),constant2bat(kind),int_values,dbl_values,str_values);\n"\
            PF_STOPMIL_END("Print ")
 #define PF_STOPMIL_UPDATE PF_STOPMIL_START\
            "  play_update_tape(ws, item.materialize(ipik), 
kind.materialize(ipik), int_values, str_values);\n" PF_STOPMIL_END("Update")


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to