├── etc ├── asan.blacklist ├── tsan.blacklist ├── tsan.suppressions ├── ubsan.blacklist └── lsan.suppressions ├── debian ├── compat ├── dirs ├── files ├── mongodb-org-server.docs ├── mongodb-org-unstable-server.docs ├── mongodb-enterprise-server.docs ├── mongodb-enterprise-unstable-server.docs └── watch ├── jstests ├── dur │ ├── data │ │ └── empty.bson │ └── indexbg.js ├── libs │ ├── key2 │ ├── key1 │ ├── config_files │ │ ├── disable_auth.ini │ │ ├── disable_dur.ini │ │ ├── disable_ipv6.ini │ │ ├── disable_journal.ini │ │ ├── disable_jsonp.ini │ │ ├── disable_noauth.ini │ │ ├── disable_nodur.ini │ │ ├── implicitly_enable_dur.ini │ │ ├── disable_nojournal.ini │ │ ├── disable_objcheck.ini │ │ ├── implicitly_enable_journal.ini │ │ ├── implicitly_enable_nodur.ini │ │ ├── disable_moveparanoia.ini │ │ ├── disable_noautosplit.ini │ │ ├── disable_noobjcheck.ini │ │ ├── disable_noprealloc.ini │ │ ├── disable_noscripting.ini │ │ ├── disable_nounixsocket.ini │ │ ├── implicitly_enable_nojournal.ini │ │ ├── disable_httpinterface.ini │ │ ├── disable_nomoveparanoia.ini │ │ ├── disable_nohttpinterface.ini │ │ ├── disable_noindexbuildretry.ini │ │ ├── set_verbosity.json │ │ ├── enable_autosplit.json │ │ ├── enable_objcheck.json │ │ ├── enable_auth.json │ │ ├── set_profiling.json │ │ ├── enable_paranoia.json │ │ ├── enable_scripting.json │ │ ├── set_shardingrole.json │ │ ├── enable_indexbuildretry.json │ │ ├── set_replsetname.json │ │ ├── disable_jsonp.json │ │ ├── enable_httpinterface.json │ │ ├── enable_journal.json │ │ ├── enable_prealloc.json │ │ ├── enable_unixsocket.json │ │ ├── disable_rest_interface.json │ │ └── set_component_verbosity.json │ ├── mockuser.keytab │ ├── mockservice.keytab │ ├── authTestsKey │ ├── dur_checksum_good.journal │ ├── testconfig │ ├── dur_checksum_bad_first.journal │ ├── dur_checksum_bad_last.journal │ └── mockkrb5.conf ├── tool │ ├── data │ │ ├── a.tsv │ │ ├── dumprestore6 │ │ │ ├── foo.bson │ │ │ └── system.indexes.bson │ │ └── csvimport1.csv │ └── dumpfilename1.js ├── sharding │ ├── sharding_with_keyfile.key │ ├── addshard3.js │ └── sync3.js ├── core │ ├── basicb.js │ ├── js7.js │ ├── eval7.js │ ├── basic5.js │ ├── basic6.js │ ├── objid2.js │ ├── update_invalid1.js │ ├── cleanup_orphaned.js │ ├── error5.js │ ├── objid3.js │ ├── find_and_modify_server6226.js │ ├── fm2.js │ ├── basic8.js │ ├── evale.js │ ├── find_and_modify_server6659.js │ ├── set1.js │ ├── find7.js │ ├── indexd.js │ ├── insert_long_index_key.js │ ├── auth2.js │ ├── sub1.js │ ├── array3.js │ ├── basic7.js │ ├── find_and_modify_server6993.js │ ├── find3.js │ ├── updateb.js │ ├── evala.js │ ├── index6.js │ ├── insert_id_undefined.js │ ├── regex_options.js │ ├── remove4.js │ ├── eval6.js │ ├── geo_s2nopoints.js │ ├── dbref1.js │ ├── capped1.js │ ├── find_and_modify_where.js │ ├── fm1.js │ ├── in6.js │ ├── distinct2.js │ ├── find_and_modify_server6254.js │ ├── ne1.js │ ├── index3.js │ ├── server7756.js │ ├── update_addToSet2.js │ ├── update_blank1.js │ ├── geo8.js │ ├── update_multi6.js │ ├── where2.js │ ├── autoid.js │ ├── js5.js │ ├── fts_enabled.js │ ├── hint1.js │ ├── ore.js │ ├── basic4.js │ ├── eval0.js │ ├── indexf.js │ ├── update8.js │ ├── regexb.js │ ├── remove_justone.js │ ├── string_with_nul_bytes.js │ ├── filemd5.js │ ├── geo_near_random1.js │ ├── updatej.js │ ├── array1.js │ ├── group_empty.js │ ├── js1.js │ ├── geoa.js │ ├── indexg.js │ ├── pull_remove1.js │ ├── explain_large_bounds.js │ ├── ref2.js │ ├── update_multi5.js │ ├── null_field_name.js │ ├── repair_server12955.js │ ├── basic2.js │ ├── set3.js │ ├── eval8.js │ ├── temp_cleanup.js │ ├── evalg.js │ ├── date1.js │ ├── find2.js │ ├── find_and_modify_server7660.js │ ├── where3.js │ ├── array_match3.js │ ├── date2.js │ ├── rename2.js │ ├── db.js │ ├── remove3.js │ ├── bad_index_plugin.js │ ├── count4.js │ ├── error2.js │ ├── geo_s2selfintersectingpoly.js │ ├── objid1.js │ ├── objid7.js │ ├── test_command_line_test_helpers.js │ ├── eval_nolock.js │ ├── fts_partition_no_multikey.js │ ├── set4.js │ ├── update_arraymatch6.js │ ├── eval1.js │ ├── set5.js │ ├── regex9.js │ ├── updatec.js │ ├── capped.js │ ├── objid4.js │ ├── remove8.js │ ├── push2.js │ ├── geo_invalid_2d_params.js │ ├── ork.js │ ├── update_multi4.js │ ├── ne2.js │ ├── pop_server_13516.js │ ├── regex_not_id.js │ ├── eval4.js │ ├── update_arraymatch1.js │ ├── sortj.js │ ├── type2.js │ ├── cursor1.js │ ├── update2.js │ ├── org.js │ ├── update_arraymatch3.js │ ├── arrayfind3.js │ ├── capped_empty.js │ ├── in8.js │ ├── inc3.js │ ├── index_create_with_nul_in_name.js │ ├── regexa.js │ ├── update_arraymatch4.js │ ├── geo_box2.js │ ├── geo_poly_line.js │ ├── geof.js │ ├── index7.js │ ├── server9385.js │ ├── countb.js │ ├── geod.js │ ├── server14747.js │ ├── geo_withinquery.js │ ├── ne3.js │ ├── objid6.js │ ├── server14753.js │ ├── basic1.js │ ├── find_and_modify_server6582.js │ ├── geo7.js │ ├── geo_2d_with_geojson_point.js │ ├── orh.js │ ├── geo_regex0.js │ ├── set2.js │ ├── update9.js │ └── batch_write_command_wc.js ├── gle │ └── core │ │ └── error3.js ├── aggregation │ ├── bugs │ │ ├── server6198.js │ │ ├── server6530.js │ │ ├── server15810.js │ │ ├── server6335.js │ │ ├── server6194.js │ │ ├── server7900.js │ │ ├── server6181.js │ │ ├── server9289.js │ │ ├── server10530.js │ │ ├── server5973.js │ │ ├── server6185.js │ │ ├── server4738.js │ │ ├── server6275.js │ │ ├── server6468.js │ │ └── server6232.js │ ├── extras │ │ └── debug.html │ ├── disabled │ │ └── server5369.js │ └── unwind.js ├── perf │ └── geo_near1.js ├── mmap_v1 │ ├── extent.js │ ├── capped_server7543.js │ ├── touch1.js │ ├── capped_server13912.js │ ├── list_indexes2.js │ └── repair_cursor1.js ├── noPassthroughWithMongod │ ├── geo_near_random1.js │ ├── remove9.js │ └── newcollection2.js ├── noPassthrough │ └── devnull.js ├── repl │ ├── repair.js │ └── block1.js ├── disk │ └── diskfull.js └── concurrency │ └── fsm_workloads │ ├── update_simple_capped.js │ ├── indexed_insert_base_capped.js │ └── update_simple_eval_nolock.js ├── version.txt ├── src ├── third_party │ ├── wiredtiger │ │ ├── .gitignore │ │ ├── build_posix │ │ │ ├── aclocal │ │ │ │ ├── version.m4 │ │ │ │ └── version-set.m4 │ │ │ └── wiredtiger.pc.in │ │ ├── autogen.sh │ │ ├── bench │ │ │ └── wtperf │ │ │ │ ├── smoke.sh │ │ │ │ ├── README │ │ │ │ ├── runners │ │ │ │ ├── evict-btree.wtperf │ │ │ │ ├── medium-btree.wtperf │ │ │ │ ├── small-btree.wtperf │ │ │ │ ├── small-lsm.wtperf │ │ │ │ ├── update-btree.wtperf │ │ │ │ ├── insert-rmw.wtperf │ │ │ │ ├── log-append.wtperf │ │ │ │ ├── medium-lsm.wtperf │ │ │ │ ├── evict-lsm.wtperf │ │ │ │ ├── parallel-pop-stress.wtperf │ │ │ │ ├── parallel-pop-btree.wtperf │ │ │ │ ├── medium-lsm-compact.wtperf │ │ │ │ ├── update-lsm.wtperf │ │ │ │ ├── parallel-pop-lsm.wtperf │ │ │ │ ├── medium-lsm-async.wtperf │ │ │ │ ├── log.wtperf │ │ │ │ ├── medium-multi-lsm.wtperf │ │ │ │ ├── update-large-lsm.wtperf │ │ │ │ ├── log-nockpt.wtperf │ │ │ │ ├── long-txn-btree.wtperf │ │ │ │ ├── medium-multi-lsm-noprefix.wtperf │ │ │ │ ├── log-noprealloc.wtperf │ │ │ │ └── long-txn-lsm.wtperf │ │ │ │ └── Makefile.am │ │ ├── lang │ │ │ └── python │ │ │ │ └── run-ex_access │ │ ├── dist │ │ │ ├── s_release.list │ │ │ ├── extlist │ │ │ ├── s_getopt │ │ │ └── s_longlines │ │ ├── ext │ │ │ └── compressors │ │ │ │ ├── bzip2 │ │ │ │ └── Makefile.am │ │ │ │ ├── lz4 │ │ │ │ └── Makefile.am │ │ │ │ ├── zlib │ │ │ │ └── Makefile.am │ │ │ │ ├── snappy │ │ │ │ └── Makefile.am │ │ │ │ └── nop │ │ │ │ └── Makefile.am │ │ ├── src │ │ │ ├── os_posix │ │ │ │ └── os_yield.c │ │ │ ├── os_win │ │ │ │ ├── os_yield.c │ │ │ │ └── os_priv.c │ │ │ └── include │ │ │ │ ├── compact.h │ │ │ │ └── dlh.h │ │ └── RELEASE_INFO │ ├── v8 │ │ ├── tools │ │ │ ├── android-build.sh │ │ │ ├── mac-tick-processor │ │ │ └── freebsd-tick-processor │ │ └── ChangeLog_10gen │ ├── pcre-8.30 │ │ ├── stamp-h1 │ │ ├── ChangeLog │ │ ├── COPYING │ │ ├── libpcrecpp.pc │ │ ├── libpcrecpp.pc.in │ │ ├── libpcre.pc │ │ ├── libpcre16.pc │ │ ├── libpcreposix.pc │ │ ├── libpcre.pc.in │ │ ├── libpcre16.pc.in │ │ ├── libpcreposix.pc.in │ │ └── makevp_c.txt │ ├── snappy-1.1.2 │ │ ├── AUTHORS │ │ ├── testdata │ │ │ ├── baddata1.snappy │ │ │ ├── baddata2.snappy │ │ │ ├── baddata3.snappy │ │ │ ├── fireworks.jpeg │ │ │ ├── geo.protodata │ │ │ └── paper-100k.pdf │ │ ├── autogen.sh │ │ └── SConscript │ ├── v8-3.25 │ │ ├── src │ │ │ ├── arm │ │ │ │ └── OWNERS │ │ │ ├── arm64 │ │ │ │ └── OWNERS │ │ │ ├── mips │ │ │ │ └── OWNERS │ │ │ └── OWNERS │ │ ├── .clang-format │ │ └── OWNERS │ ├── tz │ │ └── SConscript │ ├── murmurhash3 │ │ └── SConscript │ ├── pcre-8.36 │ │ ├── ChangeLog │ │ ├── COPYING │ │ ├── NON-UNIX-USE │ │ ├── libpcrecpp.pc.in │ │ ├── libpcre.pc.in │ │ ├── libpcre16.pc.in │ │ ├── libpcre32.pc.in │ │ ├── libpcreposix.pc.in │ │ └── makevp_c.txt │ ├── yaml-cpp-0.5.1 │ │ └── src │ │ │ ├── null.cpp │ │ │ ├── node.cpp │ │ │ └── graphbuilder.cpp │ ├── gperftools-2.2 │ │ └── src │ │ │ ├── windows │ │ │ ├── ia32_modrm_map.cc │ │ │ ├── ia32_opcode_map.cc │ │ │ └── mini_disassembler.h │ │ │ └── config.h │ ├── boost-1.56.0 │ │ └── boost │ │ │ ├── format │ │ │ └── alt_sstream_impl.hpp │ │ │ ├── smart_ptr │ │ │ ├── detail │ │ │ │ └── atomic_count_gcc.hpp │ │ │ └── make_unique.hpp │ │ │ ├── functional │ │ │ ├── hash.hpp │ │ │ └── hash_fwd.hpp │ │ │ ├── concept │ │ │ └── detail │ │ │ │ └── concept_undef.hpp │ │ │ ├── pending │ │ │ └── integer_log2.hpp │ │ │ ├── config │ │ │ └── abi │ │ │ │ ├── msvc_suffix.hpp │ │ │ │ └── borland_suffix.hpp │ │ │ ├── predef │ │ │ ├── detail │ │ │ │ ├── os_detected.h │ │ │ │ ├── comp_detected.h │ │ │ │ ├── platform_detected.h │ │ │ │ ├── _exception.h │ │ │ │ ├── _cassert.h │ │ │ │ └── test.h │ │ │ ├── library │ │ │ │ └── c │ │ │ │ │ └── _prefix.h │ │ │ ├── other.h │ │ │ ├── library.h │ │ │ └── language.h │ │ │ ├── thread │ │ │ ├── detail │ │ │ │ └── variadic_footer.hpp │ │ │ ├── thread.hpp │ │ │ └── csbl │ │ │ │ └── memory │ │ │ │ └── config.hpp │ │ │ ├── typeof │ │ │ └── message.hpp │ │ │ ├── mpl │ │ │ └── aux_ │ │ │ │ └── preprocessed │ │ │ │ ├── no_ttp │ │ │ │ └── quote.hpp │ │ │ │ └── plain │ │ │ │ └── template_arity.hpp │ │ │ ├── detail │ │ │ └── endian.hpp │ │ │ ├── exception_ptr.hpp │ │ │ ├── exception │ │ │ └── error_info.hpp │ │ │ ├── ref.hpp │ │ │ ├── swap.hpp │ │ │ ├── utility │ │ │ ├── swap.hpp │ │ │ ├── addressof.hpp │ │ │ └── enable_if.hpp │ │ │ ├── accumulators │ │ │ └── numeric │ │ │ │ └── detail │ │ │ │ └── function2.hpp │ │ │ ├── asio │ │ │ └── unyield.hpp │ │ │ ├── atomic.hpp │ │ │ ├── noncopyable.hpp │ │ │ ├── function │ │ │ ├── function0.hpp │ │ │ ├── function1.hpp │ │ │ ├── function2.hpp │ │ │ ├── function3.hpp │ │ │ ├── function4.hpp │ │ │ ├── function5.hpp │ │ │ ├── function6.hpp │ │ │ ├── function7.hpp │ │ │ ├── function8.hpp │ │ │ ├── function9.hpp │ │ │ └── function10.hpp │ │ │ ├── checked_delete.hpp │ │ │ └── coroutine │ │ │ ├── protected_stack_allocator.hpp │ │ │ └── coroutine.hpp │ ├── shim_tz.cpp │ ├── shim_v8.cpp │ ├── shim_yaml.cpp │ ├── shim_zlib.cpp │ ├── shim_boost.cpp │ ├── shim_snappy.cpp │ ├── shim_pcrecpp.cc │ ├── shim_allocator.cpp │ ├── shim_stemmer.cpp │ ├── shim_wiredtiger.cpp │ ├── s2 │ │ ├── s2region.cc │ │ ├── strings │ │ │ └── SConscript │ │ ├── base │ │ │ ├── SConscript │ │ │ └── definer.h │ │ └── util │ │ │ ├── coding │ │ │ └── SConscript │ │ │ └── math │ │ │ └── SConscript │ ├── libstemmer_c │ │ ├── Makefile │ │ └── src_c │ │ │ ├── stem_UTF_8_dutch.h │ │ │ ├── stem_UTF_8_danish.h │ │ │ ├── stem_UTF_8_french.h │ │ │ ├── stem_UTF_8_german.h │ │ │ ├── stem_UTF_8_porter.h │ │ │ ├── stem_KOI8_R_russian.h │ │ │ ├── stem_UTF_8_english.h │ │ │ ├── stem_UTF_8_finnish.h │ │ │ ├── stem_UTF_8_italian.h │ │ │ ├── stem_UTF_8_romanian.h │ │ │ ├── stem_UTF_8_russian.h │ │ │ ├── stem_UTF_8_spanish.h │ │ │ ├── stem_UTF_8_swedish.h │ │ │ ├── stem_UTF_8_turkish.h │ │ │ ├── stem_UTF_8_hungarian.h │ │ │ ├── stem_UTF_8_norwegian.h │ │ │ ├── stem_ISO_8859_1_dutch.h │ │ │ ├── stem_UTF_8_portuguese.h │ │ │ ├── stem_ISO_8859_1_danish.h │ │ │ ├── stem_ISO_8859_1_french.h │ │ │ ├── stem_ISO_8859_1_german.h │ │ │ ├── stem_ISO_8859_1_porter.h │ │ │ ├── stem_ISO_8859_1_english.h │ │ │ ├── stem_ISO_8859_1_finnish.h │ │ │ ├── stem_ISO_8859_1_italian.h │ │ │ ├── stem_ISO_8859_1_spanish.h │ │ │ ├── stem_ISO_8859_1_swedish.h │ │ │ ├── stem_ISO_8859_2_romanian.h │ │ │ ├── stem_ISO_8859_1_hungarian.h │ │ │ ├── stem_ISO_8859_1_norwegian.h │ │ │ └── stem_ISO_8859_1_portuguese.h │ └── zlib-1.2.8 │ │ └── inffast.h ├── mongo │ ├── util │ │ ├── options_parser │ │ │ └── test_config_files │ │ │ │ ├── empty.json │ │ │ │ ├── good.conf │ │ │ │ └── good.json │ │ ├── mongoutils │ │ │ └── SConscript │ │ ├── cmdline_utils │ │ │ └── SConscript │ │ └── concurrency │ │ │ └── SConscript │ ├── db │ │ ├── mongo.ico │ │ ├── storage │ │ │ ├── tokuft │ │ │ │ └── tokuft_engine_test_shim.cpp │ │ │ └── devnull │ │ │ │ └── SConscript │ │ ├── sorter │ │ │ └── SConscript │ │ ├── catalog │ │ │ └── SConscript │ │ ├── commands │ │ │ └── SConscript │ │ └── db.rc │ ├── shell │ │ └── mongo.ico │ └── bson │ │ └── README └── SConscript ├── rpm ├── mongod.sysconfig └── mongod.service ├── .gitattributes ├── docs ├── index.md └── building.opensolaris.ec2.md ├── mongo_astyle ├── site_scons └── site_tools │ └── jsheader.py └── win2008plus.props /etc/asan.blacklist: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/tsan.blacklist: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /etc/tsan.suppressions: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /jstests/dur/data/empty.bson: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 3.1.1-pre- 2 | -------------------------------------------------------------------------------- /jstests/libs/key2: -------------------------------------------------------------------------------- 1 | other key 2 | -------------------------------------------------------------------------------- /jstests/libs/key1: -------------------------------------------------------------------------------- 1 | foop de doop 2 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/third_party/v8/tools/android-build.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/ubsan.blacklist: -------------------------------------------------------------------------------- 1 | src:src/third_party/* 2 | -------------------------------------------------------------------------------- /debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | var/lib/mongodb 4 | -------------------------------------------------------------------------------- /debian/files: -------------------------------------------------------------------------------- 1 | mongodb_0.9.7_amd64.deb devel optional 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_auth.ini: -------------------------------------------------------------------------------- 1 | auth=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_dur.ini: -------------------------------------------------------------------------------- 1 | dur=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_ipv6.ini: -------------------------------------------------------------------------------- 1 | ipv6=false 2 | -------------------------------------------------------------------------------- /jstests/tool/data/a.tsv: -------------------------------------------------------------------------------- 1 | a b c d e 2 | 1 foobar 5 -6 3 | -------------------------------------------------------------------------------- /src/mongo/util/options_parser/test_config_files/empty.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_journal.ini: -------------------------------------------------------------------------------- 1 | journal=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_jsonp.ini: -------------------------------------------------------------------------------- 1 | jsonp=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_noauth.ini: -------------------------------------------------------------------------------- 1 | noauth=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_nodur.ini: -------------------------------------------------------------------------------- 1 | nodur=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/implicitly_enable_dur.ini: -------------------------------------------------------------------------------- 1 | dur= 2 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config.h 2 | -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/AUTHORS: -------------------------------------------------------------------------------- 1 | opensource@google.com 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_nojournal.ini: -------------------------------------------------------------------------------- 1 | nojournal=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_objcheck.ini: -------------------------------------------------------------------------------- 1 | objcheck=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/implicitly_enable_journal.ini: -------------------------------------------------------------------------------- 1 | journal= 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/implicitly_enable_nodur.ini: -------------------------------------------------------------------------------- 1 | nodur= 2 | -------------------------------------------------------------------------------- /src/mongo/util/options_parser/test_config_files/good.conf: -------------------------------------------------------------------------------- 1 | port=5 2 | -------------------------------------------------------------------------------- /src/third_party/v8-3.25/src/arm/OWNERS: -------------------------------------------------------------------------------- 1 | rmcilroy@chromium.org 2 | -------------------------------------------------------------------------------- /src/third_party/v8-3.25/src/arm64/OWNERS: -------------------------------------------------------------------------------- 1 | rmcilroy@chromium.org 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_moveparanoia.ini: -------------------------------------------------------------------------------- 1 | moveParanoia=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_noautosplit.ini: -------------------------------------------------------------------------------- 1 | noAutoSplit=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_noobjcheck.ini: -------------------------------------------------------------------------------- 1 | noobjcheck=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_noprealloc.ini: -------------------------------------------------------------------------------- 1 | noprealloc=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_noscripting.ini: -------------------------------------------------------------------------------- 1 | noscripting=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_nounixsocket.ini: -------------------------------------------------------------------------------- 1 | nounixsocket=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/implicitly_enable_nojournal.ini: -------------------------------------------------------------------------------- 1 | nojournal= 2 | -------------------------------------------------------------------------------- /jstests/sharding/sharding_with_keyfile.key: -------------------------------------------------------------------------------- 1 | aBcDeFg 2 | 1010101 3 | JJJJJJJ -------------------------------------------------------------------------------- /rpm/mongod.sysconfig: -------------------------------------------------------------------------------- 1 | # TODO: add relevant configuration stuff here. 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_httpinterface.ini: -------------------------------------------------------------------------------- 1 | httpinterface=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_nomoveparanoia.ini: -------------------------------------------------------------------------------- 1 | noMoveParanoia=false 2 | -------------------------------------------------------------------------------- /debian/mongodb-org-server.docs: -------------------------------------------------------------------------------- 1 | GNU-AGPL-3.0 2 | README 3 | THIRD-PARTY-NOTICES 4 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_nohttpinterface.ini: -------------------------------------------------------------------------------- 1 | nohttpinterface=false 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_noindexbuildretry.ini: -------------------------------------------------------------------------------- 1 | noIndexBuildRetry=false 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.vcproj -crlf -diff -merge 2 | *.pbxproj -crlf -diff -merge 3 | 4 | -------------------------------------------------------------------------------- /src/mongo/util/options_parser/test_config_files/good.json: -------------------------------------------------------------------------------- 1 | { 2 | "port" : 5 3 | } 4 | -------------------------------------------------------------------------------- /src/third_party/v8-3.25/src/mips/OWNERS: -------------------------------------------------------------------------------- 1 | plind44@gmail.com 2 | gergely@homejinni.com 3 | -------------------------------------------------------------------------------- /debian/mongodb-org-unstable-server.docs: -------------------------------------------------------------------------------- 1 | GNU-AGPL-3.0 2 | README 3 | THIRD-PARTY-NOTICES 4 | -------------------------------------------------------------------------------- /src/third_party/tz/SConscript: -------------------------------------------------------------------------------- 1 | Import("env") 2 | 3 | env.Library("tz", [ "timegm.c" ]) 4 | -------------------------------------------------------------------------------- /src/mongo/db/mongo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/mongo/db/mongo.ico -------------------------------------------------------------------------------- /src/mongo/shell/mongo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/mongo/shell/mongo.ico -------------------------------------------------------------------------------- /jstests/libs/mockuser.keytab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/libs/mockuser.keytab -------------------------------------------------------------------------------- /src/third_party/murmurhash3/SConscript: -------------------------------------------------------------------------------- 1 | Import("env") 2 | env.Library("murmurhash3", ["MurmurHash3.cpp"]) 3 | -------------------------------------------------------------------------------- /src/third_party/v8-3.25/src/OWNERS: -------------------------------------------------------------------------------- 1 | per-file i18n.*=cira@chromium.org 2 | per-file i18n.*=mnita@google.com 3 | -------------------------------------------------------------------------------- /jstests/libs/config_files/set_verbosity.json: -------------------------------------------------------------------------------- 1 | { 2 | "systemLog" : { 3 | "verbosity" : 5 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/mockservice.keytab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/libs/mockservice.keytab -------------------------------------------------------------------------------- /jstests/libs/authTestsKey: -------------------------------------------------------------------------------- 1 | This key is only for running the suite with authentication dont use it in any tests directly 2 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_autosplit.json: -------------------------------------------------------------------------------- 1 | { 2 | "sharding" : { 3 | "autoSplit" : true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_objcheck.json: -------------------------------------------------------------------------------- 1 | { 2 | "net" : { 3 | "wireObjectCheck" : true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/pcre-8.30/ChangeLog -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/pcre-8.36/ChangeLog -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "security" : { 3 | "authorization" : "enabled" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/config_files/set_profiling.json: -------------------------------------------------------------------------------- 1 | { 2 | "operationProfiling" : { 3 | "mode" : "all" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/dur_checksum_good.journal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/libs/dur_checksum_good.journal -------------------------------------------------------------------------------- /src/mongo/db/storage/tokuft/tokuft_engine_test_shim.cpp: -------------------------------------------------------------------------------- 1 | // intentionally blank, SCons needs a hint to link with c++ libs 2 | -------------------------------------------------------------------------------- /src/third_party/yaml-cpp-0.5.1/src/null.cpp: -------------------------------------------------------------------------------- 1 | #include "yaml-cpp/null.h" 2 | 3 | namespace YAML 4 | { 5 | _Null Null; 6 | } 7 | -------------------------------------------------------------------------------- /jstests/core/basicb.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.basicb; 3 | t.drop(); 4 | 5 | assert.throws( function() { t.insert( { '$a' : 5 } ); }); 6 | 7 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_paranoia.json: -------------------------------------------------------------------------------- 1 | { 2 | "sharding" : { 3 | "archiveMovedChunks" : true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_scripting.json: -------------------------------------------------------------------------------- 1 | { 2 | "security" : { 3 | "javascriptEnabled" : true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/config_files/set_shardingrole.json: -------------------------------------------------------------------------------- 1 | { 2 | "sharding" : { 3 | "clusterRole" : "configsvr" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/testconfig: -------------------------------------------------------------------------------- 1 | #comment line 2 | #commentedflagwithan = false 3 | version = false 4 | help = false 5 | sysinfo = false 6 | -------------------------------------------------------------------------------- /jstests/tool/data/dumprestore6/foo.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/tool/data/dumprestore6/foo.bson -------------------------------------------------------------------------------- /jstests/core/js7.js: -------------------------------------------------------------------------------- 1 | t = db.jstests_js7; 2 | t.drop(); 3 | 4 | assert.eq( 17 , db.eval( function( foo ){ return foo; } , 17 ) ); 5 | 6 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_indexbuildretry.json: -------------------------------------------------------------------------------- 1 | { 2 | "storage" : { 3 | "indexBuildRetry" : true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/config_files/set_replsetname.json: -------------------------------------------------------------------------------- 1 | { 2 | "replication" : { 3 | "replSetName" : "myconfigname" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /jstests/libs/dur_checksum_bad_first.journal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/libs/dur_checksum_bad_first.journal -------------------------------------------------------------------------------- /jstests/libs/dur_checksum_bad_last.journal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/libs/dur_checksum_bad_last.journal -------------------------------------------------------------------------------- /jstests/core/eval7.js: -------------------------------------------------------------------------------- 1 | 2 | assert.eq( 6 , db.eval( "5 + 1" ) , "A" ) 3 | assert.throws( function(z){ db.eval( "5 + function x; + 1" )} ); 4 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/COPYING: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | 3 | Please see the file LICENCE in the PCRE distribution for licensing details. 4 | 5 | End 6 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/COPYING: -------------------------------------------------------------------------------- 1 | PCRE LICENCE 2 | 3 | Please see the file LICENCE in the PCRE distribution for licensing details. 4 | 5 | End 6 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/build_posix/aclocal/version.m4: -------------------------------------------------------------------------------- 1 | dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version 2 | 2.5.3 3 | -------------------------------------------------------------------------------- /jstests/tool/data/dumprestore6/system.indexes.bson: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/jstests/tool/data/dumprestore6/system.indexes.bson -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/testdata/baddata1.snappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/snappy-1.1.2/testdata/baddata1.snappy -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/testdata/baddata2.snappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/snappy-1.1.2/testdata/baddata2.snappy -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/testdata/baddata3.snappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/snappy-1.1.2/testdata/baddata3.snappy -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/testdata/fireworks.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/snappy-1.1.2/testdata/fireworks.jpeg -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/testdata/geo.protodata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/snappy-1.1.2/testdata/geo.protodata -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/testdata/paper-100k.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/snappy-1.1.2/testdata/paper-100k.pdf -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_jsonp.json: -------------------------------------------------------------------------------- 1 | { 2 | "net" : { 3 | "http" : { 4 | "JSONPEnabled" : false 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_httpinterface.json: -------------------------------------------------------------------------------- 1 | { 2 | "net" : { 3 | "http" : { 4 | "enabled" : true 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_journal.json: -------------------------------------------------------------------------------- 1 | { 2 | "storage" : { 3 | "journal" : { 4 | "enabled" : false 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /jstests/core/basic5.js: -------------------------------------------------------------------------------- 1 | t = db.getCollection( "basic5" ); 2 | t.drop(); 3 | 4 | t.save( { a : 1 , b : [ 1 , 2 , 3 ] } ); 5 | assert.eq( 3 , t.findOne().b.length ); 6 | 7 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_prealloc.json: -------------------------------------------------------------------------------- 1 | { 2 | "storage" : { 3 | "mmapv1" : { 4 | "preallocDataFiles" : true 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /jstests/libs/config_files/enable_unixsocket.json: -------------------------------------------------------------------------------- 1 | { 2 | "net" : { 3 | "unixDomainSocket" : { 4 | "enabled" : true 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/third_party/gperftools-2.2/src/windows/ia32_modrm_map.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/gperftools-2.2/src/windows/ia32_modrm_map.cc -------------------------------------------------------------------------------- /src/third_party/wiredtiger/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Helper script with a familiar name to run auto* on a development tree. 4 | sh `dirname $0`/build_posix/reconf 5 | -------------------------------------------------------------------------------- /jstests/libs/config_files/disable_rest_interface.json: -------------------------------------------------------------------------------- 1 | { 2 | "net" : { 3 | "http" : { 4 | "RESTInterfaceEnabled" : false 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/format/alt_sstream_impl.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/boost-1.56.0/boost/format/alt_sstream_impl.hpp -------------------------------------------------------------------------------- /src/third_party/gperftools-2.2/src/windows/ia32_opcode_map.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/gperftools-2.2/src/windows/ia32_opcode_map.cc -------------------------------------------------------------------------------- /src/third_party/gperftools-2.2/src/windows/mini_disassembler.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/gperftools-2.2/src/windows/mini_disassembler.h -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/autogen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh -e 2 | rm -rf autom4te.cache 3 | aclocal -I m4 4 | autoheader 5 | libtoolize --copy 6 | automake --add-missing --copy 7 | autoconf 8 | -------------------------------------------------------------------------------- /jstests/core/basic6.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.basic6; 3 | 4 | t.findOne(); 5 | t.a.findOne(); 6 | 7 | assert.eq( "test.basic6" , t.toString() ); 8 | assert.eq( "test.basic6.a" , t.a.toString() ); 9 | -------------------------------------------------------------------------------- /jstests/core/objid2.js: -------------------------------------------------------------------------------- 1 | t = db.objid2; 2 | t.drop(); 3 | 4 | t.save( { _id : 517 , a : "hello" } ) 5 | 6 | assert.eq( t.findOne().a , "hello" ); 7 | assert.eq( t.findOne()._id , 517 ); 8 | -------------------------------------------------------------------------------- /jstests/core/update_invalid1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_invalid1 3 | t.drop() 4 | 5 | t.update( { _id : 5 } , { $set : { $inc : { x : 5 } } } , true ); 6 | assert.eq( 0 , t.count() , "A1" ); 7 | -------------------------------------------------------------------------------- /src/third_party/shim_tz.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_tz.cpp is part of the third_party/tz library, which is just 2 | // a placeholder for forwarding library dependencies. 3 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/smart_ptr/detail/atomic_count_gcc.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tokutek/tokumxse/HEAD/src/third_party/boost-1.56.0/boost/smart_ptr/detail/atomic_count_gcc.hpp -------------------------------------------------------------------------------- /src/third_party/shim_v8.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_v8.cpp is part of the 2 | // third_party/v8 library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/smoke.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Smoke-test wtperf as part of running "make check". 4 | ./wtperf -O `dirname $0`/runners/small-lsm.wtperf -o "run_time=20" 5 | -------------------------------------------------------------------------------- /src/third_party/shim_yaml.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_yaml.cpp is part of the 2 | // third_party/yaml library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /src/third_party/shim_zlib.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_zlib.cpp is part of the 2 | // third_party/zlib library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/README: -------------------------------------------------------------------------------- 1 | This is a benchmark program for testing the performance of WiredTiger. 2 | 3 | Scripts for running the benchmark can be found in the runners directory. 4 | -------------------------------------------------------------------------------- /jstests/core/cleanup_orphaned.js: -------------------------------------------------------------------------------- 1 | // Test that cleanupOrphaned cannot be run on stand alone mongod. 2 | var res = db.adminCommand({ cleanupOrphaned: 'unsharded.coll' }); 3 | assert(!res.ok, tojson(res)); 4 | -------------------------------------------------------------------------------- /jstests/gle/core/error3.js: -------------------------------------------------------------------------------- 1 | 2 | db.runCommand( "forceerror" ); 3 | assert.eq( "forced error" , db.getLastError() ); 4 | db.runCommand( "switchtoclienterrors" ); 5 | assert.isnull( db.getLastError() ); 6 | -------------------------------------------------------------------------------- /src/third_party/shim_boost.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_boost.cpp is part of the 2 | // third_party/boost library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /src/third_party/shim_snappy.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_snappy.cpp is part of the 2 | // third_party/snappy library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /src/third_party/shim_pcrecpp.cc: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_pcrecpp.cc is part of the 2 | // third_party/pcrecpp library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /jstests/core/error5.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.error5 3 | t.drop(); 4 | 5 | assert.throws( function(){ t.save( 4 ); printjson( t.findOne() ) } , null , "A" ); 6 | t.save( { a : 1 } ) 7 | assert.eq( 1 , t.count() , "B" ); 8 | 9 | -------------------------------------------------------------------------------- /src/third_party/shim_allocator.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_allocator.cpp is part of the third_party/shim_allocator 2 | // library, used to manage memory allocator selection (tcmalloc, libc, etc.). 3 | -------------------------------------------------------------------------------- /src/third_party/shim_stemmer.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_stemmer.cpp is part of the 2 | // third_party/libstemmer_c library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /src/third_party/v8-3.25/.clang-format: -------------------------------------------------------------------------------- 1 | # Defines the Google C++ style for automatic reformatting. 2 | # http://clang.llvm.org/docs/ClangFormatStyleOptions.html 3 | BasedOnStyle: Google 4 | MaxEmptyLinesToKeep: 2 5 | -------------------------------------------------------------------------------- /debian/mongodb-enterprise-server.docs: -------------------------------------------------------------------------------- 1 | snmp/mongod.conf.master 2 | snmp/mongod.conf.subagent 3 | snmp/README-snmp.txt 4 | snmp/MONGOD-MIB.txt 5 | snmp/MONGODBINC-MIB.txt 6 | LICENSE.txt 7 | README 8 | THIRD-PARTY-NOTICES 9 | -------------------------------------------------------------------------------- /src/third_party/shim_wiredtiger.cpp: -------------------------------------------------------------------------------- 1 | // This file intentionally blank. shim_wiredtiger.cpp is part of the 2 | // third_party/wiredtiger library, which is just a placeholder for forwarding 3 | // library dependencies. 4 | -------------------------------------------------------------------------------- /jstests/core/objid3.js: -------------------------------------------------------------------------------- 1 | t = db.objid3; 2 | t.drop(); 3 | 4 | t.save( { a : "bob" , _id : 517 } ); 5 | for ( var k in t.findOne() ){ 6 | assert.eq( k , "_id" , "keys out of order" ); 7 | break; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /src/mongo/util/mongoutils/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env.CppUnitTest('str_test', 6 | 'str_test.cpp', 7 | LIBDEPS=['$BUILD_DIR/mongo/unittest/unittest']) 8 | -------------------------------------------------------------------------------- /debian/mongodb-enterprise-unstable-server.docs: -------------------------------------------------------------------------------- 1 | snmp/mongod.conf.master 2 | snmp/mongod.conf.subagent 3 | snmp/README-snmp.txt 4 | snmp/MONGOD-MIB.txt 5 | snmp/MONGODBINC-MIB.txt 6 | LICENSE.txt 7 | README 8 | THIRD-PARTY-NOTICES 9 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | MongoDB Server Documentation 2 | ============ 3 | 4 | This is just some internal documentation. 5 | 6 | For the full MongoDB docs, please see [mongodb.org](http://www.mongodb.org/) 7 | 8 | * [building](building.md) 9 | -------------------------------------------------------------------------------- /jstests/core/find_and_modify_server6226.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.find_and_modify_server6226; 3 | t.drop(); 4 | 5 | ret = t.findAndModify( { query : { _id : 1 } , update : { "$inc" : { i : 1 } } , upsert : true } ) 6 | assert.isnull( ret ) 7 | 8 | -------------------------------------------------------------------------------- /jstests/core/fm2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.fm2 3 | t.drop(); 4 | 5 | t.insert( { "one" : { "two" : {"three":"four"} } } ); 6 | 7 | x = t.find({},{"one.two":1})[0] 8 | assert.eq( 1 , Object.keySet( x.one ).length , "ks l 1" ); 9 | 10 | -------------------------------------------------------------------------------- /jstests/core/basic8.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.basic8; 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ); 6 | o = t.findOne(); 7 | o.b = 2; 8 | t.save( o ); 9 | 10 | assert.eq( 1 , t.find().count() , "A" ); 11 | assert.eq( 2 , t.findOne().b , "B" ); 12 | -------------------------------------------------------------------------------- /jstests/core/evale.js: -------------------------------------------------------------------------------- 1 | t = db.jstests_evale; 2 | t.drop(); 3 | 4 | db.eval( function() { return db.jstests_evale.count( { $where:function() { return true; } } ) } ); 5 | db.eval( "db.jstests_evale.count( { $where:function() { return true; } } )" ); -------------------------------------------------------------------------------- /jstests/core/find_and_modify_server6659.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.find_and_modify_server6659; 3 | t.drop(); 4 | 5 | x = t.findAndModify({query:{f:1}, update:{$set:{f:2}}, upsert:true, new:true}) 6 | assert.eq( 2, x.f ); 7 | assert.eq( 2, t.findOne().f ); 8 | -------------------------------------------------------------------------------- /jstests/core/set1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.set1; 3 | t.drop(); 4 | 5 | t.insert( { _id : 1, emb : {} }); 6 | t.update( { _id : 1 }, { $set : { emb : { 'a.dot' : 'data'} }}); 7 | assert.eq( { _id : 1 , emb : {} } , t.findOne() , "A" ); 8 | 9 | 10 | -------------------------------------------------------------------------------- /jstests/core/find7.js: -------------------------------------------------------------------------------- 1 | t = db.find7; 2 | t.drop(); 3 | 4 | x = { "_id" : { "d" : 3649, "w" : "signed" }, "u" : { "3649" : 5 } }; 5 | t.insert(x ); 6 | assert.eq( x , t.findOne() , "A1" ); 7 | assert.eq( x , t.findOne( { _id : x._id } ) , "A2" ); 8 | 9 | -------------------------------------------------------------------------------- /jstests/core/indexd.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.indexd; 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ); 6 | t.ensureIndex( { a : 1 } ); 7 | assert.throws( function(){ db.indexd.$_id_.drop(); } ); 8 | assert( t.drop() ); 9 | 10 | //db.indexd.$_id_.remove({}); 11 | -------------------------------------------------------------------------------- /src/mongo/db/sorter/SConscript: -------------------------------------------------------------------------------- 1 | Import("env") 2 | 3 | sorterEnv = env.Clone() 4 | sorterEnv.InjectThirdPartyIncludePaths(libraries=['snappy']) 5 | sorterEnv.CppUnitTest('sorter_test', 'sorter_test.cpp', LIBDEPS=['$BUILD_DIR/third_party/shim_snappy']) 6 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/lang/python/run-ex_access: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf WT_TEST ; mkdir WT_TEST 4 | 5 | exec env LD_LIBRARY_PATH=../../.libs DYLD_LIBRARY_PATH=../../.libs PYTHONPATH=.:${srcdir} python ${srcdir}/../../examples/python/ex_access.py 6 | -------------------------------------------------------------------------------- /jstests/core/insert_long_index_key.js: -------------------------------------------------------------------------------- 1 | t = db.insert_long_index_key; 2 | t.drop(); 3 | 4 | var s = new Array(2000).toString(); 5 | t.ensureIndex( { x : 1 } ); 6 | 7 | t.insert({ x: 1 }); 8 | t.insert({ x: s }); 9 | 10 | assert.eq( 1, t.count() ); 11 | -------------------------------------------------------------------------------- /jstests/sharding/addshard3.js: -------------------------------------------------------------------------------- 1 | 2 | s = new ShardingTest( "add_shard3", 1 ); 3 | 4 | var result = s.admin.runCommand({"addshard" : "localhost:31000"}); 5 | 6 | printjson(result); 7 | 8 | assert.eq(result.ok, 0, "don't add mongos as a shard"); 9 | 10 | -------------------------------------------------------------------------------- /src/mongo/db/storage/devnull/SConscript: -------------------------------------------------------------------------------- 1 | Import("env") 2 | 3 | env.Library( 4 | target='storage_devnull', 5 | source=[ 6 | 'devnull_init.cpp', 7 | 'devnull_kv_engine.cpp', 8 | ], 9 | LIBDEPS=[] 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /src/third_party/v8/tools/mac-tick-processor: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A wrapper script to call 'linux-tick-processor' with Mac-specific settings. 4 | 5 | tools_path=`cd $(dirname "$0");pwd` 6 | $tools_path/linux-tick-processor --mac --nm=$tools_path/mac-nm $@ 7 | -------------------------------------------------------------------------------- /jstests/core/auth2.js: -------------------------------------------------------------------------------- 1 | // just make sure logout doesn't break anything 2 | 3 | // SERVER-724 4 | db.runCommand({logout : 1}); 5 | x = db.runCommand({logout : 1}); 6 | assert.eq( 1 , x.ok , "A" ) 7 | 8 | x = db.logout(); 9 | assert.eq( 1 , x.ok , "B" ) 10 | -------------------------------------------------------------------------------- /jstests/core/sub1.js: -------------------------------------------------------------------------------- 1 | // sub1.js 2 | 3 | t = db.sub1; 4 | t.drop(); 5 | 6 | x = { a : 1 , b : { c : { d : 2 } } } 7 | 8 | t.save( x ); 9 | 10 | y = t.findOne(); 11 | 12 | assert.eq( 1 , y.a ); 13 | assert.eq( 2 , y.b.c.d ); 14 | print( tojson( y ) ); 15 | -------------------------------------------------------------------------------- /src/third_party/gperftools-2.2/src/config.h: -------------------------------------------------------------------------------- 1 | #if defined(__linux__) 2 | #include "config-10gen-linux.h" 3 | #elif defined(__APPLE__) 4 | #include "config-10gen-macos.h" 5 | #else 6 | #error "In tree version of TCMalloc not supported on this platform!" 7 | #endif 8 | -------------------------------------------------------------------------------- /jstests/core/array3.js: -------------------------------------------------------------------------------- 1 | 2 | assert.eq( 5 , Array.sum( [ 1 , 4 ] ), "A" ) 3 | assert.eq( 2.5 , Array.avg( [ 1 , 4 ] ), "B" ) 4 | 5 | arr = [ 2 , 4 , 4 , 4 , 5 , 5 , 7 , 9 ] 6 | assert.eq( 5 , Array.avg( arr ) , "C" ) 7 | assert.eq( 2 , Array.stdDev( arr ) , "D" ) 8 | 9 | -------------------------------------------------------------------------------- /jstests/core/basic7.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.basic7; 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ) 6 | t.ensureIndex( { a : 1 } ); 7 | 8 | assert.eq( t.find().toArray()[0].a , 1 ); 9 | assert.eq( t.find().arrayAccess(0).a , 1 ); 10 | assert.eq( t.find()[0].a , 1 ); 11 | 12 | -------------------------------------------------------------------------------- /jstests/core/find_and_modify_server6993.js: -------------------------------------------------------------------------------- 1 | 2 | c = db.find_and_modify_server6993; 3 | c.drop(); 4 | 5 | c.insert( { a:[ 1, 2 ] } ); 6 | 7 | c.findAndModify( { query:{ a:1 }, update:{ $set:{ 'a.$':5 } } } ); 8 | 9 | assert.eq( 5, c.findOne().a[ 0 ] ); 10 | -------------------------------------------------------------------------------- /src/third_party/s2/s2region.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005 Google Inc. All Rights Reserved. 2 | 3 | #include "s2region.h" 4 | 5 | S2Region::~S2Region() { 6 | } 7 | 8 | bool S2Region::DecodeWithinScope(Decoder* const decoder) { 9 | return Decode(decoder); 10 | } 11 | -------------------------------------------------------------------------------- /jstests/core/find3.js: -------------------------------------------------------------------------------- 1 | t = db.find3; 2 | t.drop(); 3 | 4 | for ( i=1; i<=50; i++) 5 | t.save( { a : i } ); 6 | 7 | assert.eq( 50 , t.find().toArray().length ); 8 | assert.eq( 20 , t.find().limit(20).toArray().length ); 9 | 10 | assert(t.validate().valid); 11 | -------------------------------------------------------------------------------- /jstests/core/updateb.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.updateb; 3 | t.drop(); 4 | 5 | t.update( { "x.y" : 2 } , { $inc : { a : 7 } } , true ); 6 | 7 | correct = { a : 7 , x : { y : 2 } }; 8 | got = t.findOne(); 9 | delete got._id; 10 | assert.docEq( correct , got , "A" ) 11 | 12 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6198.js: -------------------------------------------------------------------------------- 1 | // server-6198: disallow dots in group output field names 2 | load('jstests/aggregation/extras/utils.js'); 3 | 4 | db.server6198.drop(); 5 | 6 | assertErrorCode(db.server6198, {$group:{_id:null, "bar.baz": {$addToSet: "$foo"}}}, 16414); 7 | -------------------------------------------------------------------------------- /jstests/core/evala.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.evala; 3 | t.drop() 4 | 5 | t.save( { x : 5 } ) 6 | 7 | assert.eq( 5 , db.eval( "function(){ return db.evala.findOne().x; }" ) , "A" ); 8 | assert.eq( 5 , db.eval( "/* abc */function(){ return db.evala.findOne().x; }" ) , "B" ); 9 | 10 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6530.js: -------------------------------------------------------------------------------- 1 | // server-6530: disallow $near queries in $match operations 2 | load('jstests/aggregation/extras/utils.js'); 3 | 4 | assertErrorCode(db.foo, {$match: {$near: [0,0]}}, 16424); 5 | assertErrorCode(db.foo, {$match: {$nearSphere: [2,2]}}, 16426); 6 | -------------------------------------------------------------------------------- /jstests/core/index6.js: -------------------------------------------------------------------------------- 1 | // index6.js Test indexes on array subelements. 2 | 3 | r = db.ed.db.index6; 4 | r.drop(); 5 | 6 | r.save( { comments : [ { name : "eliot", foo : 1 } ] } ); 7 | r.ensureIndex( { "comments.name": 1 } ); 8 | assert( r.findOne( { "comments.name": "eliot" } ) ); 9 | -------------------------------------------------------------------------------- /jstests/core/insert_id_undefined.js: -------------------------------------------------------------------------------- 1 | // ensure a document with _id undefined cannot be saved 2 | t = db.insert_id_undefined; 3 | t.drop(); 4 | t.insert({_id:undefined}); 5 | assert.eq(t.count(), 0); 6 | // Make sure the collection was not created 7 | assert.commandFailed( t.stats() ); 8 | -------------------------------------------------------------------------------- /jstests/core/regex_options.js: -------------------------------------------------------------------------------- 1 | t = db.jstests_regex_options; 2 | 3 | t.drop(); 4 | t.save( { a: "foo" } ); 5 | assert.eq( 1, t.count( { a: { "$regex": /O/i } } ) ); 6 | assert.eq( 1, t.count( { a: /O/i } ) ); 7 | assert.eq( 1, t.count( { a: { "$regex": "O", "$options": "i" } } ) ); 8 | -------------------------------------------------------------------------------- /jstests/core/remove4.js: -------------------------------------------------------------------------------- 1 | t = db.remove4; 2 | t.drop(); 3 | 4 | t.save ( { a : 1 , b : 1 } ); 5 | t.save ( { a : 2 , b : 1 } ); 6 | t.save ( { a : 3 , b : 1 } ); 7 | 8 | assert.eq( 3 , t.find().length() ); 9 | t.remove( { b : 1 } ); 10 | assert.eq( 0 , t.find().length() ); 11 | -------------------------------------------------------------------------------- /jstests/perf/geo_near1.js: -------------------------------------------------------------------------------- 1 | var t = db.bench.geo_near1; 2 | t.drop() 3 | 4 | var numPts = 1000*1000; 5 | 6 | 7 | for (var i=0; i < numPts; i++){ 8 | x = (Math.random() * 100) - 50; 9 | y = (Math.random() * 100) - 50; 10 | t.insert({loc: [x,y], i: i}); 11 | } 12 | -------------------------------------------------------------------------------- /mongo_astyle: -------------------------------------------------------------------------------- 1 | --indent=spaces=4 2 | --convert-tabs 3 | --lineend=linux 4 | 5 | --indent-namespaces 6 | --indent-preprocessor 7 | 8 | 9 | --keep-one-line-statements 10 | --keep-one-line-blocks 11 | 12 | --break-closing-brackets 13 | --brackets=attach 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /jstests/core/eval6.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.eval6; 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ); 6 | 7 | db.eval( 8 | function(){ 9 | o = db.eval6.findOne(); 10 | o.b = 2; 11 | db.eval6.save( o ); 12 | } 13 | ); 14 | 15 | assert.eq( 2 , t.findOne().b ); 16 | -------------------------------------------------------------------------------- /jstests/core/geo_s2nopoints.js: -------------------------------------------------------------------------------- 1 | // See SERVER-7794. 2 | t = db.geo_s2nopoints 3 | t.drop() 4 | 5 | t.ensureIndex({loc: "2dsphere", x:1}) 6 | assert.eq(0, t.count({loc: {$near: {$geometry: {type: 'Point', coordinates:[0,0]}, 7 | $maxDistance: 10}}})) 8 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server15810.js: -------------------------------------------------------------------------------- 1 | // SERVER-15810: Server crash when running a poorly formed command 2 | var res = db.runCommand({aggregate: 1, pipeline: []}); 3 | assert.commandFailed(res); // command must fail 4 | // TODO(geert): assert(!('code' in res)); // but must not cause massert 5 | -------------------------------------------------------------------------------- /jstests/core/dbref1.js: -------------------------------------------------------------------------------- 1 | 2 | a = db.dbref1a; 3 | b = db.dbref1b; 4 | 5 | a.drop(); 6 | b.drop(); 7 | 8 | a.save( { name : "eliot" } ); 9 | b.save( { num : 1 , link : new DBPointer( "dbref1a" , a.findOne()._id ) } ); 10 | assert.eq( "eliot" , b.findOne().link.fetch().name , "A" ); 11 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/NON-UNIX-USE: -------------------------------------------------------------------------------- 1 | Compiling PCRE on non-Unix systems 2 | ---------------------------------- 3 | 4 | This has been renamed to better reflect its contents. Please see the file 5 | NON-AUTOTOOLS-BUILD for details of how to build PCRE without using autotools. 6 | 7 | #### 8 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/evict-btree.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: evict btree configuration 2 | conn_config="cache_size=50M" 3 | table_config="type=file" 4 | icount=10000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=16,reads=1)) 9 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/medium-btree.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: medium btree configuration 2 | conn_config="cache_size=1G" 3 | table_config="type=file" 4 | icount=50000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=16,reads=1)) 9 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/small-btree.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: small btree configuration 2 | conn_config="cache_size=500MB" 3 | table_config="type=file" 4 | icount=500000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=8,reads=1)) 9 | -------------------------------------------------------------------------------- /jstests/core/capped1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.capped1; 3 | t.drop(); 4 | 5 | db.createCollection("capped1" , {capped:true, size:1024 }); 6 | v = t.validate(); 7 | assert( v.valid , "A : " + tojson( v ) ); // SERVER-485 8 | 9 | t.save( { x : 1 } ) 10 | assert( t.validate().valid , "B" ) 11 | 12 | -------------------------------------------------------------------------------- /jstests/core/find_and_modify_where.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.find_and_modify_where; 3 | t.drop(); 4 | 5 | t.insert( { _id : 1 , x : 1 } ); 6 | 7 | res = t.findAndModify( { query : { $where : "return this.x == 1" } , update : { $set : { y : 1 } } } ) 8 | 9 | assert.eq( 1 , t.findOne().y ) 10 | 11 | -------------------------------------------------------------------------------- /jstests/core/fm1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.fm1; 3 | t.drop(); 4 | 5 | t.insert({foo:{bar:1}}) 6 | t.find({},{foo:1}).toArray(); 7 | t.find({},{'foo.bar':1}).toArray(); 8 | t.find({},{'baz':1}).toArray(); 9 | t.find({},{'baz.qux':1}).toArray(); 10 | t.find({},{'foo.qux':1}).toArray(); 11 | 12 | 13 | -------------------------------------------------------------------------------- /jstests/dur/indexbg.js: -------------------------------------------------------------------------------- 1 | path = MongoRunner.dataDir + '/indexbg_dur'; 2 | 3 | m = startMongodEmpty( '--port', 30001, '--dbpath', path, '--journal', '--smallfiles', '--journalOptions', 24 ); 4 | t = m.getDB( 'test' ).test; 5 | t.save( {x:1} ); 6 | t.createIndex( {x:1}, {background:true} ); 7 | t.count(); 8 | -------------------------------------------------------------------------------- /src/mongo/bson/README: -------------------------------------------------------------------------------- 1 | "BSON" stands for "binary JSON" - a binary storage format that is JSON inspired 2 | (and adds a couple extra types such as Date). 3 | 4 | This is the C++ implementation. Implementations which translate BSON<->JSON 5 | are available for most languages at bsonspec.org. 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/third_party/s2/strings/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env = env.Clone() 6 | 7 | env.Append(CCFLAGS=['-Isrc/third_party/s2']) 8 | 9 | env.Library( 10 | "strings", 11 | [ 12 | "split.cc", 13 | "stringprintf.cc", 14 | "strutil.cc", 15 | ]) 16 | -------------------------------------------------------------------------------- /jstests/core/in6.js: -------------------------------------------------------------------------------- 1 | t = db.jstests_in6; 2 | t.drop(); 3 | 4 | t.save( {} ); 5 | 6 | function doTest() { 7 | assert.eq.automsg( "1", "t.count( {i:null} )" ); 8 | assert.eq.automsg( "1", "t.count( {i:{$in:[null]}} )" ); 9 | } 10 | 11 | doTest(); 12 | t.ensureIndex( {i:1} ); 13 | doTest(); 14 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/small-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: small lsm configuration 2 | conn_config="cache_size=500MB" 3 | table_config="lsm=(chunk_size=10MB),type=lsm" 4 | icount=500000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=8,reads=1)) 9 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/functional/hash.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2005-2009 Daniel James. 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | -------------------------------------------------------------------------------- /jstests/core/distinct2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.distinct2; 3 | t.drop(); 4 | 5 | t.save({a:null}); 6 | assert.eq( 0 , t.distinct('a.b').length , "A" ); 7 | 8 | t.drop(); 9 | t.save( { a : 1 } ); 10 | assert.eq( [1] , t.distinct( "a" ) , "B" ); 11 | t.save( {} ) 12 | assert.eq( [1] , t.distinct( "a" ) , "C" ); 13 | 14 | -------------------------------------------------------------------------------- /jstests/core/find_and_modify_server6254.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.find_and_modify_server6254; 3 | t.drop(); 4 | 5 | t.insert( { x : 1 } ) 6 | ret = t.findAndModify( { query : { x : 1 } , update : { $set : { x : 2 } } , new : true } ) 7 | assert.eq( 2 , ret.x , tojson( ret ) ) 8 | 9 | assert.eq( 1 , t.count() ) 10 | 11 | -------------------------------------------------------------------------------- /jstests/core/ne1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.ne1; 3 | t.drop(); 4 | 5 | t.save( { x : 1 } ); 6 | t.save( { x : 2 } ); 7 | t.save( { x : 3 } ); 8 | 9 | assert.eq( 2 , t.find( { x : { $ne : 2 } } ).itcount() , "A" ); 10 | t.ensureIndex( { x : 1 } ); 11 | assert.eq( 2 , t.find( { x : { $ne : 2 } } ).itcount() , "B" ); 12 | -------------------------------------------------------------------------------- /src/third_party/s2/base/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env = env.Clone() 6 | 7 | env.Append(CCFLAGS=['-Isrc/third_party/s2']) 8 | 9 | env.Library( 10 | "base", 11 | [ 12 | "int128.cc", 13 | "logging.cc", 14 | "stringprintf.cc", 15 | "strtoint.cc", 16 | ]) 17 | -------------------------------------------------------------------------------- /jstests/core/index3.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | t = db.index3; 4 | t.drop(); 5 | 6 | assert( t.getIndexes().length == 0 ); 7 | 8 | t.ensureIndex( { name : 1 } ); 9 | 10 | t.save( { name : "a" } ); 11 | 12 | t.ensureIndex( { name : 1 } ); 13 | 14 | assert( t.getIndexes().length == 2 ); 15 | 16 | assert(t.validate().valid); 17 | -------------------------------------------------------------------------------- /jstests/core/server7756.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.server7756; 3 | t.drop(); 4 | 5 | t.save( { a:[ { 1:'x' }, 'y' ] } ); 6 | 7 | assert.eq( 1, t.count( { 'a.1':'x' } ) ); 8 | assert.eq( 1, t.count( { 'a.1':'y' } ) ); 9 | 10 | assert.eq( 1, t.count( { 'a.1':/x/ } ) ); 11 | assert.eq( 1, t.count( { 'a.1':/y/ } ) ); 12 | 13 | -------------------------------------------------------------------------------- /jstests/core/update_addToSet2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_addToSet2 3 | t.drop(); 4 | 5 | o = { _id : 1 } 6 | t.insert( { _id : 1 } ); 7 | 8 | t.update({},{$addToSet : {'kids' :{ 'name' : 'Bob', 'age': '4'}}}) 9 | t.update({},{$addToSet : {'kids' :{ 'name' : 'Dan', 'age': '2'}}}) 10 | 11 | printjson( t.findOne() ); 12 | -------------------------------------------------------------------------------- /jstests/core/update_blank1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_blank1 3 | t.drop(); 4 | 5 | orig = { "" : 1 , _id : 2 , "a" : 3 , "b" : 4 }; 6 | t.insert( orig ); 7 | var res = t.update( {} , { $set : { "c" : 5 } } ); 8 | print( res ); 9 | orig["c"] = 5; 10 | assert.docEq( orig , t.findOne() , "after $set" ); // SERVER-2651 11 | -------------------------------------------------------------------------------- /src/mongo/db/catalog/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python; -*- 2 | 3 | Import("env") 4 | 5 | env.Library('collection_options', ['collection_options.cpp'], LIBDEPS=['$BUILD_DIR/mongo/bson']) 6 | 7 | env.CppUnitTest('collection_options_test', ['collection_options_test.cpp'], 8 | LIBDEPS=['collection_options']) 9 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/concept/detail/concept_undef.hpp: -------------------------------------------------------------------------------- 1 | // Copyright David Abrahams 2006. Distributed under the Boost 2 | // Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | # undef BOOST_concept_typename 5 | # undef BOOST_concept 6 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/dist/s_release.list: -------------------------------------------------------------------------------- 1 | # Exclusions from release packages. 2 | # Each non-comment line is excluded from the release. 3 | lang/python/src 4 | src/server 5 | test/format 6 | test/packing 7 | test/salvage 8 | test/snapshot 9 | test/thread 10 | tools/wtstats/template 11 | tools/wtstats/test 12 | -------------------------------------------------------------------------------- /jstests/libs/mockkrb5.conf: -------------------------------------------------------------------------------- 1 | [libdefaults] 2 | default_realm = 10GEN.ME 3 | 4 | [realms] 5 | 10GEN.ME = { 6 | kdc = kdc.10gen.me 7 | admin_server = kdc.10gen.me 8 | default_domain = 10gen.me 9 | } 10 | 11 | [domain_realm] 12 | .10gen.me = 10GEN.ME 13 | 10gen.me = 10GEN.ME 14 | -------------------------------------------------------------------------------- /jstests/mmap_v1/extent.js: -------------------------------------------------------------------------------- 1 | t = db.reclaimExtentsTest; 2 | t.drop(); 3 | 4 | for ( var i=0; i<50; i++ ) { // enough iterations to break 32 bit. 5 | db.createCollection('reclaimExtentsTest', { size : 100000000 }); 6 | t.insert({x:1}); 7 | assert( t.count() == 1 ); 8 | t.drop(); 9 | } 10 | t.drop(); 11 | 12 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/pending/integer_log2.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_PENDING_INTEGER_LOG2_HPP 2 | #define BOOST_PENDING_INTEGER_LOG2_HPP 3 | 4 | // The header file at this path is deprecated; 5 | // use boost/integer/integer_log2.hpp instead. 6 | 7 | #include 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/Makefile: -------------------------------------------------------------------------------- 1 | include mkinc.mak 2 | CFLAGS=-Iinclude 3 | all: libstemmer.o stemwords 4 | libstemmer.o: $(snowball_sources:.c=.o) 5 | $(AR) -cru $@ $^ 6 | stemwords: examples/stemwords.o libstemmer.o 7 | $(CC) -o $@ $^ 8 | clean: 9 | rm -f stemwords *.o src_c/*.o runtime/*.o libstemmer/*.o 10 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/ext/compressors/bzip2/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include 2 | 3 | lib_LTLIBRARIES = libwiredtiger_bzip2.la 4 | libwiredtiger_bzip2_la_SOURCES = bzip2_compress.c 5 | libwiredtiger_bzip2_la_LDFLAGS = -avoid-version -module 6 | libwiredtiger_bzip2_la_LIBADD = -lbz2 7 | -------------------------------------------------------------------------------- /jstests/core/geo8.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.geo8 3 | t.drop() 4 | 5 | t.insert( { loc : [ 5 , 5 ] } ) 6 | t.insert( { loc : [ 5 , 6 ] } ) 7 | t.insert( { loc : [ 5 , 7 ] } ) 8 | t.insert( { loc : [ 4 , 5 ] } ) 9 | t.insert( { loc : [ 100 , 100 ] } ) 10 | 11 | t.ensureIndex( { loc : "2d" } ) 12 | 13 | t.runCommand( "geoWalk" ); 14 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6335.js: -------------------------------------------------------------------------------- 1 | // server-6335: don't allow $where clauses in a $match 2 | 3 | // load the test utilities 4 | load('jstests/aggregation/extras/utils.js'); 5 | 6 | assertErrorCode(db.foo, {$match: {$where: "return true"}}, 16395); 7 | assertErrorCode(db.foo, {$match: {$and:[{$where: "return true"}]}}, 16395); 8 | 9 | -------------------------------------------------------------------------------- /jstests/core/update_multi6.js: -------------------------------------------------------------------------------- 1 | var res; 2 | 3 | t = db.update_multi6 4 | t.drop(); 5 | 6 | t.update( { _id : 1 } , { _id : 1 , x : 1 , y : 2 } , true , false ); 7 | assert( t.findOne( { _id : 1 } ) , "A" ) 8 | 9 | res = t.update( { _id : 2 } , { _id : 2 , x : 1 , y : 2 } , true , true ); 10 | assert.writeError( res ); 11 | 12 | -------------------------------------------------------------------------------- /jstests/core/where2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.getCollection( "where2" ); 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ); 6 | t.save( { a : 2 } ); 7 | t.save( { a : 3 } ); 8 | 9 | assert.eq( 1 , t.find( { $where : "this.a == 2" } ).toArray().length , "A" ); 10 | assert.eq( 1 , t.find( { $where : "\nthis.a == 2" } ).toArray().length , "B" ); 11 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/build_posix/wiredtiger.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: WiredTiger 7 | Description: The WiredTiger Data Engine 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lwiredtiger 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6194.js: -------------------------------------------------------------------------------- 1 | // make sure $concat doesn't optimize constants to the end 2 | c = db.c; 3 | c.drop(); 4 | 5 | c.save( { x:'3' } ); 6 | 7 | project = { $project:{ a:{ $concat:[ '1', { $concat:[ 'foo', '$x', 'bar' ] }, '2' ] } } }; 8 | 9 | assert.eq( '1foo3bar2', c.aggregate( project ).toArray()[ 0 ].a ); 10 | -------------------------------------------------------------------------------- /jstests/core/autoid.js: -------------------------------------------------------------------------------- 1 | f = db.jstests_autoid; 2 | f.drop(); 3 | 4 | f.save( {z:1} ); 5 | a = f.findOne( {z:1} ); 6 | f.update( {z:1}, {z:2} ); 7 | b = f.findOne( {z:2} ); 8 | assert.eq( a._id.str, b._id.str ); 9 | c = f.update( {z:2}, {z:"abcdefgabcdefgabcdefg"} ); 10 | c = f.findOne( {} ); 11 | assert.eq( a._id.str, c._id.str ); 12 | -------------------------------------------------------------------------------- /jstests/core/js5.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.jstests_js5 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ) 6 | t.save( { a : 2 } ) 7 | 8 | assert.eq( 2 , t.find( { "$where" : "this.a" } ).count() , "A" ); 9 | assert.eq( 0 , t.find( { "$where" : "this.b" } ).count() , "B" ); 10 | assert.eq( 0 , t.find( { "$where" : "this.b > 45" } ).count() , "C" ); 11 | -------------------------------------------------------------------------------- /src/mongo/db/commands/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env.Library( 6 | target='server_status_core', 7 | source=[ 8 | 'server_status_internal.cpp', 9 | 'server_status_metric.cpp', 10 | ], 11 | LIBDEPS=[ 12 | '$BUILD_DIR/mongo/bson' 13 | ] 14 | ) 15 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/config/abi/msvc_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #pragma pack(pop) 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/third_party/s2/util/coding/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env = env.Clone() 6 | 7 | env.Append(CCFLAGS=['-Isrc/third_party/s2']) 8 | env.Append(CCFLAGS=['-Isrc/third_party/gflags-2.0/src']) 9 | 10 | env.Library( 11 | "coding", 12 | [ 13 | "coder.cc", 14 | "varint.cc", 15 | ]) 16 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/update-btree.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: btree with inserts/updates, in memory 2 | conn_config="cache_size=1G" 3 | table_config="type=file" 4 | icount=5000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=2,inserts=1),(count=2,reads=1),(count=2,updates=1)) 9 | -------------------------------------------------------------------------------- /jstests/core/fts_enabled.js: -------------------------------------------------------------------------------- 1 | // Test that the textSearchEnabled server parameter works correctly (now deprecated). 2 | 3 | // Value true is accepted, value false is rejected. 4 | assert.commandWorked(db.adminCommand({setParameter: 1, textSearchEnabled: true})); 5 | assert.commandFailed(db.adminCommand({setParameter: 1, textSearchEnabled: false})); 6 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/insert-rmw.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Test the insert-rmw functionality 2 | conn_config="cache_size=500MB" 3 | table_config="type=lsm" 4 | icount=500000 5 | insert_rmw=true 6 | report_interval=5 7 | run_time=120 8 | populate_threads=1 9 | threads=((count=4,inserts=1),(count=2,reads=1)) 10 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/log-append.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Test a log file with a multi-threaded 2 | # append workload. 3 | conn_config="cache_size=1G,log=(enabled=true,file_max=20MB),checkpoint=(log_size=1G)" 4 | table_config="type=file" 5 | icount=50000000 6 | report_interval=5 7 | run_time=0 8 | populate_threads=8 9 | -------------------------------------------------------------------------------- /jstests/core/hint1.js: -------------------------------------------------------------------------------- 1 | p = db.jstests_hint1; 2 | p.drop(); 3 | 4 | p.save( { ts: new Date( 1 ), cls: "entry", verticals: "alleyinsider", live: true } ); 5 | p.ensureIndex( { ts: 1 } ); 6 | 7 | assert.eq(1, p.find({ live: true, ts: { $lt: new Date(1234119308272) }, cls: "entry", verticals: "alleyinsider" }).sort({ ts: -1 }).hint({ ts: 1 }).count()); 8 | -------------------------------------------------------------------------------- /jstests/core/ore.js: -------------------------------------------------------------------------------- 1 | // verify that index direction is considered when deduping based on an earlier 2 | // index 3 | 4 | t = db.jstests_ore; 5 | t.drop(); 6 | 7 | t.ensureIndex( {a:-1} ) 8 | t.ensureIndex( {b:1} ); 9 | 10 | t.save( {a:1,b:1} ); 11 | t.save( {a:2,b:1} ); 12 | 13 | assert.eq( 2, t.count( {$or:[{a:{$in:[1,2]}},{b:1}]} ) ); 14 | -------------------------------------------------------------------------------- /jstests/mmap_v1/capped_server7543.js: -------------------------------------------------------------------------------- 1 | 2 | mydb = db.getSisterDB( "capped_server7543" ); 3 | mydb.dropDatabase(); 4 | 5 | mydb.createCollection( "foo" , { capped : true , size : 12288 } ); 6 | 7 | assert.eq( 12288, mydb.foo.stats().storageSize ); 8 | assert.eq( 1, mydb.foo.validate(true).extentCount ); 9 | 10 | mydb.dropDatabase(); 11 | 12 | -------------------------------------------------------------------------------- /src/third_party/v8/tools/freebsd-tick-processor: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # A wrapper script to call 'linux-tick-processor'. 4 | 5 | # Known issues on FreeBSD: 6 | # No ticks from C++ code. 7 | # You must have d8 built and in your path before calling this. 8 | 9 | tools_path=`cd $(dirname "$0");pwd` 10 | $tools_path/linux-tick-processor "$@" 11 | -------------------------------------------------------------------------------- /jstests/core/basic4.js: -------------------------------------------------------------------------------- 1 | t = db.getCollection( "basic4" ); 2 | t.drop(); 3 | 4 | t.save( { a : 1 , b : 1.0 } ); 5 | 6 | assert( t.findOne() ); 7 | assert( t.findOne( { a : 1 } ) ); 8 | assert( t.findOne( { a : 1.0 } ) ); 9 | assert( t.findOne( { b : 1 } ) ); 10 | assert( t.findOne( { b : 1.0 } ) ); 11 | 12 | assert( ! t.findOne( { b : 2.0 } ) ); 13 | -------------------------------------------------------------------------------- /jstests/core/eval0.js: -------------------------------------------------------------------------------- 1 | 2 | assert.eq( 17 , db.eval( function(){ return 11 + 6; } ) , "A" ); 3 | assert.eq( 17 , db.eval( function( x ){ return 10 + x; } , 7 ) , "B" ); 4 | 5 | // check that functions in system.js work 6 | db.system.js.insert({_id: "add", value: function(x,y){ return x + y;}}); 7 | assert.eq( 20 , db.eval( "this.add(15, 5);" ) , "C" ); 8 | 9 | -------------------------------------------------------------------------------- /jstests/core/indexf.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.indexf 3 | t.drop(); 4 | 5 | t.ensureIndex( { x : 1 } ); 6 | 7 | t.save( { x : 2 } ); 8 | t.save( { y : 3 } ); 9 | t.save( { x : 4 } ); 10 | 11 | assert.eq( 2 , t.findOne( { x : 2 } ).x , "A1" ); 12 | assert.eq( 3 , t.findOne( { x : null } ).y , "A2" ); 13 | assert.eq( 4 , t.findOne( { x : 4 } ).x , "A3" ); 14 | -------------------------------------------------------------------------------- /jstests/core/update8.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update8; 3 | t.drop(); 4 | 5 | t.update( { _id : 1 , tags: {"$ne": "a"}}, {"$push": { tags : "a" } } , true ) 6 | assert.eq( { _id : 1 , tags : [ "a" ] } , t.findOne() , "A" ); 7 | 8 | t.drop() 9 | //SERVER-390 10 | //t.update( { "x.y" : 1 } , { $inc : { i : 1 } } , true ); 11 | //printjson( t.findOne() ); 12 | -------------------------------------------------------------------------------- /rpm/mongod.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=High-performance, schema-free document-oriented database 3 | 4 | [Service] 5 | User=mongod 6 | Group=mongod 7 | Environment="OPTIONS=--quiet -f /etc/mongod.conf" 8 | ExecStart=/usr/local/bin/mongod $OPTIONS run 9 | PIDFile=/var/run/mongodb/mongod.pid 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /docs/building.opensolaris.ec2.md: -------------------------------------------------------------------------------- 1 | # Building on open solaris on ec2 2 | 3 | This assumes you are using ami-4133d528 (which is 32bit). 4 | 5 | 6 | pkg install SUNWgcc 7 | pkg install SUNWgit 8 | pkg install SUNWpython-setuptools 9 | easy_install-2.4 scons 10 | git clone git://github.com/mongodb/mongo.git 11 | cd mongo 12 | scons -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server7900.js: -------------------------------------------------------------------------------- 1 | // server-7900 - $sort + $limit ignores limit when using index for sort 2 | 3 | c = db.s7900; 4 | c.drop(); 5 | 6 | for (var i=0; i < 5; i++) 7 | c.insert({_id:i}); 8 | 9 | res = c.aggregate({$sort: {_id: -1}}, {$limit: 2}); // uses index for sort 10 | assert.eq(res.toArray(), [{_id: 4}, {_id: 3}]); 11 | 12 | -------------------------------------------------------------------------------- /jstests/core/regexb.js: -------------------------------------------------------------------------------- 1 | // Test more than four regex expressions in a query -- SERVER-969 2 | 3 | t = db.jstests_regexb; 4 | t.drop(); 5 | 6 | t.save( {a:'a',b:'b',c:'c',d:'d',e:'e'} ); 7 | 8 | assert.eq( 1, t.count( {a:/a/,b:/b/,c:/c/,d:/d/,e:/e/} ) ); 9 | assert.eq( 0, t.count( {a:/a/,b:/b/,c:/c/,d:/d/,e:/barf/} ) ); 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /jstests/core/remove_justone.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.remove_justone 3 | t.drop() 4 | 5 | t.insert( { x : 1 } ) 6 | t.insert( { x : 1 } ) 7 | t.insert( { x : 1 } ) 8 | t.insert( { x : 1 } ) 9 | 10 | assert.eq( 4 , t.count() ) 11 | 12 | t.remove( { x : 1 } , true ) 13 | assert.eq( 3 , t.count() ) 14 | 15 | t.remove( { x : 1 } ) 16 | assert.eq( 0 , t.count() ) 17 | -------------------------------------------------------------------------------- /jstests/core/string_with_nul_bytes.js: -------------------------------------------------------------------------------- 1 | // SERVER-6649 - issues round-tripping strings with embedded NUL bytes 2 | 3 | t = db.string_with_nul_bytes.js; 4 | t.drop(); 5 | 6 | string = "string with a NUL (\0) byte"; 7 | t.insert({str:string}); 8 | assert.eq(t.findOne().str, string); 9 | assert.eq(t.findOne().str.length, string.length); // just to be sure 10 | -------------------------------------------------------------------------------- /jstests/core/filemd5.js: -------------------------------------------------------------------------------- 1 | 2 | db.fs.chunks.drop(); 3 | db.fs.chunks.insert({files_id:1,n:0,data:new BinData(0,"test")}) 4 | 5 | x = db.runCommand({"filemd5":1,"root":"fs"}); 6 | assert( ! x.ok , tojson(x) ) 7 | 8 | db.fs.chunks.ensureIndex({files_id:1,n:1}) 9 | x = db.runCommand({"filemd5":1,"root":"fs"}); 10 | assert( x.ok , tojson(x) ) 11 | 12 | -------------------------------------------------------------------------------- /jstests/core/geo_near_random1.js: -------------------------------------------------------------------------------- 1 | // this tests all points using $near 2 | load("jstests/libs/geo_near_random.js"); 3 | 4 | var test = new GeoNearRandomTest("geo_near_random1"); 5 | 6 | test.insertPts(50); 7 | 8 | test.testPt([0,0]); 9 | test.testPt(test.mkPt()); 10 | test.testPt(test.mkPt()); 11 | test.testPt(test.mkPt()); 12 | test.testPt(test.mkPt()); 13 | -------------------------------------------------------------------------------- /jstests/core/updatej.js: -------------------------------------------------------------------------------- 1 | // Test that update validation failure terminates the update without modifying subsequent 2 | // documents. SERVER-4779 3 | 4 | t = db.jstests_updatej; 5 | t.drop(); 6 | 7 | t.save( {a:[]} ); 8 | t.save( {a:1} ); 9 | t.save( {a:[]} ); 10 | 11 | t.update( {}, {$push:{a:2}}, false, true ); 12 | assert.eq( 1, t.count( {a:2} ) ); 13 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcrecpp.pc: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=/usr/local 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libpcrecpp 9 | Description: PCRECPP - C++ wrapper for PCRE 10 | Version: 8.30 11 | Libs: -L${libdir} -lpcre -lpcrecpp 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/medium-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: medium lsm configuration 2 | conn_config="cache_size=1G,lsm_manager=(worker_thread_max=6)" 3 | table_config="lsm=(chunk_size=100MB),type=lsm,os_cache_dirty_max=16MB" 4 | icount=50000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=16,reads=1)) 9 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6181.js: -------------------------------------------------------------------------------- 1 | // SERVER-6181 Correctly support an expression for _id 2 | 3 | c = db.c; 4 | c.drop(); 5 | 6 | c.save( { a:2 } ); 7 | 8 | res = c.aggregate( { $project:{ _id:'$a' } } ) 9 | assert.eq(res.toArray(), [{_id:2}]) 10 | 11 | res = c.aggregate( { $project:{ _id:{$add: [1, '$a']} } } ) 12 | assert.eq(res.toArray(), [{_id:3}]) 13 | -------------------------------------------------------------------------------- /jstests/core/array1.js: -------------------------------------------------------------------------------- 1 | t = db.array1 2 | t.drop() 3 | 4 | x = { a : [ 1 , 2 ] }; 5 | 6 | t.save( { a : [ [1,2] ] } ); 7 | assert.eq( 1 , t.find( x ).count() , "A" ); 8 | 9 | t.save( x ); 10 | delete x._id; 11 | assert.eq( 2 , t.find( x ).count() , "B" ); 12 | 13 | t.ensureIndex( { a : 1 } ); 14 | assert.eq( 2 , t.find( x ).count() , "C" ); // TODO SERVER-146 15 | -------------------------------------------------------------------------------- /jstests/core/group_empty.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.group_empty; 3 | t.drop(); 4 | 5 | res1 = db.runCommand({group: {$reduce: function(){}, ns: 'group_empty', cond: {}, key: {}, initial: {count: 0}}}); 6 | t.ensureIndex( { x : 1 } ); 7 | res2 = db.runCommand({group: {$reduce: function(){}, ns: 'group_empty', cond: {}, key: {}, initial: {count: 0}}}); 8 | assert.eq( res1, res2 ); 9 | -------------------------------------------------------------------------------- /jstests/core/js1.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | t = db.jstests_js1; 4 | t.remove( {} ); 5 | 6 | t.save( { z : 1 } ); 7 | t.save( { z : 2 } ); 8 | assert( 2 == t.find().length() ); 9 | assert( 2 == t.find( { $where : function(){ return 1; } } ).length() ); 10 | assert( 1 == t.find( { $where : function(){ return obj.z == 2; } } ).length() ); 11 | 12 | assert(t.validate().valid); 13 | -------------------------------------------------------------------------------- /src/third_party/yaml-cpp-0.5.1/src/node.cpp: -------------------------------------------------------------------------------- 1 | #include "yaml-cpp/node/node.h" 2 | #include "nodebuilder.h" 3 | #include "nodeevents.h" 4 | 5 | namespace YAML 6 | { 7 | Node Clone(const Node& node) 8 | { 9 | NodeEvents events(node); 10 | NodeBuilder builder; 11 | events.Emit(builder); 12 | return builder.Root(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /jstests/core/geoa.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.geoa 3 | t.drop(); 4 | 5 | t.save( { _id : 1 , a : { loc : [ 5 , 5 ] } } ) 6 | t.save( { _id : 2 , a : { loc : [ 6 , 6 ] } } ) 7 | t.save( { _id : 3 , a : { loc : [ 7 , 7 ] } } ) 8 | 9 | t.ensureIndex( { "a.loc" : "2d" } ); 10 | 11 | cur = t.find( { "a.loc" : { $near : [ 6 , 6 ] } } ); 12 | assert.eq( 2 , cur.next()._id , "A1" ); 13 | -------------------------------------------------------------------------------- /jstests/core/indexg.js: -------------------------------------------------------------------------------- 1 | 2 | f = db.jstests_indexg; 3 | f.drop(); 4 | f.save( { list: [1, 2] } ); 5 | f.save( { list: [1, 3] } ); 6 | 7 | doit = function() { 8 | assert.eq( 1, f.count( { list: { $in: [1], $ne: 3 } } ) ); 9 | assert.eq( 1, f.count( { list: { $in: [1], $not:{$in: [3] } } } ) ); 10 | } 11 | doit(); 12 | f.ensureIndex( { list: 1 } ); 13 | doit(); -------------------------------------------------------------------------------- /jstests/core/pull_remove1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.pull_remove1 3 | t.drop() 4 | 5 | o = { _id : 1 , a : [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] } 6 | t.insert( o ) 7 | 8 | assert.eq( o , t.findOne() , "A1" ) 9 | 10 | o.a = o.a.filter( function(z){ return z >= 6; } ) 11 | t.update( {} , { $pull : { a : { $lt : 6 } } } ) 12 | 13 | assert.eq( o.a , t.findOne().a , "A2" ) 14 | 15 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/detail/os_detected.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2013 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_DETAIL_OS_DETECTED 9 | #define BOOST_PREDEF_DETAIL_OS_DETECTED 1 10 | #endif 11 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/thread/detail/variadic_footer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013 Vicente J. Botet Escriba 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | 7 | #if defined BOOST_NO_CXX11_VARIADIC_TEMPLATES 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/dist/extlist: -------------------------------------------------------------------------------- 1 | # extlist -- 2 | # List of extension source files for WiredTiger library. 3 | 4 | ext/collators/reverse/reverse_collator.c 5 | ext/compressors/bzip2/bzip2_compress.c 6 | ext/compressors/nop/nop_compress.c 7 | ext/compressors/snappy/snappy_compress.c 8 | ext/compressors/zlib/zlib_compress.c 9 | ext/datasources/helium/helium.c 10 | -------------------------------------------------------------------------------- /jstests/mmap_v1/touch1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.touch1; 3 | t.drop(); 4 | 5 | t.insert( { x : 1 } ); 6 | t.ensureIndex( { x : 1 } ); 7 | 8 | res = t.runCommand( "touch" ); 9 | assert( !res.ok, tojson( res ) ); 10 | 11 | res = t.runCommand( "touch", { data : true, index : true } ); 12 | assert.eq( 1, res.data.numRanges, tojson( res ) ); 13 | assert.eq( 1, res.ok, tojson( res ) ); 14 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/typeof/message.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2005 Arkadiy Vertleyb 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #if defined(_MSC_VER) && defined BOOST_TYPEOF_MESSAGES 6 | # pragma message(BOOST_TYPEOF_TEXT) 7 | #endif 8 | #undef BOOST_TYPEOF_TEXT 9 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | # Example watch control file for uscan 2 | # Rename this file to "watch" and then you can run the "uscan" command 3 | # to check for upstream updates and more. 4 | # See uscan(1) for format 5 | 6 | # Compulsory line, this is a version 3 file 7 | version=3 8 | 9 | # examine a Webserver directory 10 | http://downloads.mongodb.org/linux/mongodb-linux-(.*)\.tar\.gz 11 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/detail/comp_detected.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2014 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_DETAIL_COMP_DETECTED 9 | #define BOOST_PREDEF_DETAIL_COMP_DETECTED 1 10 | #endif 11 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/detail/platform_detected.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2014 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_DETAIL_PLAT_DETECTED 9 | #define BOOST_PREDEF_DETAIL_PLAT_DETECTED 1 10 | #endif 11 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcrecpp.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcrecpp 9 | Description: PCRECPP - C++ wrapper for PCRE 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre -lpcrecpp 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/libpcrecpp.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcrecpp 9 | Description: PCRECPP - C++ wrapper for PCRE 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre -lpcrecpp 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server9289.js: -------------------------------------------------------------------------------- 1 | // server9289 - support objects as single arguments to expressions. 2 | 3 | var t = db.server9289; 4 | t.drop(); 5 | 6 | t.insert({date: ISODate('2013-08-14T21:41:43Z')}); 7 | 8 | // This would result in a parse error on older servers 9 | assert.eq(t.aggregate({$project: {year: {$year: {$add:['$date',1000]}}}}).toArray()[0].year, 2013); 10 | -------------------------------------------------------------------------------- /jstests/core/explain_large_bounds.js: -------------------------------------------------------------------------------- 1 | // Make sure explain succeeds even when the index bounds are really big. 2 | 3 | var t = db.jstests_explain_large_bounds; 4 | t.drop(); 5 | 6 | t.ensureIndex({a: 1}); 7 | 8 | var inClause = []; 9 | for (var i = 0; i < 1000000; i++) { 10 | inClause.push(i); 11 | } 12 | 13 | assert.commandWorked(t.find({a: {$in: inClause}}).explain()); 14 | -------------------------------------------------------------------------------- /jstests/core/ref2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.ref2; 3 | t.drop(); 4 | 5 | a = { $ref : "foo" , $id : 1 }; 6 | b = { $ref : "foo" , $id : 2 }; 7 | 8 | 9 | t.save( { name : "a" , r : a } ); 10 | t.save( { name : "b" , r : b } ); 11 | 12 | assert.eq( 2 , t.find().count() , "A" ); 13 | assert.eq( 1 , t.find( { r : a } ).count() , "B" ); 14 | assert.eq( 1 , t.find( { r : b } ).count() , "C" ); 15 | -------------------------------------------------------------------------------- /jstests/core/update_multi5.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_multi5; 3 | 4 | t.drop() 5 | 6 | t.insert({path: 'r1', subscribers: [1,2]}); 7 | t.insert({path: 'r2', subscribers: [3,4]}); 8 | 9 | t.update({}, {$addToSet: {subscribers: 5}}, false, true); 10 | 11 | t.find().forEach( 12 | function(z){ 13 | assert.eq( 3 , z.subscribers.length , z ); 14 | } 15 | ); 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/evict-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: evict lsm configuration 2 | conn_config="cache_size=50M,lsm_manager=(worker_thread_max=6)" 3 | table_config="type=lsm,lsm=(chunk_size=2M),os_cache_dirty_max=16MB" 4 | compact=true 5 | icount=10000000 6 | report_interval=5 7 | run_time=120 8 | populate_threads=1 9 | threads=((count=16,reads=1)) 10 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/parallel-pop-stress.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Run populate multi-threaded with a btree. This can 2 | # uncover conditions where pages are too busy for eviction to work as 3 | # expected 4 | conn_config="cache_size=1GB" 5 | table_config="type=file" 6 | icount=10000000 7 | report_interval=5 8 | populate_threads=20 9 | run_time=0 10 | -------------------------------------------------------------------------------- /jstests/core/null_field_name.js: -------------------------------------------------------------------------------- 1 | // SERVER-10313: Test that null char in field name causes an error when converting to bson 2 | assert.throws( function () { Object.bsonsize({"a\0":1}); }, 3 | null, 4 | "null char in field name"); 5 | 6 | assert.throws( function () { Object.bsonsize({"\0asdf":1}); }, 7 | null, 8 | "null char in field name"); -------------------------------------------------------------------------------- /jstests/core/repair_server12955.js: -------------------------------------------------------------------------------- 1 | 2 | mydb = db.getSisterDB( "repair_server12955" ); 3 | mydb.dropDatabase() 4 | 5 | mydb.foo.ensureIndex({a:"text"}) 6 | mydb.foo.insert({a:"hello world"}) 7 | 8 | before = mydb.stats().dataFileVersion; 9 | 10 | mydb.repairDatabase(); 11 | 12 | after = mydb.stats().dataFileVersion; 13 | 14 | assert.eq( before, after ); 15 | mydb.dropDatabase(); 16 | -------------------------------------------------------------------------------- /src/third_party/s2/base/definer.h: -------------------------------------------------------------------------------- 1 | #ifndef BASE_DEFINER_H 2 | #define BASE_DEFINER_H 3 | 4 | #if defined __APPLE__ && defined __MACH__ 5 | # define OS_MACOSX 6 | #elif defined __linux__ 7 | # define OS_LINUX 8 | #elif defined _WIN32 9 | # define OS_WINDOWS 10 | #elif defined __FreeBSD__ || defined __OpenBSD__ 11 | # define OS_FREEBSD 12 | #endif 13 | 14 | #endif // BASE_DEFINER_H 15 | -------------------------------------------------------------------------------- /jstests/core/basic2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.getCollection( "basic2" ); 3 | t.drop(); 4 | 5 | o = { n : 2 }; 6 | t.save( o ); 7 | 8 | assert.eq( 1 , t.find().count() ); 9 | 10 | assert.eq( 2 , t.find( o._id ).toArray()[0].n ); 11 | assert.eq( 2 , t.find( o._id , { n : 1 } ).toArray()[0].n ); 12 | 13 | t.remove( o._id ); 14 | assert.eq( 0 , t.find().count() ); 15 | 16 | assert(t.validate().valid); 17 | -------------------------------------------------------------------------------- /jstests/core/set3.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.set3; 3 | t.drop(); 4 | 5 | t.insert( { "test1" : { "test2" : { "abcdefghijklmnopqrstu" : {"id":1} } } } ); 6 | t.update( {}, {"$set":{"test1.test2.abcdefghijklmnopqrstuvwxyz":{"id":2}}}) 7 | 8 | x = t.findOne(); 9 | assert.eq( 1 , x.test1.test2.abcdefghijklmnopqrstu.id , "A" ); 10 | assert.eq( 2 , x.test1.test2.abcdefghijklmnopqrstuvwxyz.id , "B" ); 11 | 12 | -------------------------------------------------------------------------------- /jstests/noPassthroughWithMongod/geo_near_random1.js: -------------------------------------------------------------------------------- 1 | // this tests all points using $near 2 | load("jstests/libs/geo_near_random.js"); 3 | 4 | var test = new GeoNearRandomTest("nightly.geo_near_random1"); 5 | 6 | test.insertPts(200); 7 | 8 | test.testPt([0,0]); 9 | test.testPt(test.mkPt()); 10 | test.testPt(test.mkPt()); 11 | test.testPt(test.mkPt()); 12 | test.testPt(test.mkPt()); 13 | 14 | -------------------------------------------------------------------------------- /site_scons/site_tools/jsheader.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from jstoh import jsToHeader 4 | from SCons.Builder import Builder 5 | 6 | def jsToH(target, source, env): 7 | jsToHeader(str(target[0]), source) 8 | 9 | jshBuilder = Builder( action=jsToH ) 10 | 11 | def generate(env, **kw): 12 | env.Append( BUILDERS=dict( JSHeader=jshBuilder ) ) 13 | 14 | def exists(env): 15 | return True 16 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/config/abi/borland_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | # pragma option pop 7 | #pragma nopushoptwarn 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcre.pc: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=/usr/local 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library with 8 bit character support 10 | Version: 8.30 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/parallel-pop-btree.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Run populate thread multi-threaded and with groups 2 | # of operations in each transaction. 3 | conn_config="cache_size=200MB" 4 | table_config="type=file" 5 | transaction_config="isolation=snapshot" 6 | icount=10000000 7 | report_interval=5 8 | populate_ops_per_txn=100 9 | populate_threads=5 10 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/build_posix/aclocal/version-set.m4: -------------------------------------------------------------------------------- 1 | dnl build by dist/s_version 2 | 3 | VERSION_MAJOR=2 4 | VERSION_MINOR=5 5 | VERSION_PATCH=3 6 | VERSION_STRING='"WiredTiger 2.5.3: (March 26, 2015)"' 7 | 8 | AC_SUBST(VERSION_MAJOR) 9 | AC_SUBST(VERSION_MINOR) 10 | AC_SUBST(VERSION_PATCH) 11 | AC_SUBST(VERSION_STRING) 12 | 13 | VERSION_NOPATCH=2.5 14 | AC_SUBST(VERSION_NOPATCH) 15 | -------------------------------------------------------------------------------- /jstests/core/eval8.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.eval8; 3 | t.drop(); 4 | 5 | x = { a : 1 , b : 2 }; 6 | t.save( x ); 7 | x = t.findOne(); 8 | 9 | assert( x.a && x.b , "A" ); 10 | delete x.b; 11 | 12 | assert( x.a && ! x.b , "B" ) 13 | x.b = 3; 14 | assert( x.a && x.b , "C" ); 15 | assert.eq( 3 , x.b , "D" ); 16 | 17 | t.save( x ); 18 | y = t.findOne(); 19 | assert.eq( tojson( x ) , tojson( y ) , "E" ); 20 | -------------------------------------------------------------------------------- /src/mongo/util/cmdline_utils/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env.Library('cmdline_utils', ['censor_cmdline.cpp'], 6 | LIBDEPS=['$BUILD_DIR/mongo/bson']) 7 | 8 | env.CppUnitTest('censor_cmdline_test', 9 | 'censor_cmdline_test.cpp', 10 | LIBDEPS=['cmdline_utils', '$BUILD_DIR/mongo/unittest/unittest']) 11 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcre16.pc: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=/usr/local 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libpcre16 9 | Description: PCRE - Perl compatible regular expressions C library with 16 bit character support 10 | Version: 8.30 11 | Libs: -L${libdir} -lpcre16 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /src/third_party/snappy-1.1.2/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | if env.ToolchainIs('clang', 'GCC'): 6 | env = env.Clone() 7 | env.Append(CCFLAGS=['-Wno-sign-compare', '-Wno-unused-function']) 8 | 9 | env.Library( 10 | target='snappy', 11 | source=[ 12 | 'snappy-c.cc', 13 | 'snappy.cc', 14 | 'snappy-sinksource.cc', 15 | ]) 16 | -------------------------------------------------------------------------------- /jstests/core/temp_cleanup.js: -------------------------------------------------------------------------------- 1 | 2 | mydb = db.getSisterDB( "temp_cleanup_test" ) 3 | 4 | t = mydb.tempCleanup 5 | t.drop() 6 | 7 | t.insert( { x : 1 } ) 8 | 9 | res = t.mapReduce( function(){ emit(1,1); } , function(){ return 1; } , "xyz" ); 10 | printjson( res ); 11 | 12 | assert.eq( 1 , t.count() , "A1" ) 13 | assert.eq( 1 , mydb[res.result].count() , "A2" ) 14 | 15 | mydb.dropDatabase() 16 | 17 | -------------------------------------------------------------------------------- /jstests/mmap_v1/capped_server13912.js: -------------------------------------------------------------------------------- 1 | // SERVER-13912 Capped collections with size=0 are promoted to the minimum Extent size 2 | var name = "capped_server13912"; 3 | var minExtentSize = 0x1000; // from ExtentManager::minSize() 4 | 5 | var t = db.getCollection(name); 6 | t.drop(); 7 | 8 | db.createCollection(name, {capped: true , size: 0}); 9 | 10 | assert.eq(t.stats().storageSize, minExtentSize); 11 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcreposix.pc: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=/usr/local 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: libpcreposix 9 | Description: PCREPosix - Posix compatible interface to libpcre 10 | Version: 8.30 11 | Libs: -L${libdir} -lpcreposix 12 | Cflags: -I${includedir} 13 | Requires.private: libpcre 14 | -------------------------------------------------------------------------------- /jstests/core/evalg.js: -------------------------------------------------------------------------------- 1 | // SERVER-17499: Test behavior of getMore on aggregation cursor under eval command. 2 | db.evalg.drop(); 3 | for (var i = 0; i < 102; ++i){ 4 | db.evalg.insert({}); 5 | } 6 | assert.eq(102, db.eval(function() { 7 | var cursor = db.evalg.aggregate(); 8 | assert(cursor.hasNext()); 9 | assert.eq(101, cursor.objsLeftInBatch()); 10 | return cursor.itcount(); 11 | })); 12 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Aleksey Gurtovoy 2000-2004 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | 9 | // Preprocessed version of "boost/mpl/quote.hpp" header 10 | // -- DO NOT modify by hand! 11 | 12 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/medium-lsm-compact.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: medium lsm configuration 2 | conn_config="cache_size=1G,lsm_manager=(worker_thread_max=6)" 3 | table_config="lsm=(chunk_size=100MB,chunk_max=1TB),type=lsm,os_cache_dirty_max=16MB" 4 | icount=50000000 5 | populate_threads=1 6 | compact=true 7 | threads=((count=16,read=1)) 8 | run_time=120 9 | report_interval=5 10 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/update-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: lsm with inserts/updates, in memory 2 | conn_config="cache_size=1G,lsm_manager=(worker_thread_max=6)" 3 | table_config="lsm=(chunk_size=20MB),type=lsm,os_cache_dirty_max=16MB" 4 | icount=5000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | threads=((count=2,inserts=1),(count=2,reads=1),(count=2,updates=1)) 9 | -------------------------------------------------------------------------------- /jstests/core/date1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.date1; 3 | 4 | 5 | function go( d , msg ){ 6 | t.drop(); 7 | t.save({ a: 1, d: d }); 8 | // printjson(d); 9 | // printjson(t.findOne().d); 10 | assert.eq( d , t.findOne().d , msg ) 11 | } 12 | 13 | go( new Date() , "A" ) 14 | go( new Date( 1 ) , "B") 15 | go( new Date( 0 ) , "C (old spidermonkey lib fails this test)") 16 | go(new Date(-10), "neg") 17 | 18 | -------------------------------------------------------------------------------- /jstests/core/find2.js: -------------------------------------------------------------------------------- 1 | // Test object id sorting. 2 | 3 | function testObjectIdFind( db ) { 4 | r = db.ed_db_find2_oif; 5 | r.drop(); 6 | 7 | for( i = 0; i < 3; ++i ) 8 | r.save( {} ); 9 | 10 | f = r.find().sort( { _id: 1 } ); 11 | assert.eq( 3, f.count() ); 12 | assert( f[ 0 ]._id < f[ 1 ]._id ); 13 | assert( f[ 1 ]._id < f[ 2 ]._id ); 14 | } 15 | 16 | testObjectIdFind( db ); 17 | -------------------------------------------------------------------------------- /jstests/core/find_and_modify_server7660.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.find_and_modify_server7660; 3 | t.drop(); 4 | 5 | a = t.findAndModify({ 6 | query : { foo : 'bar' }, 7 | update : { $set : { bob : 'john' } }, 8 | sort: { foo : 1}, 9 | upsert: true, 10 | new : true 11 | }); 12 | 13 | b = t.findOne(); 14 | assert.eq( a, b ); 15 | assert.eq( "bar", a.foo ); 16 | assert.eq( "john", a.bob ) 17 | 18 | 19 | -------------------------------------------------------------------------------- /jstests/core/where3.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.where3; 3 | t.drop() 4 | 5 | t.save( { returned_date : 5 } ); 6 | t.save( { returned_date : 6 } ); 7 | 8 | assert.eq( 1 , t.find( function(){ return this.returned_date == 5; } ).count() , "A" ); 9 | assert.eq( 1 , t.find( { $where : "return this.returned_date == 5;" } ).count() , "B" ); 10 | assert.eq( 1 , t.find( { $where : "this.returned_date == 5;" } ).count() , "C" ); 11 | -------------------------------------------------------------------------------- /jstests/tool/dumpfilename1.js: -------------------------------------------------------------------------------- 1 | //dumpfilename1.js 2 | 3 | //Test designed to make sure error that dumping a collection with "/" fails 4 | 5 | t = new ToolTest( "dumpfilename1" ); 6 | 7 | t.startDB( "foo" ); 8 | 9 | c = t.db; 10 | assert.writeOK(c.getCollection("df/").insert({ a: 3 })); 11 | assert(t.runTool( "dump" , "--out" , t.ext ) != 0, "dump should fail with non-zero return code") 12 | t.stop(); 13 | 14 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcre.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library with 8 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/libpcre.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre 9 | Description: PCRE - Perl compatible regular expressions C library with 8 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/parallel-pop-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Run populate thread multi-threaded and with groups 2 | # of operations in each transaction. 3 | conn_config="cache_size=200MB" 4 | table_config="type=lsm,os_cache_dirty_max=16MB" 5 | transaction_config="isolation=snapshot" 6 | icount=10000000 7 | report_interval=5 8 | populate_ops_per_txn=100 9 | populate_threads=5 10 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server10530.js: -------------------------------------------------------------------------------- 1 | // SERVER-10530 Would error if large objects are in first batch 2 | 3 | var t = db.server10530; 4 | t.drop(); 5 | 6 | t.insert({big: Array(1024*1024).toString()}); 7 | t.insert({big: Array(16*1024*1024 - 1024).toString()}); 8 | t.insert({big: Array(1024*1024).toString()}); 9 | 10 | assert.eq(t.aggregate().itcount(), 3); 11 | 12 | // clean up large collection 13 | t.drop(); 14 | -------------------------------------------------------------------------------- /jstests/core/array_match3.js: -------------------------------------------------------------------------------- 1 | // SERVER-2902 Test indexing of numerically referenced array elements. 2 | 3 | t = db.jstests_array_match3; 4 | t.drop(); 5 | 6 | // Test matching numericallly referenced array element. 7 | t.save( {a:{'0':5}} ); 8 | t.save( {a:[5]} ); 9 | assert.eq( 2, t.count( {'a.0':5} ) ); 10 | 11 | // Test with index. 12 | t.ensureIndex( {'a.0':1} ); 13 | assert.eq( 2, t.count( {'a.0':5} ) ); 14 | -------------------------------------------------------------------------------- /jstests/core/date2.js: -------------------------------------------------------------------------------- 1 | // Check that it's possible to compare a Date to a Timestamp, but they are never equal - SERVER-3304 2 | 3 | t = db.jstests_date2; 4 | t.drop(); 5 | 6 | t.ensureIndex( {a:1} ); 7 | 8 | var obj = {a:new Timestamp(0, 1)}; // in old versions this was == to new Date(1) 9 | t.save( obj ); 10 | assert.eq( 0, t.find( {a:{$gt:new Date(1)}} ).itcount() ); 11 | assert.eq( 1, t.find(obj).itcount() ); 12 | -------------------------------------------------------------------------------- /jstests/core/rename2.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | a = db.rename2a; 4 | b = db.rename2b; 5 | 6 | a.drop(); 7 | b.drop(); 8 | 9 | a.save( { x : 1 } ) 10 | a.save( { x : 2 } ) 11 | a.save( { x : 3 } ) 12 | 13 | assert.eq( 3 , a.count() , "A" ) 14 | assert.eq( 0 , b.count() , "B" ) 15 | 16 | assert( a.renameCollection( "rename2b" ) , "the command" ); 17 | 18 | assert.eq( 0 , a.count() , "C" ) 19 | assert.eq( 3 , b.count() , "D" ) 20 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcre16.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre16 9 | Description: PCRE - Perl compatible regular expressions C library with 16 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre16 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/libpcre16.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre16 9 | Description: PCRE - Perl compatible regular expressions C library with 16 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre16 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/libpcre32.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcre32 9 | Description: PCRE - Perl compatible regular expressions C library with 32 bit character support 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcre32 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server5973.js: -------------------------------------------------------------------------------- 1 | // https://jira.mongodb.org/browse/SERVER-5369 2 | // correctly sort dates before 1970 3 | 4 | // use the aggregation test db 5 | db = db.getSiblingDB('aggdb'); 6 | 7 | db.test.drop(); 8 | db.test.insert({d:ISODate('1950-01-01')}) 9 | db.test.insert({d:ISODate('1980-01-01')}) 10 | 11 | var out = db.test.aggregate({$sort:{d:1}}).toArray(); 12 | 13 | assert.lt(out[0].d, out[1].d) 14 | -------------------------------------------------------------------------------- /jstests/core/db.js: -------------------------------------------------------------------------------- 1 | function testInvalidDBNameThrowsExceptionWithConstructor() { 2 | assert.throws( function() { return new DB( null, "/\\" ); } ); 3 | } 4 | 5 | function testInvalidDBNameThrowsExceptionWithSibling() { 6 | assert.throws( function() { return db.getSiblingDB( "/\\" ); } ); 7 | } 8 | 9 | testInvalidDBNameThrowsExceptionWithConstructor(); 10 | testInvalidDBNameThrowsExceptionWithSibling(); 11 | 12 | -------------------------------------------------------------------------------- /jstests/core/remove3.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.remove3; 3 | t.drop(); 4 | 5 | for ( i=1; i<=8; i++){ 6 | t.save( { _id : i , x : i } ); 7 | } 8 | 9 | assert.eq( 8 , t.count() , "A" ); 10 | 11 | t.remove( { x : { $lt : 5 } } ); 12 | assert.eq( 4 , t.count() , "B" ); 13 | 14 | t.remove( { _id : 5 } ); 15 | assert.eq( 3 , t.count() , "C" ); 16 | 17 | t.remove( { _id : { $lt : 8 } } ); 18 | assert.eq( 1 , t.count() , "D" ); 19 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/functional/hash_fwd.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2005-2009 Daniel James. 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #if defined(BOOST_HAS_PRAGMA_ONCE) 8 | #pragma once 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/ext/compressors/lz4/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include 2 | 3 | if HAVE_BUILTIN_EXTENSION_LZ4 4 | noinst_LTLIBRARIES = libwiredtiger_lz4.la 5 | else 6 | lib_LTLIBRARIES = libwiredtiger_lz4.la 7 | libwiredtiger_lz4_la_LDFLAGS = -avoid-version -module 8 | endif 9 | 10 | libwiredtiger_lz4_la_SOURCES = lz4_compress.c 11 | libwiredtiger_lz4_la_LIBADD = -llz4 12 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/ext/compressors/zlib/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include 2 | 3 | if HAVE_BUILTIN_EXTENSION_ZLIB 4 | noinst_LTLIBRARIES = libwiredtiger_zlib.la 5 | else 6 | lib_LTLIBRARIES = libwiredtiger_zlib.la 7 | libwiredtiger_zlib_la_LDFLAGS = -avoid-version -module 8 | endif 9 | libwiredtiger_zlib_la_SOURCES = zlib_compress.c 10 | libwiredtiger_zlib_la_LIBADD = -lz 11 | -------------------------------------------------------------------------------- /jstests/core/bad_index_plugin.js: -------------------------------------------------------------------------------- 1 | // SERVER-5826 ensure you can't build an index with a non-existent plugin 2 | t = db.bad_index_plugin; 3 | 4 | assert.commandWorked(t.ensureIndex({ good: 1 })); 5 | assert.eq(t.getIndexes().length, 2); // good + _id 6 | 7 | var err = t.ensureIndex({bad: 'bad'}); 8 | assert.commandFailed(err); 9 | assert(err.code >= 0); 10 | 11 | assert.eq(t.getIndexes().length, 2); // good + _id (no bad) 12 | -------------------------------------------------------------------------------- /jstests/core/count4.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.count4; 3 | t.drop(); 4 | 5 | for ( i=0; i<100; i++ ){ 6 | t.save( { x : i } ); 7 | } 8 | 9 | q = { x : { $gt : 25 , $lte : 75 } } 10 | 11 | assert.eq( 50 , t.find( q ).count() , "A" ); 12 | assert.eq( 50 , t.find( q ).itcount() , "B" ); 13 | 14 | t.ensureIndex( { x : 1 } ); 15 | 16 | assert.eq( 50 , t.find( q ).count() , "C" ); 17 | assert.eq( 50 , t.find( q ).itcount() , "D" ); 18 | -------------------------------------------------------------------------------- /jstests/core/error2.js: -------------------------------------------------------------------------------- 1 | // Test that client gets stack trace on failed invoke 2 | 3 | f = db.jstests_error2; 4 | 5 | f.drop(); 6 | 7 | f.save( {a:1} ); 8 | 9 | assert.throws( 10 | function(){ 11 | c = f.find({$where : function(){ return a() }}); 12 | c.next(); 13 | } 14 | ); 15 | 16 | assert.throws( 17 | function(){ 18 | db.eval( function() { return a(); } ); 19 | } 20 | ); 21 | 22 | -------------------------------------------------------------------------------- /jstests/core/geo_s2selfintersectingpoly.js: -------------------------------------------------------------------------------- 1 | var t = db.geo_s2selfintersectingpoly; 2 | t.drop(); 3 | t.ensureIndex({geo: "2dsphere"}); 4 | 5 | var intersectingPolygon = {"type": "Polygon", "coordinates": [ 6 | [[0.0, 0.0], [0.0, 4.0], [-3.0, 2.0], [1.0, 2.0], [0.0, 0.0]] 7 | ]}; 8 | /* 9 | * Self intersecting polygons should cause a parse exception. 10 | */ 11 | assert.writeError(t.insert({geo : intersectingPolygon})); 12 | -------------------------------------------------------------------------------- /jstests/core/objid1.js: -------------------------------------------------------------------------------- 1 | t = db.objid1; 2 | t.drop(); 3 | 4 | b = new ObjectId(); 5 | assert( b.str , "A" ); 6 | 7 | a = new ObjectId( b.str ); 8 | assert.eq( a.str , b.str , "B" ); 9 | 10 | t.save( { a : a } ) 11 | assert( t.findOne().a.isObjectId , "C" ); 12 | assert.eq( a.str , t.findOne().a.str , "D" ); 13 | 14 | x = { a : new ObjectId() }; 15 | eval( " y = " + tojson( x ) ); 16 | assert.eq( x.a.str , y.a.str , "E" ); 17 | -------------------------------------------------------------------------------- /jstests/core/objid7.js: -------------------------------------------------------------------------------- 1 | 2 | a = new ObjectId( "4c1a478603eba73620000000" ) 3 | b = new ObjectId( "4c1a478603eba73620000000" ) 4 | c = new ObjectId(); 5 | 6 | assert.eq( a.toString() , b.toString() , "A" ) 7 | assert.eq( a.toString() , "ObjectId(\"4c1a478603eba73620000000\")" , "B" ); 8 | 9 | assert( a.equals( b ) , "C" ) 10 | 11 | assert.neq( a.toString() , c.toString() , "D" ); 12 | assert( ! a.equals( c ) , "E" ); 13 | 14 | -------------------------------------------------------------------------------- /jstests/core/test_command_line_test_helpers.js: -------------------------------------------------------------------------------- 1 | load('jstests/libs/command_line/test_parsed_options.js'); 2 | 3 | assert.docEq({ x : 1, y : 1 }, mergeOptions({ x : 1 }, { y : 1 })); 4 | assert.docEq({ x : 1, y : 1 }, mergeOptions({ x : 1, y : 2 }, { y : 1 })); 5 | assert.docEq({ x : { z : 1 }, y : 1 }, mergeOptions({ x : { z : 1 } }, { y : 1 })); 6 | assert.docEq({ x : { z : 1 } }, mergeOptions({ x : { z : 2 } }, { x : { z : 1 } })); 7 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Aleksey Gurtovoy 2001-2004 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | 9 | // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header 10 | // -- DO NOT modify by hand! 11 | 12 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_dutch.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * dutch_UTF_8_create_env(void); 9 | extern void dutch_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int dutch_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/libpcreposix.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcreposix 9 | Description: PCREPosix - Posix compatible interface to libpcre 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcreposix 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | Requires.private: libpcre 14 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/libpcreposix.pc.in: -------------------------------------------------------------------------------- 1 | # Package Information for pkg-config 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: libpcreposix 9 | Description: PCREPosix - Posix compatible interface to libpcre 10 | Version: @PACKAGE_VERSION@ 11 | Libs: -L${libdir} -lpcreposix 12 | Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ 13 | Requires.private: libpcre 14 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/medium-lsm-async.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: medium lsm configuration using async operations 2 | conn_config="cache_size=1G,lsm_manager=(worker_thread_max=6)" 3 | async_threads=10 4 | table_config="lsm=(chunk_size=100MB),type=lsm,os_cache_dirty_max=16MB" 5 | icount=50000000 6 | report_interval=5 7 | run_time=120 8 | populate_threads=1 9 | threads=((count=5,reads=1,updates=2)) 10 | -------------------------------------------------------------------------------- /jstests/core/eval_nolock.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.eval_nolock 3 | t.drop(); 4 | 5 | for ( i=0; i<10; i++ ) 6 | t.insert( { _id : i } ); 7 | 8 | res = db.runCommand( { eval : 9 | function(){ 10 | db.eval_nolock.insert( { _id : 123 } ); 11 | return db.eval_nolock.count(); 12 | } 13 | , nolock : true } ); 14 | 15 | assert.eq( 11 , res.retval , "A" ) 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/library/c/_prefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2008-2013 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_LIBRARY_C__PREFIX_H 9 | #define BOOST_PREDEF_LIBRARY_C__PREFIX_H 10 | 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/other.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2013 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_OTHER_H 9 | #define BOOST_PREDEF_OTHER_H 10 | 11 | #include 12 | /*#include */ 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_danish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * danish_UTF_8_create_env(void); 9 | extern void danish_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int danish_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_french.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * french_UTF_8_create_env(void); 9 | extern void french_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int french_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_german.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * german_UTF_8_create_env(void); 9 | extern void german_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int german_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_porter.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * porter_UTF_8_create_env(void); 9 | extern void porter_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int porter_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/src/os_posix/os_yield.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2014-2015 MongoDB, Inc. 3 | * Copyright (c) 2008-2014 WiredTiger, Inc. 4 | * All rights reserved. 5 | * 6 | * See the file LICENSE for redistribution information. 7 | */ 8 | 9 | #include "wt_internal.h" 10 | 11 | /* 12 | * __wt_yield -- 13 | * Yield the thread of control. 14 | */ 15 | void 16 | __wt_yield(void) 17 | { 18 | sched_yield(); 19 | } 20 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/src/os_win/os_yield.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2014-2015 MongoDB, Inc. 3 | * Copyright (c) 2008-2014 WiredTiger, Inc. 4 | * All rights reserved. 5 | * 6 | * See the file LICENSE for redistribution information. 7 | */ 8 | 9 | #include "wt_internal.h" 10 | 11 | /* 12 | * __wt_yield -- 13 | * Yield the thread of control. 14 | */ 15 | void 16 | __wt_yield(void) 17 | { 18 | SwitchToThread(); 19 | } 20 | -------------------------------------------------------------------------------- /jstests/core/fts_partition_no_multikey.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.fts_partition_no_multikey; 3 | t.drop(); 4 | 5 | t.ensureIndex( { x : 1, y : "text" } ) 6 | 7 | assert.writeOK( t.insert( { x : 5 , y : "this is fun" } )); 8 | 9 | assert.writeError( t.insert( { x : [] , y : "this is fun" } )); 10 | 11 | assert.writeError( t.insert( { x : [1] , y : "this is fun" } )); 12 | 13 | assert.writeError( t.insert( { x : [1,2] , y : "this is fun" } )); 14 | -------------------------------------------------------------------------------- /jstests/core/set4.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.set4; 3 | t.drop(); 4 | 5 | orig = { _id:1 , a : [ { x : 1 } ]} 6 | t.insert( orig ); 7 | 8 | t.update( {}, { $set : { 'a.0.x' : 2, 'foo.bar' : 3 } } ); 9 | orig.a[0].x = 2; orig.foo = { bar : 3 } 10 | assert.eq( orig , t.findOne() , "A" ); 11 | 12 | t.update( {}, { $set : { 'a.0.x' : 4, 'foo.bar' : 5 } } ); 13 | orig.a[0].x = 4; orig.foo.bar = 5; 14 | assert.eq( orig , t.findOne() , "B" ); 15 | 16 | -------------------------------------------------------------------------------- /jstests/core/update_arraymatch6.js: -------------------------------------------------------------------------------- 1 | var res; 2 | t = db.jstests_update_arraymatch6; 3 | t.drop(); 4 | 5 | function doTest() { 6 | t.save( {a: [{id: 1, x: [5,6,7]}, {id: 2, x: [8,9,10]}]} ); 7 | res = t.update({'a.id': 1}, {$set: {'a.$.x': [1,1,1]}}); 8 | assert.writeOK( res ) 9 | assert.eq.automsg( "1", "t.findOne().a[ 0 ].x[ 0 ]" ); 10 | } 11 | 12 | doTest(); 13 | t.drop(); 14 | t.ensureIndex( { 'a.id':1 } ); 15 | doTest(); -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/library.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2008-2012 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_LIBRARY_H 9 | #define BOOST_PREDEF_LIBRARY_H 10 | 11 | #include 12 | #include 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_KOI8_R_russian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * russian_KOI8_R_create_env(void); 9 | extern void russian_KOI8_R_close_env(struct SN_env * z); 10 | 11 | extern int russian_KOI8_R_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_english.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * english_UTF_8_create_env(void); 9 | extern void english_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int english_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_finnish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * finnish_UTF_8_create_env(void); 9 | extern void finnish_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int finnish_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_italian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * italian_UTF_8_create_env(void); 9 | extern void italian_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int italian_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_romanian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * romanian_UTF_8_create_env(void); 9 | extern void romanian_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int romanian_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_russian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * russian_UTF_8_create_env(void); 9 | extern void russian_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int russian_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_spanish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * spanish_UTF_8_create_env(void); 9 | extern void spanish_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int spanish_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_swedish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * swedish_UTF_8_create_env(void); 9 | extern void swedish_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int swedish_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_turkish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * turkish_UTF_8_create_env(void); 9 | extern void turkish_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int turkish_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /jstests/core/eval1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.eval1; 3 | t.drop(); 4 | 5 | t.save( { _id : 1 , name : "eliot" } ); 6 | t.save( { _id : 2 , name : "sara" } ); 7 | 8 | f = function(id){ 9 | return db["eval1"].findOne( { _id : id } ).name; 10 | } 11 | 12 | 13 | assert.eq( "eliot" , f( 1 ) , "A" ); 14 | assert.eq( "sara" , f( 2 ) , "B" ); 15 | assert.eq( "eliot" , db.eval( f , 1 ) , "C" ); 16 | assert.eq( "sara" , db.eval( f , 2 ) , "D" ); 17 | 18 | -------------------------------------------------------------------------------- /jstests/core/set5.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.set5; 3 | t.drop(); 4 | 5 | function check( want , err ){ 6 | var x = t.findOne(); 7 | delete x._id; 8 | assert.docEq( want , x , err ); 9 | } 10 | 11 | t.update( { a : 5 } , { $set : { a : 6 , b : null } } , true ); 12 | check( { a : 6 , b : null } , "A" ) 13 | 14 | t.drop(); 15 | 16 | t.update( { z : 5 } , { $set : { z : 6 , b : null } } , true ); 17 | check( { b : null , z : 6 } , "B" ) 18 | -------------------------------------------------------------------------------- /jstests/noPassthrough/devnull.js: -------------------------------------------------------------------------------- 1 | port = 30201; 2 | 3 | mongo = startMongodEmpty("--port", port, 4 | "--dbpath", MongoRunner.dataPath + this.name, 5 | "--smallfiles", 6 | "--storageEngine", "devnull" ); 7 | 8 | db = mongo.getDB( "test" ); 9 | 10 | res = db.foo.insert( { x : 1 } ); 11 | assert.eq( 1, res.nInserted, tojson( res ) ); 12 | 13 | stopMongod( port ); 14 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_hungarian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * hungarian_UTF_8_create_env(void); 9 | extern void hungarian_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int hungarian_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_norwegian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * norwegian_UTF_8_create_env(void); 9 | extern void norwegian_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int norwegian_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.30/makevp_c.txt: -------------------------------------------------------------------------------- 1 | pcre_byte_order.c 2 | pcre_chartables.c 3 | pcre_compile.c 4 | pcre_config.c 5 | pcre_dfa_exec.c 6 | pcre_exec.c 7 | pcre_fullinfo.c 8 | pcre_get.c 9 | pcre_globals.c 10 | pcre_info.c 11 | pcre_maketables.c 12 | pcre_newline.c 13 | pcre_ord2utf8.c 14 | pcre_refcount.c 15 | pcre_study.c 16 | pcre_tables.c 17 | pcre_ucd.c 18 | pcre_valid_utf8.c 19 | pcre_version.c 20 | pcre_xclass.c 21 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/ext/compressors/snappy/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include 2 | 3 | if HAVE_BUILTIN_EXTENSION_SNAPPY 4 | noinst_LTLIBRARIES = libwiredtiger_snappy.la 5 | else 6 | lib_LTLIBRARIES = libwiredtiger_snappy.la 7 | libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module 8 | endif 9 | libwiredtiger_snappy_la_SOURCES = snappy_compress.c 10 | libwiredtiger_snappy_la_LIBADD = -lsnappy 11 | -------------------------------------------------------------------------------- /jstests/core/regex9.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.regex9; 3 | t.drop(); 4 | 5 | t.insert( { _id : 1 , a : [ "a" , "b" , "c" ] } ) 6 | t.insert( { _id : 2 , a : [ "a" , "b" , "c" , "d" ] } ) 7 | t.insert( { _id : 3 , a : [ "b" , "c" , "d" ] } ) 8 | 9 | assert.eq( 2 , t.find( { a : /a/ } ).itcount() , "A1" ) 10 | assert.eq( 2 , t.find( { a : { $regex : "a" } } ).itcount() , "A2" ) 11 | assert.eq( 2 , t.find( { a : { $regex : /a/ } } ).itcount() , "A3" ) 12 | -------------------------------------------------------------------------------- /jstests/core/updatec.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.updatec; 3 | t.drop(); 4 | 5 | t.update( { "_id" : 123 }, { $set : { "v" : { "i" : 123, "a":456 } }, $push : { "f" : 234} }, 1, 0 ); 6 | t.update( { "_id" : 123 }, { $set : { "v" : { "i" : 123, "a":456 } }, $push : { "f" : 234} }, 1, 0 ); 7 | 8 | assert.docEq( 9 | { 10 | "_id" : 123, 11 | "f" : [ 234, 234 ] , 12 | "v" : { "i" : 123, "a" : 456 } 13 | } , t.findOne() ); 14 | 15 | -------------------------------------------------------------------------------- /jstests/libs/config_files/set_component_verbosity.json: -------------------------------------------------------------------------------- 1 | { 2 | "systemLog" : { 3 | "verbosity" : 2, 4 | "component" : { 5 | "accessControl" : { 6 | "verbosity" : 0 7 | }, 8 | "storage" : { 9 | "verbosity" : 3, 10 | "journal" : { 11 | "verbosity" : 5 12 | } 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /jstests/repl/repair.js: -------------------------------------------------------------------------------- 1 | // Test repair on master 2 | 3 | var baseName = "jstests_repl_repair"; 4 | 5 | rt = new ReplTest( baseName ); 6 | 7 | m = rt.start( true ); 8 | 9 | m.getDB( baseName )[ baseName ].save( {} ); 10 | var c = m.getDB( 'local' ).oplog.$main.count(); 11 | assert.automsg( "c > 0" ); 12 | 13 | assert.commandWorked( m.getDB( "local" ).repairDatabase() ); 14 | assert.automsg( "c <= m.getDB( 'local' ).oplog.$main.count()" ); 15 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_dutch.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * dutch_ISO_8859_1_create_env(void); 9 | extern void dutch_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int dutch_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_UTF_8_portuguese.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * portuguese_UTF_8_create_env(void); 9 | extern void portuguese_UTF_8_close_env(struct SN_env * z); 10 | 11 | extern int portuguese_UTF_8_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/log.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Test performance with a log file enabled. 2 | # Set the log file small to catch log-swtich bottlenecks. 3 | conn_config="cache_size=1G,log=(enabled=true,file_max=200K),checkpoint=(log_size=500MB)" 4 | table_config="type=file" 5 | icount=50000 6 | report_interval=5 7 | run_time=120 8 | populate_threads=1 9 | random_range=50000000 10 | threads=((count=8,inserts=1)) 11 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/medium-multi-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: medium lsm configuration, with multiple tables. 2 | conn_config="cache_size=1G,lsm_manager=(worker_thread_max=8)" 3 | table_config="lsm=(chunk_max=1TB),type=lsm,os_cache_dirty_max=16MB" 4 | icount=50000000 5 | populate_threads=1 6 | compact=true 7 | threads=((count=8,read=1),(count=8,update=1)) 8 | run_time=180 9 | report_interval=5 10 | table_count=4 11 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/update-large-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: lsm with inserts/updates, in memory 2 | conn_config="cache_size=2G,lsm_manager=(worker_thread_max=6)" 3 | table_config="lsm=(chunk_size=50MB),type=lsm,os_cache_dirty_max=16MB" 4 | icount=200000000 5 | report_interval=5 6 | run_time=1200 7 | populate_threads=10 8 | compact=true 9 | threads=((count=2,inserts=1),(count=10,reads=1),(count=2,updates=1)) 10 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/src/include/compact.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2014-2015 MongoDB, Inc. 3 | * Copyright (c) 2008-2014 WiredTiger, Inc. 4 | * All rights reserved. 5 | * 6 | * See the file LICENSE for redistribution information. 7 | */ 8 | 9 | struct __wt_compact { 10 | uint32_t lsm_count; /* Number of LSM trees seen */ 11 | uint32_t file_count; /* Number of files seen */ 12 | uint64_t max_time; /* Configured timeout */ 13 | }; 14 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6185.js: -------------------------------------------------------------------------------- 1 | // projecting a non-existent subfield should work as it does in a query with projection 2 | c = db.c; 3 | c.drop(); 4 | 5 | c.save({a:[1]}); 6 | c.save({a:{c:1}}); 7 | c.save({a:[{c:1},{b:1,c:1},{c:1}]}); 8 | c.save({a:1}); 9 | c.save({b:1}); 10 | 11 | // assert the aggregation and the query produce the same thing 12 | assert.eq(c.aggregate({$project:{'a.b':1}}).toArray(), c.find({}, {'a.b':1}).toArray()); 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/detail/_exception.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2011-2012 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_DETAIL__EXCEPTION_H 9 | #define BOOST_PREDEF_DETAIL__EXCEPTION_H 10 | 11 | #if defined(__cpluplus) 12 | #include 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_danish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * danish_ISO_8859_1_create_env(void); 9 | extern void danish_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int danish_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_french.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * french_ISO_8859_1_create_env(void); 9 | extern void french_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int french_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_german.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * german_ISO_8859_1_create_env(void); 9 | extern void german_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int german_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_porter.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * porter_ISO_8859_1_create_env(void); 9 | extern void porter_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int porter_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/log-nockpt.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Test performance with a log file enabled. 2 | # Set the log file reasonably small to catch log-swtich bottle 3 | # necks. 4 | conn_config="cache_size=1G,log=(enabled=true,file_max=20MB)" 5 | table_config="type=file" 6 | icount=50000 7 | report_interval=5 8 | run_time=40 9 | populate_threads=1 10 | random_range=50000000 11 | threads=((count=8,inserts=1)) 12 | 13 | -------------------------------------------------------------------------------- /jstests/core/capped.js: -------------------------------------------------------------------------------- 1 | db.jstests_capped.drop(); 2 | db.createCollection("jstests_capped", {capped:true, size:30000}); 3 | 4 | t = db.jstests_capped; 5 | assert.eq( 1, t.getIndexes().length, "expected a count of one index for new capped collection" ); 6 | 7 | 8 | t.save({x:1}); 9 | t.save({x:2}); 10 | 11 | assert( t.find().sort({$natural:1})[0].x == 1 , "expected obj.x==1"); 12 | assert( t.find().sort({$natural:-1})[0].x == 2, "expected obj.x == 2"); 13 | -------------------------------------------------------------------------------- /jstests/core/objid4.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | o = new ObjectId(); 5 | assert( o.str ); 6 | 7 | a = new ObjectId( o.str ); 8 | assert.eq( o.str , a.str ); 9 | assert.eq( a.str , a.str.toString() ) 10 | 11 | b = ObjectId( o.str ); 12 | assert.eq( o.str , b.str ); 13 | assert.eq( b.str , b.str.toString() ) 14 | 15 | assert.throws( function(z){ return new ObjectId( "a" ); } ); 16 | assert.throws( function(z){ return new ObjectId( "12345678901234567890123z" ); } ); 17 | -------------------------------------------------------------------------------- /jstests/core/remove8.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.remove8; 3 | t.drop(); 4 | 5 | N = 1000; 6 | 7 | function fill(){ 8 | for ( var i=0; i 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_english.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * english_ISO_8859_1_create_env(void); 9 | extern void english_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int english_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_finnish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * finnish_ISO_8859_1_create_env(void); 9 | extern void finnish_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int finnish_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_italian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * italian_ISO_8859_1_create_env(void); 9 | extern void italian_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int italian_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_spanish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * spanish_ISO_8859_1_create_env(void); 9 | extern void spanish_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int spanish_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_swedish.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * swedish_ISO_8859_1_create_env(void); 9 | extern void swedish_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int swedish_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_2_romanian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * romanian_ISO_8859_2_create_env(void); 9 | extern void romanian_ISO_8859_2_close_env(struct SN_env * z); 10 | 11 | extern int romanian_ISO_8859_2_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/long-txn-btree.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: run autocommit and long transactions in parallel. 2 | conn_config="cache_size=500MB" 3 | table_config="type=file" 4 | icount=5000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | # Have a long running reader, throttled to a max of 5000 ops per second. 9 | threads=((count=4,reads=1,updates=1),(count=1,reads=1,ops_per_txn=100000,throttle=5000)) 10 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server4738.js: -------------------------------------------------------------------------------- 1 | // test to make sure we accept all numeric types for inclusion 2 | c = db.blah; 3 | c.drop(); 4 | c.save({key: 4, v: 3, x: 2}); 5 | 6 | var r = c.aggregate( 7 | { "$project" : { 8 | "_id" : 0, 9 | "key" : NumberLong(1), 10 | "v" : 1, /* javascript: really a double */ 11 | "x" : NumberInt(1) 12 | }}); 13 | 14 | assert.eq(r.toArray(), [{key: 4, v: 3, x: 2}], "support204 failed"); 15 | -------------------------------------------------------------------------------- /jstests/core/push2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.push2 3 | t.drop() 4 | 5 | t.save( { _id : 1 , a : [] } ) 6 | 7 | s = new Array(700000).toString(); 8 | 9 | gotError = null; 10 | 11 | for ( x=0; x<100; x++ ){ 12 | print (x + " pushes"); 13 | var res = t.update( {} , { $push : { a : s } } ); 14 | gotError = res.hasWriteError(); 15 | if ( gotError ) 16 | break; 17 | } 18 | 19 | assert( gotError , "should have gotten error" ); 20 | 21 | t.drop(); 22 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * hungarian_ISO_8859_1_create_env(void); 9 | extern void hungarian_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int hungarian_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * norwegian_ISO_8859_1_create_env(void); 9 | extern void norwegian_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int norwegian_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /jstests/sharding/sync3.js: -------------------------------------------------------------------------------- 1 | // NOTE: this test is skipped when running smoke.py with --auth or --keyFile to force authentication 2 | // in all tests. 3 | var bitbucket = _isWindows() ? "NUL" : "/dev/null"; 4 | test = new SyncCCTest( "sync3" )//, { logpath : bitbucket } ) 5 | 6 | x = test._connections[0].getDB( "admin" ).runCommand( { "_testDistLockWithSyncCluster" : 1 , host : test.url } ) 7 | printjson( x ) 8 | assert( x.ok ); 9 | 10 | 11 | 12 | test.stop(); 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/exception_ptr.hpp: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. 2 | 3 | //Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593 7 | #define UUID_FA5836A2CADA11DC8CD47C8555D89593 8 | 9 | #include 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/third_party/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.h: -------------------------------------------------------------------------------- 1 | 2 | /* This file was generated automatically by the Snowball to ANSI C compiler */ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern struct SN_env * portuguese_ISO_8859_1_create_env(void); 9 | extern void portuguese_ISO_8859_1_close_env(struct SN_env * z); 10 | 11 | extern int portuguese_ISO_8859_1_stem(struct SN_env * z); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /jstests/core/geo_invalid_2d_params.js: -------------------------------------------------------------------------------- 1 | var t = db.geo_invalid_2d_params; 2 | t.drop(); 3 | 4 | assert.commandFailed(t.ensureIndex({ loc : "2d" }, { bits : 33 })); 5 | assert.commandFailed(t.ensureIndex({ loc : "2d" }, { min : -1, max : -1 })); 6 | assert.commandFailed(t.ensureIndex({ loc : "2d" }, { bits : -1 })); 7 | assert.commandFailed(t.ensureIndex({ loc : "2d" }, { min : 10, max : 9 })); 8 | assert.commandWorked(t.ensureIndex({ loc : "2d" }, { bits : 1, min : -1, max : 1 })); -------------------------------------------------------------------------------- /jstests/core/ork.js: -------------------------------------------------------------------------------- 1 | // SERVER-2585 Test $or clauses within indexed top level $or clauses. 2 | 3 | t = db.jstests_ork; 4 | t.drop(); 5 | 6 | t.ensureIndex( {a:1} ); 7 | t.save( {a:[1,2],b:5} ); 8 | t.save( {a:[2,4],b:5} ); 9 | 10 | assert.eq( 2, t.find( {$or:[{a:1,$and:[{$or:[{a:2},{a:3}]},{$or:[{b:5}]}]},{a:2,$or:[{a:3},{a:4}]}]} ).itcount() ); 11 | assert.eq( 1, t.find( {$or:[{a:1,$and:[{$or:[{a:2},{a:3}]},{$or:[{b:6}]}]},{a:2,$or:[{a:3},{a:4}]}]} ).itcount() ); 12 | -------------------------------------------------------------------------------- /jstests/core/update_multi4.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_mulit4; 3 | t.drop(); 4 | 5 | for(i=0;i<1000;i++){ 6 | t.insert( { _id:i , 7 | k:i%12, 8 | v:"v"+i%12 } ); 9 | } 10 | 11 | t.ensureIndex({k:1}) 12 | 13 | assert.eq( 84 , t.count({k:2,v:"v2"} ) , "A0" ); 14 | 15 | t.update({k:2},{$set:{v:"two v2"}},false,true) 16 | 17 | assert.eq( 0 , t.count({k:2,v:"v2"} ) , "A1" ); 18 | assert.eq( 84 , t.count({k:2,v:"two v2"} ) , "A2" ); 19 | -------------------------------------------------------------------------------- /jstests/mmap_v1/list_indexes2.js: -------------------------------------------------------------------------------- 1 | // test listIndexes compatability command and system.indexes 2 | 3 | t = db.list_indexes2; 4 | t.drop(); 5 | 6 | t.insert( { x : 1 } ); 7 | 8 | assert.eq( t._getIndexesSystemIndexes(), 9 | t._getIndexesCommand() ); 10 | 11 | t.ensureIndex( { x : 1 } ); 12 | 13 | assert.eq( t._getIndexesSystemIndexes(), 14 | t._getIndexesCommand() ); 15 | 16 | assert.eq( t.getIndexes(), 17 | t._getIndexesCommand() ); 18 | -------------------------------------------------------------------------------- /src/mongo/db/db.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | ///////////////////////////////////////////////////////////////////////////// 6 | // 7 | // Icon 8 | // 9 | // Icon with lowest ID value placed first to ensure application icon 10 | // remains consistent on all systems. 11 | IDI_ICON2 ICON "mongo.ico" 12 | ///////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /src/mongo/util/concurrency/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env.Library('thread_name', 6 | ['thread_name.cpp'], 7 | LIBDEPS=['$BUILD_DIR/mongo/base/base', 8 | '$BUILD_DIR/third_party/shim_boost']) 9 | 10 | env.Library('ticketholder', 11 | ['ticketholder.cpp'], 12 | LIBDEPS=['$BUILD_DIR/mongo/base/base', 13 | '$BUILD_DIR/third_party/shim_boost']) 14 | -------------------------------------------------------------------------------- /jstests/core/ne2.js: -------------------------------------------------------------------------------- 1 | // check that we don't scan $ne values 2 | 3 | t = db.jstests_ne2; 4 | t.drop(); 5 | t.ensureIndex( {a:1} ); 6 | 7 | t.save( { a:-0.5 } ); 8 | t.save( { a:0 } ); 9 | t.save( { a:0 } ); 10 | t.save( { a:0.5 } ); 11 | 12 | e = t.find( { a: { $ne: 0 } } ).explain( true ); 13 | assert.eq( 2, e.executionStats.nReturned, 'A' ); 14 | 15 | e = t.find( { a: { $gt: -1, $lt: 1, $ne: 0 } } ).explain( true ); 16 | assert.eq( 2, e.executionStats.nReturned, 'B' ); 17 | -------------------------------------------------------------------------------- /jstests/core/pop_server_13516.js: -------------------------------------------------------------------------------- 1 | // Regression test for SERVER-13516 crash 2 | 3 | var t = db.jstests_pop_server_13516; 4 | t.drop(); 5 | 6 | var id = NumberInt(0); 7 | var object = { 8 | _id : id, 9 | data : [] 10 | }; 11 | 12 | for (var i = 0; i < 4096; i++) { 13 | object.data[i] = 0; 14 | } 15 | 16 | t.insert(object); 17 | t.update({ _id : id}, { $pop : { data : -1 } }); 18 | 19 | var modified = t.findOne(); 20 | assert.eq(4095, modified.data.length); 21 | -------------------------------------------------------------------------------- /jstests/core/regex_not_id.js: -------------------------------------------------------------------------------- 1 | // don't allow regex as _id: SERVER-9502 2 | 3 | var testColl = db.regex_not_id; 4 | testColl.drop() 5 | 6 | assert.writeOK(testColl.insert({ _id: "ABCDEF1" }, {writeConcern:{w:1}})); 7 | 8 | // Should be an error. 9 | assert.writeError(testColl.insert({ _id: /^A/ }, {writeConcern:{w:1}})); 10 | 11 | // _id doesn't have to be first; still disallowed 12 | assert.writeError(testColl.insert({ xxx: "ABCDEF", _id: /ABCDEF/ }, {writeConcern:{w:1}})); -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/exception/error_info.hpp: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. 2 | 3 | //Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef UUID_EE7ECCA0433B11E1923E37064924019B 7 | #define UUID_EE7ECCA0433B11E1923E37064924019B 8 | namespace boost { template class error_info; } 9 | #endif 10 | -------------------------------------------------------------------------------- /src/third_party/pcre-8.36/makevp_c.txt: -------------------------------------------------------------------------------- 1 | pcre_byte_order.c 2 | pcre_chartables.c 3 | pcre_compile.c 4 | pcre_config.c 5 | pcre_dfa_exec.c 6 | pcre_exec.c 7 | pcre_fullinfo.c 8 | pcre_get.c 9 | pcre_globals.c 10 | pcre_jit_compile.c 11 | pcre_maketables.c 12 | pcre_newline.c 13 | pcre_ord2utf8.c 14 | pcre_refcount.c 15 | pcre_string_utils.c 16 | pcre_study.c 17 | pcre_tables.c 18 | pcre_ucd.c 19 | pcre_valid_utf8.c 20 | pcre_version.c 21 | pcre_xclass.c 22 | -------------------------------------------------------------------------------- /jstests/core/eval4.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.eval4; 3 | t.drop(); 4 | 5 | t.save( { a : 1 } ); 6 | t.save( { a : 2 } ); 7 | t.save( { a : 3 } ); 8 | 9 | assert.eq( 3 , t.count() , "A" ); 10 | 11 | function f( x ){ 12 | db.eval4.remove( { a : x } ); 13 | } 14 | 15 | f( 2 ); 16 | assert.eq( 2 , t.count() , "B" ); 17 | 18 | db.eval( f , 2 ); 19 | assert.eq( 2 , t.count() , "C" ); 20 | 21 | db.eval( f , 3 ); 22 | assert.eq( 1 , t.count() , "D" ); 23 | 24 | -------------------------------------------------------------------------------- /jstests/core/update_arraymatch1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_arraymatch1 3 | t.drop(); 4 | 5 | o = { _id : 1 , a : [ { x : 1 , y : 1 } , { x : 2 , y : 2 } , { x : 3 , y : 3 } ] } 6 | t.insert( o ); 7 | assert.eq( o , t.findOne() , "A1" ); 8 | 9 | q = { "a.x" : 2 } 10 | t.update( q , { $set : { b : 5 } } ) 11 | o.b = 5 12 | assert.eq( o , t.findOne() , "A2" ) 13 | 14 | t.update( { "a.x" : 2 } , { $inc : { "a.$.y" : 1 } } ) 15 | o.a[1].y++; 16 | assert.eq( o , t.findOne() , "A3" ); 17 | -------------------------------------------------------------------------------- /jstests/noPassthroughWithMongod/remove9.js: -------------------------------------------------------------------------------- 1 | t = db.jstests_remove9; 2 | t.drop(); 3 | 4 | js = "while( 1 ) { for( i = 0; i < 10000; ++i ) { db.jstests_remove9.save( {i:i} ); } db.jstests_remove9.remove( {i: {$gte:0} } ); }"; 5 | pid = startMongoProgramNoConnect( "mongo" , "--eval" , js , db ? db.getMongo().host : null ); 6 | 7 | for( var i = 0; i < 10000; ++i ) { 8 | assert.writeOK(t.remove( { i: Random.randInt( 10000 )} )); 9 | } 10 | 11 | stopMongoProgramByPid( pid ); 12 | -------------------------------------------------------------------------------- /jstests/repl/block1.js: -------------------------------------------------------------------------------- 1 | 2 | var rt = new ReplTest( "block1" ); 3 | 4 | m = rt.start( true ); 5 | s = rt.start( false ); 6 | 7 | dbm = m.getDB( "foo" ); 8 | dbs = s.getDB( "foo" ); 9 | 10 | tm = dbm.bar; 11 | ts = dbs.bar; 12 | 13 | for ( var i=0; i<1000; i++ ){ 14 | tm.insert({ _id: i }, { writeConcern: { w: 2 }}); 15 | assert.eq( i + 1 , ts.count() , "A" + i ); 16 | assert.eq( i + 1 , tm.count() , "B" + i ); 17 | } 18 | 19 | rt.stop(); 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/detail/_cassert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2011-2012 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_DETAIL__CASSERT_H 9 | #define BOOST_PREDEF_DETAIL__CASSERT_H 10 | 11 | #if defined(__cpluplus) 12 | #include 13 | #else 14 | #include 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/ref.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_REF_HPP 10 | #define BOOST_REF_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/ref.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/medium-multi-lsm-noprefix.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: medium lsm configuration, with multiple tables. 2 | conn_config="cache_size=1G,lsm_manager=(worker_thread_max=8)" 3 | table_config="lsm=(chunk_max=1TB),type=lsm,prefix_compression=false,os_cache_dirty_max=16MB" 4 | icount=50000000 5 | populate_threads=1 6 | compact=true 7 | threads=((count=8,read=1),(count=8,update=1)) 8 | run_time=180 9 | report_interval=5 10 | table_count=4 11 | -------------------------------------------------------------------------------- /jstests/core/sortj.js: -------------------------------------------------------------------------------- 1 | // Test an in memory sort memory assertion after a plan has "taken over" in the query optimizer 2 | // cursor. 3 | 4 | t = db.jstests_sortj; 5 | t.drop(); 6 | 7 | t.ensureIndex( { a:1 } ); 8 | 9 | big = new Array( 100000 ).toString(); 10 | for( i = 0; i < 1000; ++i ) { 11 | t.save( { a:1, b:big } ); 12 | } 13 | 14 | assert.throws( function() { 15 | t.find( { a:{ $gte:0 }, c:null } ).sort( { d:1 } ).itcount(); 16 | } ); 17 | t.drop(); -------------------------------------------------------------------------------- /jstests/core/type2.js: -------------------------------------------------------------------------------- 1 | // SERVER-1735 $type:10 matches null value, not missing value. 2 | 3 | t = db.jstests_type2; 4 | t.drop(); 5 | 6 | t.save( {a:null} ); 7 | t.save( {} ); 8 | t.save( {a:'a'} ); 9 | 10 | function test() { 11 | assert.eq( 2, t.count( {a:null} ) ); 12 | assert.eq( 1, t.count( {a:{$type:10}} ) ); 13 | assert.eq( 2, t.count( {a:{$exists:true}} ) ); 14 | assert.eq( 1, t.count( {a:{$exists:false}} ) ); 15 | } 16 | 17 | test(); 18 | t.ensureIndex( {a:1} ); 19 | test(); -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/swap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_SWAP_HPP 10 | #define BOOST_SWAP_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/swap.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/s2/util/math/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | 3 | Import("env") 4 | 5 | env = env.Clone() 6 | 7 | env.Append(CCFLAGS=['-Isrc/third_party/s2']) 8 | env.Append(CCFLAGS=['-Isrc/third_party/gflags-2.0/src']) 9 | 10 | if env.TargetOSIs('solaris'): 11 | # Enables declaration of isinf() on Solaris 12 | env.Append(CPPDEFINES=['__C99FEATURES__']) 13 | 14 | env.Library("math", 15 | [ "mathutil.cc", 16 | # "mathlimits.cc", 17 | ]) 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/predef/detail/test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Rene Rivera 2011-2012 3 | Distributed under the Boost Software License, Version 1.0. 4 | (See accompanying file LICENSE_1_0.txt or copy at 5 | http://www.boost.org/LICENSE_1_0.txt) 6 | */ 7 | 8 | #ifndef BOOST_PREDEF_DETAIL_TEST_H 9 | #define BOOST_PREDEF_DETAIL_TEST_H 10 | 11 | #if !defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) 12 | 13 | #define BOOST_PREDEF_DECLARE_TEST(x,s) 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/RELEASE_INFO: -------------------------------------------------------------------------------- 1 | WIREDTIGER_VERSION_MAJOR=2 2 | WIREDTIGER_VERSION_MINOR=5 3 | WIREDTIGER_VERSION_PATCH=3 4 | WIREDTIGER_VERSION="$WIREDTIGER_VERSION_MAJOR.$WIREDTIGER_VERSION_MINOR.$WIREDTIGER_VERSION_PATCH" 5 | 6 | WIREDTIGER_RELEASE_DATE=`date "+%B %e, %Y"` 7 | 8 | WIREDTIGER_VERSION_STRING="WiredTiger $WIREDTIGER_VERSION: ($WIREDTIGER_RELEASE_DATE)" 9 | 10 | WIREDTIGER_VERSION_UNIQUE_NAME=`printf "_%d%03d" $WIREDTIGER_VERSION_MAJOR $WIREDTIGER_VERSION_MINOR` 11 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/log-noprealloc.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: Test performance with a log file enabled. 2 | # Set the log file reasonably small to catch log-swtich bottle 3 | # necks. 4 | conn_config="cache_size=1G,log=(enabled=true,file_max=200K,prealloc=false),checkpoint=(log_size=500MB)" 5 | table_config="type=file" 6 | icount=50000 7 | report_interval=5 8 | run_time=120 9 | populate_threads=1 10 | random_range=50000000 11 | threads=((count=8,inserts=1)) 12 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/dist/s_getopt: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | t=__wt.$$ 4 | trap 'rm -f $t' 0 1 2 3 13 15 5 | 6 | # Complain if someone uses the wrong getopt. 7 | find ../src ../test ../bench -name '*.c' | xargs egrep '[^a-z_]getopt\(' > $t 8 | 9 | test -s $t && { 10 | echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" 11 | echo 'Calls to the C library version of getopt.' 12 | echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" 13 | cat $t 14 | exit 1 15 | } 16 | exit 0 17 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/src/include/dlh.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2014-2015 MongoDB, Inc. 3 | * Copyright (c) 2008-2014 WiredTiger, Inc. 4 | * All rights reserved. 5 | * 6 | * See the file LICENSE for redistribution information. 7 | */ 8 | 9 | struct __wt_dlh { 10 | TAILQ_ENTRY(__wt_dlh) q; /* List of open libraries. */ 11 | 12 | void *handle; /* Handle returned by dlopen. */ 13 | char *name; 14 | 15 | int (*terminate)(WT_CONNECTION *); /* Terminate function. */ 16 | }; 17 | -------------------------------------------------------------------------------- /jstests/core/cursor1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.cursor1 3 | t.drop(); 4 | 5 | big = ""; 6 | while ( big.length < 50000 ) 7 | big += "asdasdasdasdsdsdadsasdasdasD"; 8 | 9 | num = Math.ceil( 10000000 / big.length ); 10 | 11 | for ( var i=0; i 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/runners/long-txn-lsm.wtperf: -------------------------------------------------------------------------------- 1 | # wtperf options file: run autocommit and long transactions in parallel. 2 | conn_config="cache_size=500MB" 3 | table_config="lsm=(chunk_size=5MB),type=lsm,os_cache_dirty_max=16MB" 4 | icount=5000000 5 | report_interval=5 6 | run_time=120 7 | populate_threads=1 8 | # Have a long running reader, throttled to a max of 5000 ops per second. 9 | threads=((count=4,reads=1,updates=1),(count=1,reads=1,ops_per_txn=100000,throttle=5000)) 10 | -------------------------------------------------------------------------------- /jstests/core/org.js: -------------------------------------------------------------------------------- 1 | // SERVER-2282 $or de duping with sparse indexes 2 | 3 | t = db.jstests_org; 4 | t.drop(); 5 | 6 | t.ensureIndex( {a:1}, {sparse:true} ); 7 | t.ensureIndex( {b:1} ); 8 | 9 | t.remove({}); 10 | t.save( {a:1,b:2} ); 11 | assert.eq( 1, t.count( {$or:[{a:1},{b:2}]} ) ); 12 | 13 | t.remove({}); 14 | t.save( {a:null,b:2} ); 15 | assert.eq( 1, t.count( {$or:[{a:null},{b:2}]} ) ); 16 | 17 | t.remove({}); 18 | t.save( {b:2} ); 19 | assert.eq( 1, t.count( {$or:[{a:null},{b:2}]} ) ); 20 | -------------------------------------------------------------------------------- /jstests/core/update_arraymatch3.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_arraymatch3; 3 | t.drop(); 4 | 5 | o = { _id : 1 , 6 | title : "ABC", 7 | comments : [ { "by" : "joe", "votes" : 3 }, 8 | { "by" : "jane", "votes" : 7 } 9 | ] 10 | } 11 | 12 | t.save( o ); 13 | assert.eq( o , t.findOne() , "A1" ); 14 | 15 | t.update( {'comments.by':'joe'}, {$inc:{'comments.$.votes':1}}, false, true ) 16 | o.comments[0].votes++; 17 | assert.eq( o , t.findOne() , "A2" ); 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/thread/thread.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_THREAD_THREAD_HPP 2 | #define BOOST_THREAD_THREAD_HPP 3 | 4 | // thread.hpp 5 | // 6 | // (C) Copyright 2007-8 Anthony Williams 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See 9 | // accompanying file LICENSE_1_0.txt or copy at 10 | // http://www.boost.org/LICENSE_1_0.txt) 11 | 12 | #include 13 | #include 14 | 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /win2008plus.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | MONGO_USE_SRW_ON_WINDOWS;%(PreprocessorDefinitions) 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jstests/aggregation/extras/debug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | JavaScript Debugger Page 4 | 5 | 6 | 7 | 8 | 9 |

