diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-02-19 12:45:53 -0500 |
---|---|---|
committer | Matt Kangas <matt.kangas@mongodb.com> | 2014-03-03 22:54:10 -0500 |
commit | 3660343e0b4627d2fee4afb89b74d32644d16d18 (patch) | |
tree | ffa571e0b73ce56d73c2ae23f458f0db772ef782 /jstests/or9.js | |
parent | 9fae141a1f3fe652fa6002e47722c5ceb051cffb (diff) | |
download | mongo-3660343e0b4627d2fee4afb89b74d32644d16d18.tar.gz |
SERVER-12127 migrate js tests to jscore suite when not related to writes
Migrate js tests starting from j-z.
Include SERVER-12920 Update use_power_of_2.js
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Diffstat (limited to 'jstests/or9.js')
-rw-r--r-- | jstests/or9.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/jstests/or9.js b/jstests/or9.js deleted file mode 100644 index 7318a532af4..00000000000 --- a/jstests/or9.js +++ /dev/null @@ -1,64 +0,0 @@ -// index skipping and previous index range negation - -t = db.jstests_or9; -t.drop(); - -t.ensureIndex( {a:1,b:1} ); - -t.save( {a:2,b:2} ); - -function check( a, b, q ) { - count = a; - clauses = b; - query = q; - assert.eq.automsg( "count", "t.count( query )" ); - if ( clauses == 1 ) { - assert.eq.automsg( "undefined", "t.find( query ).explain().clauses" ); - } else { - assert.eq.automsg( "clauses", "t.find( query ).hint({a:1, b:1}).explain().clauses.length" ); - } -} - -// SERVER-12594: there are two clauses in this case, because we do -// not yet collapse OR of ANDs to a single ixscan. -check( 1, 2, { $or: [ { a: { $gte:1,$lte:3 } }, { a: 2 } ] } ); - -check( 1, 2, { $or: [ { a: { $gt:2,$lte:3 } }, { a: 2 } ] } ); - -check( 1, 1, { $or: [ { b: { $gte:1,$lte:3 } }, { b: 2 } ] } ); -check( 1, 1, { $or: [ { b: { $gte:2,$lte:3 } }, { b: 2 } ] } ); -check( 1, 1, { $or: [ { b: { $gt:2,$lte:3 } }, { b: 2 } ] } ); - -// SERVER-12594: there are two clauses in this case, because we do -// not yet collapse OR of ANDs to a single ixscan. -check( 1, 2, { $or: [ { a: { $gte:1,$lte:3 } }, { a: 2, b: 2 } ] } ); - -check( 1, 2, { $or: [ { a: { $gte:1,$lte:3 }, b:3 }, { a: 2 } ] } ); - -check( 1, 1, { $or: [ { b: { $gte:1,$lte:3 } }, { b: 2, a: 2 } ] } ); - -check( 1, 1, { $or: [ { b: { $gte:1,$lte:3 }, a:3 }, { b: 2 } ] } ); - -check( 1, 2, { $or: [ { a: { $gte:1,$lte:3 }, b: 3 }, { a: 2, b: 2 } ] } ); -check( 1, 2, { $or: [ { a: { $gte:2,$lte:3 }, b: 3 }, { a: 2, b: 2 } ] } ); -// SERVER-12594: there are two clauses in this case, because we do -// not yet collapse OR of ANDs to a single ixscan. -check( 1, 2, { $or: [ { a: { $gte:1,$lte:3 }, b: 2 }, { a: 2, b: 2 } ] } ); - -check( 1, 2, { $or: [ { b: { $gte:1,$lte:3 }, a: 3 }, { a: 2, b: 2 } ] } ); -check( 1, 2, { $or: [ { b: { $gte:2,$lte:3 }, a: 3 }, { a: 2, b: 2 } ] } ); -// SERVER-12594: there are two clauses in this case, because we do -// not yet collapse OR of ANDs to a single ixscan. -check( 1, 2, { $or: [ { b: { $gte:1,$lte:3 }, a: 2 }, { a: 2, b: 2 } ] } ); - -t.remove({}); - -t.save( {a:1,b:5} ); -t.save( {a:5,b:1} ); - -// SERVER-12594: there are two clauses in the case below, because we do -// not yet collapse OR of ANDs to a single ixscan. -check( 2, 2, { $or: [ { a: { $in:[1,5] }, b: { $in:[1,5] } }, { a: { $in:[1,5] }, b: { $in:[1,5] } } ] } ); - -check( 2, 2, { $or: [ { a: { $in:[1] }, b: { $in:[1,5] } }, { a: { $in:[1,5] }, b: { $in:[1,5] } } ] } ); -check( 2, 2, { $or: [ { a: { $in:[1] }, b: { $in:[1] } }, { a: { $in:[1,5] }, b: { $in:[1,5] } } ] } ); |