diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-09-11 13:23:30 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-09-11 13:23:30 -0400 |
commit | 6d48c898513988d4e69fef26c00fce76f8cb9f8b (patch) | |
tree | ec3164e6556a88f0d9abb8d1804f8bcb7474ec69 /s | |
parent | fdc8d61ba3fe3afabb086078ea405196d1b0a1c8 (diff) | |
download | mongo-6d48c898513988d4e69fef26c00fce76f8cb9f8b.tar.gz |
cleaning old $eval handling that is smarter now
Diffstat (limited to 's')
-rw-r--r-- | s/request.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/s/request.cpp b/s/request.cpp index 83a42b3f990..0b75b9aa3bb 100644 --- a/s/request.cpp +++ b/s/request.cpp @@ -74,29 +74,6 @@ namespace mongo { Strategy * s = SINGLE; _d.markSet(); - if ( getConfig()->isShardingEnabled() && op == dbQuery ){ - // there are a few things we need to check here - // 1. db.eval - // TODO: right now i'm just going to block all - // will need to make it look at function later - // 2. $where - can't access DB - // TODO: make it smarter - //cerr << "E1.b" << endl; - QueryMessage q( _d ); - BSONObj query = q.query; - - if ( q.ntoreturn == 1 && - strstr( q.ns , ".$cmd" ) && - strcmp( "$eval" , query.firstElement().fieldName() ) == 0 ){ - log() << "trying to eval: " << q.query << endl; - throw UserException( "eval not supported on partitioned databases yet" ); - } - - if ( query.hasField( "$where" ) ) - throw UserException( "$where not supported for partitioned databases yet" ); - - _d.markReset(); - } if ( _chunkManager ){ s = SHARDED; |