JavaScript Debugger page

10 | 11 | 12 |
13 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /jstests/disk/diskfull.js: -------------------------------------------------------------------------------- 1 | // Enable failpoint 2 | assert.commandWorked(db.adminCommand({configureFailPoint: "allocateDiskFull", mode: "alwaysOn"})); 3 | 4 | var d = db.getSisterDB("DiskFullTestDB"); 5 | var c = d.getCollection("DiskFullTestCollection"); 6 | 7 | var writeError1 = c.insert({ a : 6 }).getWriteError(); 8 | assert.eq(12520, writeError1.code); 9 | 10 | // All subsequent requests should fail 11 | var writeError2 = c.insert({ a : 6 }).getWriteError(); 12 | assert.eq(12520, writeError2.code); 13 | -------------------------------------------------------------------------------- /src/third_party/zlib-1.2.8/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /jstests/concurrency/fsm_workloads/update_simple_capped.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * update_simple_capped.js 5 | * 6 | * Executes the update_simple.js workload on a capped collection. 7 | */ 8 | load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload 9 | load('jstests/concurrency/fsm_workloads/update_simple.js'); // for $config 10 | load('jstests/concurrency/fsm_workload_modifiers/make_capped.js'); // for makeCapped 11 | 12 | var $config = extendWorkload($config, makeCapped); 13 | -------------------------------------------------------------------------------- /jstests/core/arrayfind3.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.arrayfind3; 3 | t.drop() 4 | 5 | t.save({a:[1,2]}) 6 | t.save({a:[1, 2, 6]}) 7 | t.save({a:[1, 4, 6]}) 8 | 9 | 10 | assert.eq( 2 , t.find( {a:{$gte:3, $lte: 5}} ).itcount() , "A1" ) 11 | assert.eq( 1 , t.find( {a:{$elemMatch:{$gte:3, $lte: 5}}} ).itcount() , "A2" ) 12 | 13 | t.ensureIndex( { a : 1 } ) 14 | 15 | assert.eq( 2 , t.find( {a:{$gte:3, $lte: 5}} ).itcount() , "B1" ); 16 | assert.eq( 1 , t.find( {a:{$elemMatch:{$gte:3, $lte: 5}}} ).itcount() , "B2" ) 17 | -------------------------------------------------------------------------------- /jstests/core/capped_empty.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.capped_empty; 3 | t.drop(); 4 | 5 | db.createCollection( t.getName() , { capped : true , size : 100 } ) 6 | 7 | t.insert( { x : 1 } ); 8 | t.insert( { x : 2 } ); 9 | t.insert( { x : 3 } ); 10 | t.ensureIndex( { x : 1 } ); 11 | 12 | assert.eq( 3 , t.count() ); 13 | 14 | t.runCommand( "emptycapped" ); 15 | 16 | assert.eq( 0 , t.count() ); 17 | 18 | t.insert( { x : 1 } ); 19 | t.insert( { x : 2 } ); 20 | t.insert( { x : 3 } ); 21 | 22 | assert.eq( 3 , t.count() ); 23 | -------------------------------------------------------------------------------- /jstests/core/in8.js: -------------------------------------------------------------------------------- 1 | // Test $in regular expressions with overlapping index bounds. SERVER-4677 2 | 3 | t = db.jstests_inb; 4 | t.drop(); 5 | 6 | function checkResults( query ) { 7 | assert.eq( 4, t.count( query ) ); 8 | assert.eq( 4, t.find( query ).itcount() ); 9 | } 10 | 11 | t.ensureIndex( {x:1} ); 12 | t.save( {x:'aa'} ); 13 | t.save( {x:'ab'} ); 14 | t.save( {x:'ac'} ); 15 | t.save( {x:'ad'} ); 16 | 17 | checkResults( {x:{$in:[/^a/,/^ab/]}} ); 18 | checkResults( {x:{$in:[/^ab/,/^a/]}} ); 19 | -------------------------------------------------------------------------------- /jstests/core/inc3.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.inc3; 3 | 4 | t.drop(); 5 | t.save( { _id : 1 , z : 1 , a : 1 } ); 6 | t.update( {} , { $inc : { z : 1 , a : 1 } } ); 7 | t.update( {} , { $inc : { a : 1 , z : 1 } } ); 8 | assert.eq( { _id : 1 , z : 3 , a : 3 } , t.findOne() , "A" ) 9 | 10 | 11 | t.drop(); 12 | t.save( { _id : 1 , a : 1 , z : 1 } ); 13 | t.update( {} , { $inc : { z : 1 , a : 1 } } ); 14 | t.update( {} , { $inc : { a : 1 , z : 1 } } ); 15 | assert.eq( { _id : 1 , a : 3 , z : 3 } , t.findOne() , "B" ) 16 | 17 | -------------------------------------------------------------------------------- /jstests/core/index_create_with_nul_in_name.js: -------------------------------------------------------------------------------- 1 | // SERVER-16672 disallow creating indexes with NUL bytes in the name 2 | 3 | (function() { 4 | 'use strict'; 5 | 6 | var coll = db.create_index_with_nul_in_name; 7 | coll.drop(); 8 | 9 | var idx = {key: {'a': 1}, name: 'foo\0bar', ns: coll.getFullName()}; 10 | 11 | var res = coll.runCommand('createIndexes', {indexes: [idx]}); 12 | assert.commandFailed(res, tojson(res)); 13 | assert.eq(res.code, 67); // CannotCreateIndex 14 | }()) 15 | -------------------------------------------------------------------------------- /jstests/core/regexa.js: -------------------------------------------------------------------------------- 1 | // Test simple regex optimization with a regex | (bar) present - SERVER-3298 2 | 3 | t = db.jstests_regexa; 4 | t.drop(); 5 | 6 | function check() { 7 | assert.eq( 1, t.count( {a:/^(z|.)/} ) ); 8 | assert.eq( 1, t.count( {a:/^z|./} ) ); 9 | assert.eq( 0, t.count( {a:/^z(z|.)/} ) ); 10 | assert.eq( 1, t.count( {a:/^zz|./} ) ); 11 | } 12 | 13 | t.save( {a:'a'} ); 14 | 15 | check(); 16 | t.ensureIndex( {a:1} ); 17 | if ( 1 ) { // SERVER-3298 18 | check(); 19 | } 20 | -------------------------------------------------------------------------------- /jstests/core/update_arraymatch4.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update_arraymatch4 3 | t.drop() 4 | 5 | x = { _id : 1 , arr : ["A1","B1","C1"] } 6 | t.insert( x ) 7 | assert.eq( x , t.findOne() , "A1" ) 8 | 9 | x.arr[0] = "A2" 10 | t.update( { arr : "A1" } , { $set : { "arr.$" : "A2" } } ) 11 | assert.eq( x , t.findOne() , "A2" ) 12 | 13 | t.ensureIndex( { arr : 1 } ) 14 | x.arr[0] = "A3" 15 | t.update( { arr : "A2" } , { $set : { "arr.$" : "A3" } } ) 16 | assert.eq( x , t.findOne() , "A3" ); // SERVER-1055 17 | 18 | 19 | -------------------------------------------------------------------------------- /jstests/noPassthroughWithMongod/newcollection2.js: -------------------------------------------------------------------------------- 1 | // Alocate collection forcing just a small size remainder in 2nd extent 2 | 3 | port = allocatePorts( 1 )[ 0 ] 4 | var baseName = "jstests_disk_newcollection2"; 5 | var m = startMongod( "--noprealloc", "--smallfiles", "--port", port, "--dbpath", MongoRunner.dataPath + baseName ); 6 | db = m.getDB( "test" ); 7 | 8 | db.createCollection( baseName, {size:0x1FFC0000-0x10-8192} ); 9 | var v = db[ baseName ].validate(); 10 | printjson( v ); 11 | assert( v.valid ); 12 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/utility/swap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_UTILITY_SWAP_HPP 10 | #define BOOST_UTILITY_SWAP_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/swap.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/dist/s_longlines: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Check for long lines 4 | t=__wt.$$ 5 | trap 'rm -f $t; exit 0' 0 1 2 3 13 15 6 | 7 | l=`(cd .. && 8 | find bench/wtperf examples ext src test -name '*.[chisy]' && 9 | find dist -name '*.py' && 10 | find src -name '*.in') | 11 | sed -e '/include\/extern\.h/d'\ 12 | -e '/support\/stat\.c/d'` 13 | 14 | for f in $l ; do 15 | expand -t8 < ../$f | awk -- \ 16 | "{if(length(\$0) > 80) printf(\"%s:%d\\n\", \"$f\", NR)}" 17 | done 18 | -------------------------------------------------------------------------------- /jstests/core/geo_box2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.geo_box2; 3 | 4 | t.drop() 5 | 6 | for (i=1; i<10; i++) { 7 | for(j=1; j<10; j++) { 8 | t.insert({loc : [i,j]}); 9 | } 10 | } 11 | 12 | t.ensureIndex({"loc" : "2d"} ) 13 | assert.eq( 9 , t.find({loc : {$within : {$box : [[4,4],[6,6]]}}}).itcount() , "A1" ); 14 | 15 | t.dropIndex( { "loc" : "2d" } ) 16 | 17 | t.ensureIndex({"loc" : "2d"} , {"min" : 0, "max" : 10}) 18 | assert.eq( 9 , t.find({loc : {$within : {$box : [[4,4],[6,6]]}}}).itcount() , "B1" ); 19 | -------------------------------------------------------------------------------- /jstests/core/geo_poly_line.js: -------------------------------------------------------------------------------- 1 | // Test that weird polygons work SERVER-3725 2 | 3 | t = db.geo_polygon5; 4 | t.drop(); 5 | 6 | t.insert({loc:[0,0]}) 7 | t.insert({loc:[1,0]}) 8 | t.insert({loc:[2,0]}) 9 | t.insert({loc:[3,0]}) 10 | t.insert({loc:[4,0]}) 11 | 12 | t.ensureIndex( { loc : "2d" } ); 13 | 14 | printjson( t.find({ loc: { "$within": { "$polygon" : [[0,0], [2,0], [4,0]] } } }).toArray() ) 15 | 16 | assert.eq( 5, t.find({ loc: { "$within": { "$polygon" : [[0,0], [2,0], [4,0]] } } }).itcount() ) 17 | 18 | -------------------------------------------------------------------------------- /jstests/core/geof.js: -------------------------------------------------------------------------------- 1 | t = db.geof 2 | t.drop(); 3 | 4 | // corners (dist ~0.98) 5 | t.insert({loc: [ 0.7, 0.7]}) 6 | t.insert({loc: [ 0.7, -0.7]}) 7 | t.insert({loc: [-0.7, 0.7]}) 8 | t.insert({loc: [-0.7, -0.7]}) 9 | 10 | // on x axis (dist == 0.9) 11 | t.insert({loc: [-0.9, 0]}) 12 | t.insert({loc: [-0.9, 0]}) 13 | 14 | t.ensureIndex( { loc : "2d" } ) 15 | 16 | t.find({loc: {$near: [0,0]}}).limit(2).forEach( function(o){ 17 | //printjson(o); 18 | assert.lt(Geo.distance([0,0], o.loc), 0.95); 19 | }); 20 | -------------------------------------------------------------------------------- /jstests/core/index7.js: -------------------------------------------------------------------------------- 1 | // Check that v0 keys are generated for v0 indexes SERVER-3375 2 | 3 | t = db.jstests_indexw; 4 | t.drop(); 5 | 6 | t.save( {a:[]} ); 7 | assert.eq( 1, t.count( {a:[]} ) ); 8 | t.ensureIndex( {a:1} ); 9 | assert.eq( 1, t.count( {a:[]} ) ); 10 | t.dropIndexes(); 11 | 12 | // The count result is incorrect - just checking here that v0 key generation is used. 13 | t.ensureIndex( {a:1}, {v:0} ); 14 | // QUERY_MIGRATION: WE GET THIS RIGHT...BY CHANCE? 15 | // assert.eq( 0, t.count( {a:[]} ) ); 16 | -------------------------------------------------------------------------------- /jstests/core/server9385.js: -------------------------------------------------------------------------------- 1 | // SERVER-9385 ensure saving a document derived from bson->js conversion doesn't lose it's _id 2 | t = db.server9385; 3 | t.drop(); 4 | 5 | t.insert( { _id : 1, x : 1 } ); 6 | x = t.findOne(); 7 | x._id = 2; 8 | t.save( x ); 9 | 10 | t.find().forEach( printjson ); 11 | 12 | assert.eq( 2, t.find().count() ); 13 | assert.eq( 2, t.find().itcount() ); 14 | 15 | assert( t.findOne( { _id : 1 } ), "original insert missing" ); 16 | assert( t.findOne( { _id : 2 } ), "save didn't work?" ); 17 | -------------------------------------------------------------------------------- /jstests/mmap_v1/repair_cursor1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.repair_cursor1; 3 | t.drop(); 4 | 5 | t.insert( { x : 1 } ); 6 | t.insert( { x : 2 } ); 7 | 8 | res = t.runCommand( "repairCursor" ); 9 | assert( res.ok, tojson( res ) ); 10 | 11 | t2 = db.repair_cursor1a; 12 | t2.drop(); 13 | 14 | cursor = new DBCommandCursor( db._mongo, res ); 15 | cursor.forEach( function(z){ t2.insert(z); } ); 16 | assert.eq( t.find().itcount(), t2.find().itcount() ); 17 | assert.eq( t.hashAllDocs(), t2.hashAllDocs() ); 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/SConscript: -------------------------------------------------------------------------------- 1 | # -*- mode: python; -*- 2 | # 3 | # This is the principle SConscript file, invoked by the SConstruct. Its job is 4 | # to delegate to any and all per-module SConscript files. 5 | 6 | Import('env module_sconscripts') 7 | 8 | env.SConscript( 9 | [ 10 | # NOTE: We must do third_party first as it adds methods to the environment 11 | # that we need in the mongo sconscript 12 | 'third_party/SConscript', 13 | 'mongo/SConscript', 14 | ] + module_sconscripts 15 | ) 16 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/accumulators/numeric/detail/function2.hpp: -------------------------------------------------------------------------------- 1 | // Copyright David Abrahams 2006. Distributed under the Boost 2 | // Software License, Version 1.0. (See accompanying 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | #ifndef BOOST_DETAIL_FUNCTION2_DWA200655_HPP 5 | # define BOOST_DETAIL_FUNCTION2_DWA200655_HPP 6 | 7 | # define args (2) 8 | # include 9 | 10 | #endif // BOOST_DETAIL_FUNCTION2_DWA200655_HPP 11 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/src/os_win/os_priv.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2014-2015 MongoDB, Inc. 3 | * Copyright (c) 2008-2014 WiredTiger, Inc. 4 | * All rights reserved. 5 | * 6 | * See the file LICENSE for redistribution information. 7 | */ 8 | 9 | #include "wt_internal.h" 10 | 11 | /* 12 | * __wt_has_priv -- 13 | * Return if the process has special privileges, defined as having 14 | * different effective and read UIDs or GIDs. 15 | */ 16 | int 17 | __wt_has_priv(void) 18 | { 19 | return (0); 20 | } 21 | -------------------------------------------------------------------------------- /src/third_party/yaml-cpp-0.5.1/src/graphbuilder.cpp: -------------------------------------------------------------------------------- 1 | #include "yaml-cpp/parser.h" 2 | #include "yaml-cpp/contrib/graphbuilder.h" 3 | #include "graphbuilderadapter.h" 4 | 5 | namespace YAML 6 | { 7 | void *BuildGraphOfNextDocument(Parser& parser, GraphBuilderInterface& graphBuilder) 8 | { 9 | GraphBuilderAdapter eventHandler(graphBuilder); 10 | if (parser.HandleNextDocument(eventHandler)) { 11 | return eventHandler.RootNode(); 12 | } else { 13 | return NULL; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6275.js: -------------------------------------------------------------------------------- 1 | // confirm that undefined no longer counts as 0 in $avg 2 | c = db.c; 3 | c.drop(); 4 | c.save({a:1}); 5 | c.save({a:4}); 6 | c.save({b:1}); 7 | assert.eq(c.aggregate({$group:{_id: null, avg:{$avg:"$a"}}}).toArray()[0].avg, 2.5); 8 | 9 | // again ensuring numberLongs work properly 10 | c.drop(); 11 | c.save({a:NumberLong(1)}); 12 | c.save({a:NumberLong(4)}); 13 | c.save({b:NumberLong(1)}); 14 | assert.eq(c.aggregate({$group:{_id: null, avg:{$avg:"$a"}}}).toArray()[0].avg, 2.5); 15 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6468.js: -------------------------------------------------------------------------------- 1 | // SERVER-6468 nested and dotted projections should be treated the same 2 | c = db.c; 3 | c.drop(); 4 | 5 | c.save( { a:'foo', b:{ c:'bar', z:'not there' } } ); 6 | 7 | function test(projection) { 8 | res = c.aggregate({$project: projection}) 9 | assert.eq(res.toArray()[0], {b: {c: 'bar'}}); 10 | } 11 | 12 | // These should all mean the same thing 13 | test({_id:0, 'b.c':1}) 14 | test({_id:0, 'b.c':'$b.c'}) 15 | test({_id:0, b: {c:1}}) 16 | test({_id:0, b: {c:'$b.c'}}) 17 | -------------------------------------------------------------------------------- /jstests/aggregation/disabled/server5369.js: -------------------------------------------------------------------------------- 1 | // https://jira.mongodb.org/browse/SERVER-5369 2 | // make sure excluding a field doesnt cause _id to appear twice 3 | 4 | // use the aggregation test db 5 | db = db.getSiblingDB('aggdb'); 6 | 7 | // empty and populate 8 | db.test.drop(); 9 | db.test.save({a:1,b:2}) 10 | 11 | // agg with exclusion than ensure fields are only the two we expect 12 | var f = db.test.aggregate({$project:{a:0}}); 13 | assert.eq(["_id","b"], Object.keySet(f.toArray()[0]), "server5369 failed"); 14 | -------------------------------------------------------------------------------- /jstests/core/countb.js: -------------------------------------------------------------------------------- 1 | // Test fast count mode with single key index unsatisfiable constraints on a multi key index. 2 | 3 | t = db.jstests_countb; 4 | t.drop(); 5 | 6 | t.ensureIndex( {a:1} ); 7 | t.save( {a:['a','b']} ); 8 | assert.eq( 0, t.find( {a:{$in:['a'],$gt:'b'}} ).count() ); 9 | assert.eq( 0, t.find( {$and:[{a:'a'},{a:{$gt:'b'}}]} ).count() ); 10 | assert.eq( 1, t.find( {$and:[{a:'a'},{$where:"this.a[1]=='b'"}]} ).count() ); 11 | assert.eq( 0, t.find( {$and:[{a:'a'},{$where:"this.a[1]!='b'"}]} ).count() ); 12 | -------------------------------------------------------------------------------- /jstests/core/geod.js: -------------------------------------------------------------------------------- 1 | var t=db.geod; 2 | t.drop() 3 | t.save( { loc: [0,0] } ) 4 | t.save( { loc: [0.5,0] } ) 5 | t.ensureIndex({loc:"2d"}) 6 | // do a few geoNears with different maxDistances. The first iteration 7 | // should match no points in the dataset. 8 | dists = [.49, .51, 1.0] 9 | for (idx in dists){ 10 | b=db.runCommand({geoNear:"geod", near:[1,0], num:2, maxDistance:dists[idx]}); 11 | assert.eq(b.errmsg, undefined, "A"+idx); 12 | l=b.results.length 13 | assert.eq(l, idx, "B"+idx) 14 | } 15 | -------------------------------------------------------------------------------- /jstests/core/server14747.js: -------------------------------------------------------------------------------- 1 | // Validation test for SERVER-14747. Note that the issue under test is a memory leak, so this 2 | // test would only be expected to fail when run under address sanitizer. 3 | 4 | (function() { 5 | 6 | "use strict"; 7 | var t = db.jstests_server14747 8 | 9 | t.drop(); 10 | t.ensureIndex({a: 1, b: 1}); 11 | t.ensureIndex({a: 1, c: 1}); 12 | t.insert({a: 1}); 13 | for (var i = 0; i < 10; i++) { 14 | t.find({a: 1}).explain(true); 15 | } 16 | 17 | }()); 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/atomic.hpp: -------------------------------------------------------------------------------- 1 | #ifndef BOOST_ATOMIC_HPP 2 | #define BOOST_ATOMIC_HPP 3 | 4 | // Copyright (c) 2011 Helge Bahmann 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // This header includes all Boost.Atomic public headers 11 | 12 | #include 13 | 14 | #ifdef BOOST_HAS_PRAGMA_ONCE 15 | #pragma once 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_NONCOPYABLE_HPP 10 | #define BOOST_NONCOPYABLE_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/noncopyable.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/v8/ChangeLog_10gen: -------------------------------------------------------------------------------- 1 | 10gen v8 changelog 2 | ------------------ 3 | 4 | 12/19/12: 5 | - SERVER-7990: Use real_climit() in StackLimitCheck::HasOverflowed (backport of chromium cr 11362007) 6 | 7 | 12/18/12: 8 | - SERVER-7989: Fixed issue with ContextSwitcher::PreemptionReceived always checking the default isolate 9 | 10 | 10/25/12: 11 | - SERVER-2407: 12 | - Retrieved base version of v8: 3.12.19.11 via git 13 | - Removed files unused by mongodb 14 | - SCons integration 15 | -------------------------------------------------------------------------------- /jstests/aggregation/unwind.js: -------------------------------------------------------------------------------- 1 | // SERVER-8088: test $unwind with a scalar 2 | 3 | t = db.agg_unwind; 4 | t.drop(); 5 | 6 | t.insert( {_id : 1 } ); 7 | t.insert( {_id : 2, x : null } ); 8 | t.insert( {_id : 3, x : [] } ); 9 | t.insert( {_id : 4, x : [1, 2] } ); 10 | t.insert( {_id : 5, x : [3] } ); 11 | t.insert( {_id : 6, x : 4 } ); 12 | 13 | var res = t.aggregate( [ { $unwind : "$x" }, { $sort : { _id : 1 } } ] ).toArray(); 14 | assert.eq(4, res.length); 15 | assert.eq([1, 2, 3, 4],res.map(function(z){ return z.x; })); 16 | -------------------------------------------------------------------------------- /jstests/core/geo_withinquery.js: -------------------------------------------------------------------------------- 1 | // SERVER-7343: allow $within without a geo index. 2 | t = db.geo_withinquery; 3 | t.drop(); 4 | 5 | num = 0; 6 | for ( x=0; x<=20; x++ ){ 7 | for ( y=0; y<=20; y++ ){ 8 | o = { _id : num++ , loc : [ x , y ] } 9 | t.save( o ) 10 | } 11 | } 12 | 13 | assert.eq(21 * 21 - 1, t.find({ $and: [ {loc: {$ne:[0,0]}}, 14 | {loc: {$within: {$box: [[0,0], [100,100]]}}}, 15 | ]}).itcount(), "UHOH!") 16 | -------------------------------------------------------------------------------- /jstests/core/ne3.js: -------------------------------------------------------------------------------- 1 | // don't allow most operators with regex 2 | 3 | t = db.jstests_ne3; 4 | t.drop(); 5 | 6 | assert.throws( function() { t.findOne( { t: { $ne: /a/ } } ); } ); 7 | assert.throws( function() { t.findOne( { t: { $gt: /a/ } } ); } ); 8 | assert.throws( function() { t.findOne( { t: { $gte: /a/ } } ); } ); 9 | assert.throws( function() { t.findOne( { t: { $lt: /a/ } } ); } ); 10 | assert.throws( function() { t.findOne( { t: { $lte: /a/ } } ); } ); 11 | 12 | assert.eq( 0, t.count( { t: { $in: [ /a/ ] } } ) ); 13 | -------------------------------------------------------------------------------- /jstests/core/objid6.js: -------------------------------------------------------------------------------- 1 | o = new ObjectId(); 2 | assert(o.getTimestamp); 3 | 4 | a = new ObjectId("4c17f616a707427266a2801a"); 5 | b = new ObjectId("4c17f616a707428966a2801c"); 6 | assert.eq(a.getTimestamp(), b.getTimestamp() , "A" ); 7 | 8 | x = Math.floor( (new Date()).getTime() / 1000 ); 9 | sleep(10/*ms*/) 10 | a = new ObjectId(); 11 | sleep(10/*ms*/) 12 | z = Math.floor( (new Date()).getTime() / 1000 ); 13 | y = a.getTimestamp().getTime() / 1000; 14 | 15 | assert.lte( x , y , "B" ); 16 | assert.lte( y , z , "C" ); 17 | -------------------------------------------------------------------------------- /jstests/core/server14753.js: -------------------------------------------------------------------------------- 1 | // Validation test for SERVER-14753. Note that the issue under test is a memory leak, so this 2 | // test would only be expected to fail when run under address sanitizer. 3 | 4 | (function() { 5 | 6 | "use strict"; 7 | var t = db.jstests_server14753 8 | 9 | t.drop(); 10 | t.ensureIndex({a: 1}); 11 | t.ensureIndex({b: 1}); 12 | for (var i = 0; i < 20; i++) { t.insert({b: i}); } 13 | for (var i = 0; i < 20; i++) { t.find({b: 1}).sort({a: 1}).next(); } 14 | 15 | }()); 16 | -------------------------------------------------------------------------------- /jstests/tool/data/csvimport1.csv: -------------------------------------------------------------------------------- 1 | a,b,c 2 | 1,"this is some text. 3 | This text spans multiple lines, and just for fun 4 | contains a comma", "This has leading and trailing whitespace!" 5 | 2, "When someone says something you ""put it in quotes""", I like embedded quotes/slashes\backslashes 6 | 3 , " This line contains the empty string and has leading and trailing whitespace inside the quotes! ", "" 7 | "4" ,, How are empty entries handled? 8 | "5","""""", """This string is in quotes and contains empty quotes ("""")""" 9 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function0.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 0 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function1.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 1 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function2.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 2 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function3.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 3 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function4.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 4 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function5.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 5 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function6.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 6 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function7.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 7 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function8.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 8 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function9.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 9 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /jstests/core/basic1.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.getCollection( "basic1" ); 3 | t.drop(); 4 | 5 | o = { a : 1 }; 6 | t.save( o ); 7 | 8 | assert.eq( 1 , t.findOne().a , "first" ); 9 | assert( o._id , "now had id" ); 10 | assert( o._id.str , "id not a real id" ); 11 | 12 | o.a = 2; 13 | t.save( o ); 14 | 15 | assert.eq( 2 , t.findOne().a , "second" ); 16 | 17 | assert(t.validate().valid); 18 | 19 | // not a very good test of currentOp, but tests that it at least 20 | // is sort of there: 21 | assert( db.currentOp().inprog != null ); 22 | -------------------------------------------------------------------------------- /jstests/core/find_and_modify_server6582.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.find_and_modify_server6582; 3 | 4 | t.drop(); 5 | x = t.runCommand( "findAndModify" , {query:{f:1}, update:{$set:{f:2}}, upsert:true, new:true}) 6 | le = x.lastErrorObject 7 | assert.eq( le.updatedExisting, false ) 8 | assert.eq( le.n, 1 ) 9 | assert.eq( le.upserted, x.value._id ) 10 | 11 | t.drop(); 12 | t.insert( { f : 1 } ) 13 | x = t.runCommand( "findAndModify" , {query:{f:1}, remove : true } ) 14 | le = x.lastErrorObject 15 | assert.eq( le.n, 1 ) 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /jstests/core/geo7.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.geo7; 3 | t.drop(); 4 | 5 | t.insert({_id:1,y:[1,1]}) 6 | t.insert({_id:2,y:[1,1],z:3}) 7 | t.insert({_id:3,y:[1,1],z:4}) 8 | t.insert({_id:4,y:[1,1],z:5}) 9 | 10 | t.ensureIndex({y:"2d",z:1}) 11 | 12 | assert.eq( 1 , t.find({y:[1,1],z:3}).itcount() , "A1" ); 13 | 14 | t.dropIndex({y:"2d",z:1}) 15 | 16 | t.ensureIndex({y:"2d"}) 17 | assert.eq( 1 , t.find({y:[1,1],z:3}).itcount() , "A2" ); 18 | 19 | t.insert( { _id : 5 , y : 5 } ); 20 | assert.eq( 5 , t.findOne( { y : 5 } )._id , "B1" ); 21 | -------------------------------------------------------------------------------- /jstests/core/geo_2d_with_geojson_point.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Use of GeoJSON points should be prohibited with a 2d index, SERVER-10636. 3 | */ 4 | 5 | var t = db.geo_2d_with_geojson_point; 6 | t.drop(); 7 | t.ensureIndex({loc: '2d'}); 8 | 9 | var geoJSONPoint = { 10 | type: 'Point', 11 | coordinates: [0, 0] 12 | }; 13 | 14 | print(assert.throws( 15 | function() { 16 | t.findOne({ 17 | loc: {$near: {$geometry: geoJSONPoint}}}); 18 | }, 19 | [], 20 | 'querying 2d index with GeoJSON point.')); 21 | -------------------------------------------------------------------------------- /jstests/core/orh.js: -------------------------------------------------------------------------------- 1 | // SERVER-2831 Demonstration of sparse index matching semantics in a multi index $or query. 2 | 3 | t = db.jstests_orh; 4 | t.drop(); 5 | 6 | t.ensureIndex( {a:1}, {sparse:true} ); 7 | t.ensureIndex( {b:1,a:1} ); 8 | 9 | t.remove({}); 10 | t.save( {b:2} ); 11 | assert.eq( 1, t.count( {a:null} ) ); 12 | assert.eq( 1, t.count( {b:2,a:null} ) ); 13 | 14 | assert.eq( 1, t.count( {$or:[{b:2,a:null},{a:null}]} ) ); 15 | 16 | // Is this desired? 17 | assert.eq( 1, t.count( {$or:[{a:null},{b:2,a:null}]} ) ); 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/function/function10.hpp: -------------------------------------------------------------------------------- 1 | // Boost.Function library 2 | 3 | // Copyright Douglas Gregor 2002-2003. Use, modification and 4 | // distribution is subject to the Boost Software License, Version 5 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // For more information, see http://www.boost.org 9 | 10 | #define BOOST_FUNCTION_NUM_ARGS 10 11 | #include 12 | #undef BOOST_FUNCTION_NUM_ARGS 13 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/thread/csbl/memory/config.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013 Vicente J. Botet Escriba 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // 2013/10 Vicente J. Botet Escriba 7 | // Creation. 8 | 9 | #ifndef BOOST_CSBL_MEMORY_CONFIG_HPP 10 | #define BOOST_CSBL_MEMORY_CONFIG_HPP 11 | 12 | #include 13 | 14 | #include 15 | 16 | #endif // header 17 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/bench/wtperf/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include 2 | 3 | LDADD = $(top_builddir)/libwiredtiger.la -lm 4 | 5 | noinst_PROGRAMS = wtperf 6 | wtperf_LDFLAGS = -static 7 | wtperf_SOURCES =\ 8 | config.c misc.c track.c wtperf.c wtperf.h wtperf_opt.i 9 | 10 | TESTS = smoke.sh 11 | AM_TESTS_ENVIRONMENT = rm -rf WT_TEST ; mkdir WT_TEST ; 12 | # automake 1.11 compatibility 13 | TESTS_ENVIRONMENT = $(AM_TESTS_ENVIRONMENT) 14 | 15 | clean-local: 16 | rm -rf WT_TEST *.core 17 | -------------------------------------------------------------------------------- /jstests/concurrency/fsm_workloads/indexed_insert_base_capped.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * indexed_insert_base_capped.js 5 | * 6 | * Executes the indexed_insert_base.js workload on a capped collection. 7 | */ 8 | load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload 9 | load('jstests/concurrency/fsm_workloads/indexed_insert_base.js'); // for $config 10 | load('jstests/concurrency/fsm_workload_modifiers/make_capped.js'); // for makeCapped 11 | 12 | var $config = extendWorkload($config, makeCapped); 13 | -------------------------------------------------------------------------------- /jstests/concurrency/fsm_workloads/update_simple_eval_nolock.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * update_simple_eval_nolock.js 5 | * 6 | * Runs update_simple_eval with the eval option { nolock: true }. 7 | */ 8 | load('jstests/concurrency/fsm_libs/extend_workload.js'); // for extendWorkload 9 | load('jstests/concurrency/fsm_workloads/update_simple_eval.js'); // for $config 10 | 11 | var $config = extendWorkload($config, function($config, $super) { 12 | 13 | $config.data.nolock = true; 14 | 15 | return $config; 16 | }); 17 | -------------------------------------------------------------------------------- /jstests/core/geo_regex0.js: -------------------------------------------------------------------------------- 1 | // From SERVER-2247 2 | // Tests to make sure regex works with geo indices 3 | 4 | t = db.regex0 5 | t.drop() 6 | 7 | t.ensureIndex( { point : '2d', words : 1 } ) 8 | t.insert( { point : [ 1, 1 ], words : [ 'foo', 'bar' ] } ) 9 | 10 | regex = { words : /^f/ } 11 | geo = { point : { $near : [ 1, 1 ] } } 12 | both = { point : { $near : [ 1, 1 ] }, words : /^f/ } 13 | 14 | assert.eq(1, t.find( regex ).count() ) 15 | assert.eq(1, t.find( geo ).count() ) 16 | assert.eq(1, t.find( both ).count() ) 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/checked_delete.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_CHECKED_DELETE_HPP 10 | #define BOOST_CHECKED_DELETE_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/checked_delete.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/coroutine/protected_stack_allocator.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Oliver Kowalke 2009. 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | #include 8 | 9 | #if defined(BOOST_WINDOWS) 10 | # include 11 | #else 12 | # include 13 | #endif 14 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/utility/addressof.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_UTILITY_ADDRESSOF_HPP 10 | #define BOOST_UTILITY_ADDRESSOF_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/addressof.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/utility/enable_if.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Fernandes 3 | * 4 | * Distributed under the Boost Software License, Version 1.0. (See 5 | * accompanying file LICENSE_1_0.txt or copy at 6 | * http://www.boost.org/LICENSE_1_0.txt) 7 | */ 8 | 9 | #ifndef BOOST_UTILITY_ENABLE_IF_HPP 10 | #define BOOST_UTILITY_ENABLE_IF_HPP 11 | 12 | // The header file at this path is deprecated; 13 | // use boost/core/enable_if.hpp instead. 14 | 15 | #include 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/third_party/v8-3.25/OWNERS: -------------------------------------------------------------------------------- 1 | bmeurer@chromium.org 2 | danno@chromium.org 3 | dcarney@chromium.org 4 | dslomov@chromium.org 5 | hpayer@chromium.org 6 | ishell@chromium.org 7 | jarin@chromium.org 8 | jkummerow@chromium.org 9 | jochen@chromium.org 10 | machenbach@chromium.org 11 | marja@chromium.org 12 | mstarzinger@chromium.org 13 | mvstanton@chromium.org 14 | rossberg@chromium.org 15 | svenpanne@chromium.org 16 | titzer@chromium.org 17 | ulan@chromium.org 18 | vegorov@chromium.org 19 | verwaest@chromium.org 20 | yangguo@chromium.org 21 | -------------------------------------------------------------------------------- /src/third_party/wiredtiger/ext/compressors/nop/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include 2 | 3 | noinst_LTLIBRARIES = libwiredtiger_nop.la 4 | libwiredtiger_nop_la_SOURCES = nop_compress.c 5 | 6 | # libtool hack: noinst_LTLIBRARIES turns off building shared libraries as well 7 | # as installation, it will only build static libraries. As far as I can tell, 8 | # the "approved" libtool way to turn them back on is by adding -rpath. 9 | libwiredtiger_nop_la_LDFLAGS = -avoid-version -module -rpath /nowhere 10 | -------------------------------------------------------------------------------- /etc/lsan.suppressions: -------------------------------------------------------------------------------- 1 | # Client objects are leaked in threads that are never terminated 2 | leak:mongo::Client::Client 3 | 4 | # Insanity related to the fact that the static observer 5 | # prevents deleting mutexes during clean shutdown. If you 6 | # remove the StaticObserver, remove this too. 7 | leak:mongo::mutex::mutex 8 | 9 | # Thread names leak from threads that are never terminated. 10 | leak:mongo::setThreadName 11 | 12 | # lets just ignore v8 for now. If we upgrade to newer v8 13 | # try removing this suppression 14 | leak:v8:: 15 | -------------------------------------------------------------------------------- /jstests/aggregation/bugs/server6232.js: -------------------------------------------------------------------------------- 1 | // SERVER-6232: seg fault when providing an empty object as an expression argument in agg 2 | // clear and populated db 3 | db.s6232.drop(); 4 | db.s6232.save({}); 5 | 6 | // case where an empty object is evaluated 7 | result = db.s6232.aggregate({$project: {a: {$and: [{}]}}}); 8 | assert.eq(result.toArray()[0].a, true); 9 | 10 | // case where result should contain a new empty object 11 | result = db.s6232.aggregate({$project: {a: {$ifNull: ['$b', {}]}}}); 12 | assert.eq(result.toArray()[0].a, {}); 13 | -------------------------------------------------------------------------------- /jstests/core/set2.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.set2; 3 | t.drop(); 4 | 5 | t.save( { _id : 1 , x : true , y : { x : true } } ); 6 | assert.eq( true , t.findOne().x ); 7 | 8 | t.update( { _id : 1 } , { $set : { x : 17 } } ); 9 | assert.eq( 17 , t.findOne().x ); 10 | 11 | assert.eq( true , t.findOne().y.x ); 12 | t.update( { _id : 1 } , { $set : { "y.x" : 17 } } ); 13 | assert.eq( 17 , t.findOne().y.x ); 14 | 15 | t.update( { _id : 1 } , { $set : { a : 2 , b : 3 } } ); 16 | assert.eq( 2 , t.findOne().a ); 17 | assert.eq( 3 , t.findOne().b ); 18 | 19 | -------------------------------------------------------------------------------- /jstests/core/update9.js: -------------------------------------------------------------------------------- 1 | 2 | t = db.update9; 3 | t.drop() 4 | 5 | orig = { "_id" : 1 , 6 | "question" : "a", 7 | "choices" : { "1" : { "choice" : "b" }, 8 | "0" : { "choice" : "c" } } , 9 | 10 | } 11 | 12 | t.save( orig ); 13 | assert.eq( orig , t.findOne() , "A" ); 14 | 15 | t.update({_id: 1, 'choices.0.votes': {$ne: 1}}, {$push: {'choices.0.votes': 1}}) 16 | 17 | orig.choices["0"].votes = [ 1 ] ; 18 | assert.eq( orig.choices["0"] , t.findOne().choices["0"] , "B" ); 19 | 20 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/coroutine/coroutine.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Oliver Kowalke 2009. 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | #ifndef BOOST_COROUTINES_COROUTINE_H 8 | #define BOOST_COROUTINES_COROUTINE_H 9 | 10 | #include 11 | #include 12 | 13 | #endif // BOOST_COROUTINES_COROUTINE_H 14 | -------------------------------------------------------------------------------- /src/third_party/boost-1.56.0/boost/smart_ptr/make_unique.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Glen Joseph Fernandes 3 | * glenfe at live dot com 4 | * 5 | * Distributed under the Boost Software License, 6 | * Version 1.0. (See accompanying file LICENSE_1_0.txt 7 | * or copy at http://boost.org/LICENSE_1_0.txt) 8 | */ 9 | #ifndef BOOST_SMART_PTR_MAKE_UNIQUE_HPP 10 | #define BOOST_SMART_PTR_MAKE_UNIQUE_HPP 11 | 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /jstests/core/batch_write_command_wc.js: -------------------------------------------------------------------------------- 1 | // 2 | // Ensures that the server respects the batch write command WriteConcern, and behaves correctly 3 | // 4 | 5 | var coll = db.getCollection( "batch_write_wc" ); 6 | coll.drop(); 7 | 8 | assert(coll.getDB().getMongo().useWriteCommands(), "test is not running with write commands"); 9 | 10 | // Basic validation of WriteConcern 11 | // -- {}, versus {w:0}/{w:1} +opt wTimeout 12 | // -- j:1, fsync:1, 13 | // -- replication: w:N (>1), w:String, wTimeout 14 | // -- randomField:true, etc 15 | 16 | 17 | --------------------------------------------------------------------------------