File tree Expand file tree Collapse file tree
main/java/org/basex/query/func
test/java/org/basex/query/ast Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ FItem evalFunc(final QueryContext qc) throws QueryException {
145145 public boolean has (final Flag ... flags ) {
146146 if (Flag .UPD .oneOf (flags ) && (updating || sc ().mixUpdates )) return true ;
147147 if (Flag .NDT .oneOf (flags ) && (ndt || updating || sc ().mixUpdates )) return true ;
148- final Flag [] flgs = Flag .remove (flags , Flag .NDT , Flag . UPD );
148+ final Flag [] flgs = Flag .remove (flags , Flag .UPD );
149149 return flgs .length != 0 && super .has (flgs );
150150 }
151151
Original file line number Diff line number Diff line change @@ -3370,4 +3370,10 @@ private static String gh1852(final String query) {
33703370 @ Test public void gh2390 () {
33713371 query ("<p><b/></p>/*[.[self::a union self::b/@x]]" , "" );
33723372 }
3373+
3374+ /** Repeated evaluation of nondeterministic code. */
3375+ @ Test public void gh2395 () {
3376+ query ("count(distinct-values((1 to 5) ! prof:track((1 to 1000000)[. = 0])?time)) > 1" ,
3377+ true );
3378+ }
33733379}
You can’t perform that action at this time.
0 commit comments