On Fri, 22 Feb 2013, Hannes Magnusson wrote:

> > +--FILE--
> > +<?php
> > +require_once dirname(__FILE__) . "/../utils.inc";
> > +$c = new_mongo();
> > +$db = $c->selectDb(dbname());
> > +
> > +$func = 
> > +    "function(greeting, name) { ".
> > +        "return greeting+', '+name+', says '+greeter;".
> > +    "}";
> > +$scope = array("greeter" => "Fred");
> > +
> > +$code = new MongoCode($func, $scope);
> > +
> > +$response = $db->execute($code, array("Goodbye", "Joe"), array('nolock' => false));
> > +var_dump($response);
> 
> Since the code was doing more then trivial hello world I was expecting 
> that the nolock option had a purpose in the test.

> IIRC mongod didn't used to support this until recently, have you 
> checked what happens if you pass this option to a earlier version of 
> mongod?

The test passes with 1.8.5, so if it doesn't have any effect it gets 
ignored (which is what I expected anyway).

> I don't think its a good idea to improve the eval interface with more 
> features :]

Maybe, but this solves locking issues for people that use eval.