Update of /cvsroot/monetdb/pathfinder/tests/BugTracker/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23242

Added Files:
      Tag: XQuery_0-24
        join-query_compilation_error.SF-1889694.bat 
        join-query_compilation_error.SF-1889694.sh 
        join-query_compilation_error.SF-1889694.stable.err 
        join-query_compilation_error.SF-1889694.stable.out 
        join-query_compilation_error.SF-1889694.xq 
Log Message:

added compilation test for
[ 1889694 ] [PF] attribute `iter1' referenced in join not found
https://sourceforge.net/tracker/index.php?func=detail&aid=1889694&group_id=56967&atid=482468

seems to work fine both with ALG & MPS


--- NEW FILE: join-query_compilation_error.SF-1889694.stable.out ---
stdout of test 'join-query_compilation_error.SF-1889694` in directory 
'tests/BugTracker` itself:


# 17:50:04 >  
# 17:50:04 >  ./join-query_compilation_error.SF-1889694.sh 
join-query_compilation_error.SF-1889694 
# 17:50:04 >  

"pf -M join-query_compilation_error.SF-1889694.xq >/dev/null"
"pf -A join-query_compilation_error.SF-1889694.xq >/dev/null"

# 17:50:04 >  
# 17:50:04 >  Done.
# 17:50:04 >  


--- NEW FILE: join-query_compilation_error.SF-1889694.sh ---
#!/usr/bin/env bash

q=join-query_compilation_error.SF-1889694.xq
p='pf -M'
echo "\"$p $q >/dev/null\""
echo "\"$p $q >/dev/null\"" >&2
$p $q >/dev/null
p='pf -A'
echo "\"$p $q >/dev/null\""
echo "\"$p $q >/dev/null\"" >&2
$p $q >/dev/null

--- NEW FILE: join-query_compilation_error.SF-1889694.stable.err ---
stderr of test 'join-query_compilation_error.SF-1889694` in directory 
'tests/BugTracker` itself:


# 17:50:04 >  
# 17:50:04 >  ./join-query_compilation_error.SF-1889694.sh 
join-query_compilation_error.SF-1889694 
# 17:50:04 >  

"pf -M join-query_compilation_error.SF-1889694.xq >/dev/null"
"pf -A join-query_compilation_error.SF-1889694.xq >/dev/null"

# 17:50:04 >  
# 17:50:04 >  Done.
# 17:50:04 >  


--- NEW FILE: join-query_compilation_error.SF-1889694.xq ---
declare function getCVSSfield($vec as xs:string?, $field as xs:string)
   as xs:string*
{
   let $f := concat($field,":")
   let $slen := string-length($vec)
   let $flen := string-length($f)
   for $i in (1 to $slen)
   return
      if (substring($vec,$i,$flen) eq $f)
      then substring($vec,$i+$flen,1)
      else ()
};

<result>{
(:
let $col := collection("nvdcve")
:)
let $col := for $y in (2002 to 2007) return 
doc(concat(concat("nvdcve-",$y),".xml"))
let $allentries := $col//*:entry
let $rejected := $allentries[./*:desc/*:descript[contains(.,"** REJECT **")]]
let $entries := $allentries except $rejected
let $fieldnames := ("A","AC","AV","Au","C","I")
for $field in $fieldnames
let $vals := 
   for $e in $entries
   let $vec := string($e/@CVSS_vector)
   let $val := getCVSSfield($vec,$field)
   return $val
let $aantvals := count($vals)
return
   <field field="{$field}">{
      for $v in distinct-values($vals)
      let $cnt := count($vals[. eq $v])
      let $perc := round(1000*($cnt div $aantvals)) div 10
      return
         <access ac_val="{$v}" ac_count="{$cnt}" perc="{$perc}"/>
   }</field>
}</result>

--- NEW FILE: join-query_compilation_error.SF-1889694.bat ---
@echo off

set q=join-query_compilation_error.SF-1889694.xq
set p=pf -M
@echo "%p% %q% >/dev/null"
@echo "%p% %q% >/dev/null" >&2
@%p% %q% > nul
set p=pf -A
@echo "%p% %q% >/dev/null"
@echo "%p% %q% >/dev/null" >&2
@%p% %q% > nul


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to