<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>8247</bug_id>
          
          <creation_ts>2009-11-09 12:00:53 +0000</creation_ts>
          <short_desc>[XQTS] A number of tests should use stable order by.</short_desc>
          <delta_ts>2010-03-15 11:55:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Oliver Hallam">oliver</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29470</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2009-11-09 12:00:53 +0000</bug_when>
    <thetext>K2-OrderbyExprWithout-22 contains the following query:

for $i in (1, 3, 2)
let $c := 3
order by ()
return $i

The expected results are &quot;1 3 2&quot; or &quot;1 2 3&quot;, however any permutation should be acceptable.

Indeed in our implementation, when running with optimizations switched off we perform a quicksort on the input tuples and happen to return the result &quot;2 3 1&quot;.

It is probably easiest to modify this test with a &quot;stable order by&quot;, rather than adding the other 4 permutations.


There are several tests that happen to return the wrong result in our implementation (with optimization disabled) for this reason:

K2-OrderbyExprWithout-22
K2-OrderbyExprWithout-37
K2-OrderbyExprWithout-38</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33567</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2010-03-15 09:22:24 +0000</bug_when>
    <thetext>Fix attempted in CVS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33581</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2010-03-15 11:55:23 +0000</bug_when>
    <thetext>This fix seems to have done the trick, so I am marking the bug CLOSED.  Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>