├── .clang-format ├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── COPYING.AGPLv3 ├── COPYING.APACHEv2 ├── COPYING.GPLv2 ├── CTestConfig.cmake ├── CTestCustom.cmake.in ├── DartConfig.cmake ├── PATENTS ├── README.md ├── bash.suppressions ├── buildbot └── compile.suppressions ├── buildheader ├── CMakeLists.txt ├── db-4.6.19.h └── make_tdb.cc ├── cmake └── merge_archives_unix.cmake.in ├── cmake_modules ├── FindValgrind.cmake ├── TokuBuildTagDatabases.cmake ├── TokuFeatureDetection.cmake ├── TokuMergeLibs.cmake ├── TokuSetupCTest.cmake ├── TokuSetupCompiler.cmake └── TokuThirdParty.cmake ├── ft ├── CMakeLists.txt ├── bndata.cc ├── bndata.h ├── cachetable │ ├── background_job_manager.cc │ ├── background_job_manager.h │ ├── cachetable-internal.h │ ├── cachetable.cc │ ├── cachetable.h │ ├── checkpoint.cc │ └── checkpoint.h ├── comparator.h ├── cursor.cc ├── cursor.h ├── ft-cachetable-wrappers.cc ├── ft-cachetable-wrappers.h ├── ft-flusher-internal.h ├── ft-flusher.cc ├── ft-flusher.h ├── ft-hot-flusher.cc ├── ft-internal.h ├── ft-ops.cc ├── ft-ops.h ├── ft-recount-rows.cc ├── ft-status.cc ├── ft-status.h ├── ft-test-helpers.cc ├── ft-verify.cc ├── ft.cc ├── ft.h ├── le-cursor.cc ├── le-cursor.h ├── leafentry.cc ├── leafentry.h ├── loader │ ├── callbacks.cc │ ├── dbufio.cc │ ├── dbufio.h │ ├── loader-internal.h │ ├── loader.cc │ ├── loader.h │ ├── pqueue.cc │ └── pqueue.h ├── logger │ ├── log-internal.h │ ├── log.h │ ├── log_upgrade.cc │ ├── logcursor.cc │ ├── logcursor.h │ ├── logfilemgr.cc │ ├── logfilemgr.h │ ├── logformat.cc │ ├── logger.cc │ ├── logger.h │ ├── recover.cc │ └── recover.h ├── msg.cc ├── msg.h ├── msg_buffer.cc ├── msg_buffer.h ├── node.cc ├── node.h ├── pivotkeys.cc ├── serialize │ ├── block_allocator.cc │ ├── block_allocator.h │ ├── block_table.cc │ ├── block_table.h │ ├── compress.cc │ ├── compress.h │ ├── ft-node-deserialize.cc │ ├── ft-serialize.cc │ ├── ft-serialize.h │ ├── ft_layout_version.h │ ├── ft_node-serialize.cc │ ├── ft_node-serialize.h │ ├── quicklz.cc │ ├── quicklz.h │ ├── rbtree_mhs.cc │ ├── rbtree_mhs.h │ ├── rbuf.h │ ├── sub_block.cc │ ├── sub_block.h │ ├── wbuf.h │ └── workset.h ├── tests │ ├── CMakeLists.txt │ ├── benchmark-test.cc │ ├── block_allocator_test.cc │ ├── bnc-insert-benchmark.cc │ ├── cachetable-4357.cc │ ├── cachetable-4365.cc │ ├── cachetable-5097.cc │ ├── cachetable-5978-2.cc │ ├── cachetable-5978.cc │ ├── cachetable-all-write.cc │ ├── cachetable-checkpoint-pending.cc │ ├── cachetable-checkpoint-pinned-nodes.cc │ ├── cachetable-checkpoint-prefetched-nodes.cc │ ├── cachetable-checkpoint-test.cc │ ├── cachetable-checkpointer-class.cc │ ├── cachetable-cleaner-checkpoint.cc │ ├── cachetable-cleaner-checkpoint2.cc │ ├── cachetable-cleaner-thread-attrs-accumulate.cc │ ├── cachetable-cleaner-thread-empty-cachetable.cc │ ├── cachetable-cleaner-thread-everything-pinned.cc │ ├── cachetable-cleaner-thread-nothing-needs-flushing.cc │ ├── cachetable-cleaner-thread-same-fullhash.cc │ ├── cachetable-cleaner-thread-simple.cc │ ├── cachetable-clock-all-pinned.cc │ ├── cachetable-clock-eviction.cc │ ├── cachetable-clock-eviction2.cc │ ├── cachetable-clock-eviction3.cc │ ├── cachetable-clock-eviction4.cc │ ├── cachetable-clone-checkpoint.cc │ ├── cachetable-clone-partial-fetch-pinned-node.cc │ ├── cachetable-clone-partial-fetch.cc │ ├── cachetable-clone-pin-nonblocking.cc │ ├── cachetable-clone-unpin-remove.cc │ ├── cachetable-count-pinned-test.cc │ ├── cachetable-debug-test.cc │ ├── cachetable-eviction-close-test.cc │ ├── cachetable-eviction-close-test2.cc │ ├── cachetable-eviction-getandpin-test.cc │ ├── cachetable-eviction-getandpin-test2.cc │ ├── cachetable-evictor-class.cc │ ├── cachetable-fd-test.cc │ ├── cachetable-fetch-inducing-evictor.cc │ ├── cachetable-flush-during-cleaner.cc │ ├── cachetable-flush-test.cc │ ├── cachetable-getandpin-test.cc │ ├── cachetable-kibbutz_and_flush_cachefile.cc │ ├── cachetable-partial-fetch.cc │ ├── cachetable-pin-checkpoint.cc │ ├── cachetable-pin-nonblocking-checkpoint-clean.cc │ ├── cachetable-prefetch-checkpoint-test.cc │ ├── cachetable-prefetch-close-leak-test.cc │ ├── cachetable-prefetch-close-test.cc │ ├── cachetable-prefetch-flowcontrol-test.cc │ ├── cachetable-prefetch-getandpin-test.cc │ ├── cachetable-prefetch-maybegetandpin-test.cc │ ├── cachetable-prefetch2-test.cc │ ├── cachetable-put-checkpoint.cc │ ├── cachetable-put-test.cc │ ├── cachetable-reserve-filenum.cc │ ├── cachetable-rwlock-test.cc │ ├── cachetable-simple-clone.cc │ ├── cachetable-simple-clone2.cc │ ├── cachetable-simple-close.cc │ ├── cachetable-simple-maybe-get-pin.cc │ ├── cachetable-simple-pin-cheap.cc │ ├── cachetable-simple-pin-dep-nodes.cc │ ├── cachetable-simple-pin-nonblocking-cheap.cc │ ├── cachetable-simple-pin-nonblocking.cc │ ├── cachetable-simple-pin.cc │ ├── cachetable-simple-put-dep-nodes.cc │ ├── cachetable-simple-read-pin-nonblocking.cc │ ├── cachetable-simple-read-pin.cc │ ├── cachetable-simple-unpin-remove-checkpoint.cc │ ├── cachetable-simple-verify.cc │ ├── cachetable-test.cc │ ├── cachetable-test.h │ ├── cachetable-unpin-and-remove-test.cc │ ├── cachetable-unpin-remove-and-checkpoint.cc │ ├── cachetable-unpin-test.cc │ ├── cachetable-writer-thread-limit.cc │ ├── comparator-test.cc │ ├── compress-test.cc │ ├── dbufio-test-destroy.cc │ ├── dbufio-test.cc │ ├── dmt-test.cc │ ├── dmt-test2.cc │ ├── fifo-test.cc │ ├── ft-bfe-query.cc │ ├── ft-clock-test.cc │ ├── ft-serialize-benchmark.cc │ ├── ft-serialize-sub-block-test.cc │ ├── ft-serialize-test.cc │ ├── ft-test-cursor-2.cc │ ├── ft-test-cursor.cc │ ├── ft-test-header.cc │ ├── ft-test.cc │ ├── ft-test0.cc │ ├── ft-test1.cc │ ├── ft-test2.cc │ ├── ft-test3.cc │ ├── ft-test4.cc │ ├── ft-test5.cc │ ├── ftloader-error-injector.h │ ├── ftloader-test-bad-generate.cc │ ├── ftloader-test-extractor-errors.cc │ ├── ftloader-test-extractor.cc │ ├── ftloader-test-merge-files-dbufio.cc │ ├── ftloader-test-open.cc │ ├── ftloader-test-vm.cc │ ├── ftloader-test-writer-errors.cc │ ├── ftloader-test-writer.cc │ ├── ftloader-test.cc │ ├── generate-upgrade-recovery-logs.cc │ ├── is_empty.cc │ ├── keyrange.cc │ ├── keytest.cc │ ├── le-cursor-provdel.cc │ ├── le-cursor-right.cc │ ├── le-cursor-walk.cc │ ├── list-test.cc │ ├── log-test-maybe-trim.cc │ ├── log-test.cc │ ├── log-test2.cc │ ├── log-test3.cc │ ├── log-test4.cc │ ├── log-test5.cc │ ├── log-test6.cc │ ├── log-test7.cc │ ├── logcursor-bad-checksum.cc │ ├── logcursor-bw.cc │ ├── logcursor-empty-logdir.cc │ ├── logcursor-empty-logfile-2.cc │ ├── logcursor-empty-logfile-3.cc │ ├── logcursor-empty-logfile.cc │ ├── logcursor-fw.cc │ ├── logcursor-print.cc │ ├── logcursor-timestamp.cc │ ├── logfilemgr-create-destroy.cc │ ├── logfilemgr-print.cc │ ├── make-tree.cc │ ├── mempool-115.cc │ ├── msnfilter.cc │ ├── orthopush-flush.cc │ ├── pqueue-test.cc │ ├── quicklz-test.cc │ ├── recovery-bad-last-entry.cc │ ├── recovery-cbegin-cend-hello.cc │ ├── recovery-cbegin-cend.cc │ ├── recovery-cbegin.cc │ ├── recovery-cend-cbegin.cc │ ├── recovery-datadir-is-file.cc │ ├── recovery-empty.cc │ ├── recovery-fopen-missing-file.cc │ ├── recovery-hello.cc │ ├── recovery-lsn-error-during-forward-scan.cc │ ├── recovery-no-datadir.cc │ ├── recovery-no-log.cc │ ├── recovery-no-logdir.cc │ ├── recovery-test5123.cc │ ├── shortcut.cc │ ├── subblock-test-checksum.cc │ ├── subblock-test-compression.cc │ ├── subblock-test-index.cc │ ├── subblock-test-size.cc │ ├── test-TDB2-pe.cc │ ├── test-TDB89.cc │ ├── test-assert.cc │ ├── test-bjm.cc │ ├── test-checkpoint-during-flush.cc │ ├── test-checkpoint-during-merge.cc │ ├── test-checkpoint-during-rebalance.cc │ ├── test-checkpoint-during-split.cc │ ├── test-del-inorder.cc │ ├── test-dirty-flushes-on-cleaner.cc │ ├── test-dump-ft.cc │ ├── test-flushes-on-cleaner.cc │ ├── test-ft-overflow.cc │ ├── test-ft-txns.h │ ├── test-hot-with-bounds.cc │ ├── test-inc-split.cc │ ├── test-leafentry-child-txn.cc │ ├── test-leafentry-nested.cc │ ├── test-merges-on-cleaner.cc │ ├── test-oldest-referenced-xid-flush.cc │ ├── test-pick-child-to-flush.cc │ ├── test-rbtree-insert-remove-with-mhs.cc │ ├── test-rbtree-insert-remove-without-mhs.cc │ ├── test-txn-child-manager.cc │ ├── test-upgrade-recovery-logs.cc │ ├── test.h │ ├── test1308a.cc │ ├── test3681.cc │ ├── test3856.cc │ ├── test3884.cc │ ├── test4115.cc │ ├── test4244.cc │ ├── test_logcursor.cc │ ├── test_oexcl.cc │ ├── test_rightmost_leaf_seqinsert_heuristic.cc │ ├── test_rightmost_leaf_split_merge.cc │ ├── test_toku_malloc_plain_free.cc │ ├── upgrade.data │ │ ├── upgrade-recovery-logs-24-clean │ │ │ └── log000000000000.tokulog24 │ │ ├── upgrade-recovery-logs-24-dirty │ │ │ └── log000000000000.tokulog24 │ │ ├── upgrade-recovery-logs-25-clean │ │ │ └── log000000000000.tokulog25 │ │ ├── upgrade-recovery-logs-25-dirty │ │ │ └── log000000000000.tokulog25 │ │ ├── upgrade-recovery-logs-26-clean │ │ │ └── log000000000000.tokulog26 │ │ ├── upgrade-recovery-logs-26-dirty │ │ │ └── log000000000000.tokulog26 │ │ ├── upgrade-recovery-logs-27-clean │ │ │ └── log000000000000.tokulog27 │ │ ├── upgrade-recovery-logs-27-dirty │ │ │ └── log000000000000.tokulog27 │ │ ├── upgrade-recovery-logs-28-clean │ │ │ └── log000000000000.tokulog28 │ │ ├── upgrade-recovery-logs-28-dirty │ │ │ └── log000000000000.tokulog28 │ │ ├── upgrade-recovery-logs-29-clean │ │ │ └── log000000000000.tokulog29 │ │ └── upgrade-recovery-logs-29-dirty │ │ │ └── log000000000000.tokulog29 │ ├── upgrade_test_simple.cc │ ├── verify-bad-msn.cc │ ├── verify-bad-pivots.cc │ ├── verify-dup-in-leaf.cc │ ├── verify-dup-pivots.cc │ ├── verify-misrouted-msgs.cc │ ├── verify-unsorted-leaf.cc │ ├── verify-unsorted-pivots.cc │ ├── xid_lsn_independent.cc │ └── ybt-test.cc ├── txn │ ├── roll.cc │ ├── rollback-apply.cc │ ├── rollback-apply.h │ ├── rollback-ct-callbacks.cc │ ├── rollback-ct-callbacks.h │ ├── rollback.cc │ ├── rollback.h │ ├── rollback_log_node_cache.cc │ ├── rollback_log_node_cache.h │ ├── txn.cc │ ├── txn.h │ ├── txn_child_manager.cc │ ├── txn_child_manager.h │ ├── txn_manager.cc │ ├── txn_manager.h │ ├── txn_state.h │ ├── xids.cc │ └── xids.h ├── ule-internal.h ├── ule.cc ├── ule.h └── valgrind.suppressions ├── ftcxx ├── CMakeLists.txt ├── buffer.cpp ├── buffer.hpp ├── cursor-inl.hpp ├── cursor.cpp ├── cursor.hpp ├── db.hpp ├── db_env-inl.hpp ├── db_env.cpp ├── db_env.hpp ├── db_txn.hpp ├── exceptions.hpp ├── malloc_utils.cpp ├── malloc_utils.hpp ├── slice.hpp ├── stats.hpp └── tests │ ├── CMakeLists.txt │ ├── buffer_test.cpp │ ├── cursor_test.cpp │ └── doubling_buffer.cpp ├── locktree ├── CMakeLists.txt ├── concurrent_tree.cc ├── concurrent_tree.h ├── keyrange.cc ├── keyrange.h ├── lock_request.cc ├── lock_request.h ├── locktree.cc ├── locktree.h ├── manager.cc ├── range_buffer.cc ├── range_buffer.h ├── tests │ ├── CMakeLists.txt │ ├── concurrent_tree_create_destroy.cc │ ├── concurrent_tree_lkr_acquire_release.cc │ ├── concurrent_tree_lkr_insert_remove.cc │ ├── concurrent_tree_lkr_insert_serial_large.cc │ ├── concurrent_tree_lkr_remove_all.cc │ ├── concurrent_tree_unit_test.h │ ├── kill_waiter.cc │ ├── lock_request_create_set.cc │ ├── lock_request_get_set_keys.cc │ ├── lock_request_killed.cc │ ├── lock_request_not_killed.cc │ ├── lock_request_start_deadlock.cc │ ├── lock_request_start_pending.cc │ ├── lock_request_start_release_wait.cc │ ├── lock_request_start_retry_race.cc │ ├── lock_request_start_retry_race_3.cc │ ├── lock_request_start_retry_wait_race_2.cc │ ├── lock_request_unit_test.h │ ├── lock_request_wait_time_callback.cc │ ├── locktree_conflicts.cc │ ├── locktree_create_destroy.cc │ ├── locktree_escalation_1big7lt_1small.cc │ ├── locktree_escalation_2big_1lt.cc │ ├── locktree_escalation_2big_2lt.cc │ ├── locktree_escalation_impossible.cc │ ├── locktree_escalation_stalls.cc │ ├── locktree_infinity.cc │ ├── locktree_misc.cc │ ├── locktree_overlapping_relock.cc │ ├── locktree_simple_lock.cc │ ├── locktree_single_txnid_optimization.cc │ ├── locktree_unit_test.h │ ├── manager_create_destroy.cc │ ├── manager_locktree_map.cc │ ├── manager_parallel_locktree_get_release.cc │ ├── manager_params.cc │ ├── manager_reference_release_lt.cc │ ├── manager_status.cc │ ├── manager_unit_test.h │ ├── range_buffer_test.cc │ ├── test.h │ ├── txnid_set_test.cc │ └── wfg_test.cc ├── treenode.cc ├── treenode.h ├── txnid_set.cc ├── txnid_set.h ├── wfg.cc └── wfg.h ├── portability ├── CMakeLists.txt ├── file.cc ├── huge_page_detection.cc ├── memory.cc ├── memory.h ├── os_malloc.cc ├── portability.cc ├── tests │ ├── CMakeLists.txt │ ├── ensure_memcheck_fails.sh │ ├── rwlock_condvar.h │ ├── test-active-cpus.cc │ ├── test-cache-line-boundary-fails.cc │ ├── test-cpu-freq-openlimit17.cc │ ├── test-cpu-freq.cc │ ├── test-filesystem-sizes.cc │ ├── test-flock.cc │ ├── test-fsync-directory.cc │ ├── test-fsync.cc │ ├── test-gettime.cc │ ├── test-gettimeofday.cc │ ├── test-hugepage.cc │ ├── test-max-data.cc │ ├── test-memory-status.cc │ ├── test-pagesize.cc │ ├── test-pthread-rwlock-rdlock.cc │ ├── test-pthread-rwlock-rwr.cc │ ├── test-pwrite4g.cc │ ├── test-snprintf.cc │ ├── test-stat.cc │ ├── test-toku-malloc.cc │ ├── test-xid.cc │ ├── test.h │ ├── try-assert-zero.cc │ ├── try-assert0.cc │ ├── try-leak-lost.cc │ ├── try-leak-reachable.cc │ └── try-uninit.cc ├── toku_assert.cc ├── toku_assert.h ├── toku_atomic.h ├── toku_byteswap.h ├── toku_config.h.in ├── toku_crash.cc ├── toku_crash.h ├── toku_debug_sync.h ├── toku_htod.h ├── toku_htonl.h ├── toku_instr_mysql.cc ├── toku_instr_mysql.h ├── toku_instrumentation.h ├── toku_list.h ├── toku_os.h ├── toku_os_types.h ├── toku_path.cc ├── toku_path.h ├── toku_portability.h ├── toku_pthread.cc ├── toku_pthread.h ├── toku_race_tools.h ├── toku_random.h ├── toku_stdint.h ├── toku_stdlib.h ├── toku_time.cc └── toku_time.h ├── scripts ├── run-all-nightly-tests.bash ├── run-nightly-coverage-tests.bash ├── run-nightly-drd-tests.bash ├── run-nightly-release-tests.bash ├── run.fractal.tree.tests.cmake ├── run.stress-tests-forever.bash ├── run.stress-tests.py ├── tokugrind ├── tokuvalgrind └── watch.stress-tests.bash ├── src ├── CMakeLists.txt ├── errors.cc ├── export.map ├── indexer-internal.h ├── indexer-undo-do.cc ├── indexer.cc ├── indexer.h ├── loader.cc ├── loader.h ├── tests │ ├── CMakeLists.txt │ ├── big-nested-abort-abort.cc │ ├── big-nested-abort-commit.cc │ ├── big-nested-commit-abort.cc │ ├── big-nested-commit-commit.cc │ ├── big-shutdown.cc │ ├── bigtxn27.cc │ ├── blackhole.cc │ ├── blocking-first-empty.cc │ ├── blocking-first.cc │ ├── blocking-last.cc │ ├── blocking-next-prev-deadlock.cc │ ├── blocking-next-prev.cc │ ├── blocking-prelock-range.cc │ ├── blocking-put-timeout.cc │ ├── blocking-put-wakeup.cc │ ├── blocking-put.cc │ ├── blocking-set-range-0.cc │ ├── blocking-set-range-n.cc │ ├── blocking-set-range-reverse-0.cc │ ├── blocking-set.cc │ ├── blocking-table-lock.cc │ ├── bug1381.cc │ ├── cachetable-race.cc │ ├── checkpoint1.cc │ ├── checkpoint_fairness.cc │ ├── checkpoint_stress.cc │ ├── checkpoint_test.h │ ├── create-datadir.cc │ ├── cursor-isolation.cc │ ├── cursor-more-than-a-leaf-provdel.cc │ ├── cursor-set-del-rmw.cc │ ├── cursor-set-range-rmw.cc │ ├── cursor-step-over-delete.cc │ ├── db-put-simple-deadlock-threads.cc │ ├── db-put-simple-deadlock.cc │ ├── db-put-simple-lockwait.cc │ ├── db-put-update-deadlock.cc │ ├── dbremove-nofile-limit.cc │ ├── del-multiple-huge-primary-row.cc │ ├── del-multiple-srcdb.cc │ ├── del-multiple.cc │ ├── del-simple.cc │ ├── directory_lock.cc │ ├── diskfull.cc │ ├── drd.suppressions │ ├── dump-env.cc │ ├── env-put-multiple.cc │ ├── env_loader_memory.cc │ ├── env_nproc.cc │ ├── env_startup.cc │ ├── filesize.cc │ ├── get_key_after_bytes_unit.cc │ ├── get_last_key.cc │ ├── helgrind.suppressions │ ├── helgrind1.cc │ ├── helgrind2.cc │ ├── helgrind3.cc │ ├── hot-optimize-table-tests.cc │ ├── hotindexer-bw.cc │ ├── hotindexer-error-callback.cc │ ├── hotindexer-insert-committed-optimized.cc │ ├── hotindexer-insert-committed.cc │ ├── hotindexer-insert-provisional.cc │ ├── hotindexer-lock-test.cc │ ├── hotindexer-multiclient.cc │ ├── hotindexer-nested-insert-committed.cc │ ├── hotindexer-put-abort.cc │ ├── hotindexer-put-commit.cc │ ├── hotindexer-put-multiple.cc │ ├── hotindexer-simple-abort-put.cc │ ├── hotindexer-simple-abort.cc │ ├── hotindexer-undo-do-test.cc │ ├── hotindexer-undo-do-tests │ │ ├── README │ │ ├── commit.d0.d100.d200.result │ │ ├── commit.d0.d100.d200.test │ │ ├── commit.d0.d100.i200.result │ │ ├── commit.d0.d100.i200.test │ │ ├── commit.d0.d100.result │ │ ├── commit.d0.d100.test │ │ ├── commit.d0.i100.d200.result │ │ ├── commit.d0.i100.d200.test │ │ ├── commit.d0.i100.i200.result │ │ ├── commit.d0.i100.i200.test │ │ ├── commit.d0.i100.result │ │ ├── commit.d0.i100.test │ │ ├── commit.d0.result │ │ ├── commit.d0.test │ │ ├── commit.i0.d100.d200.result │ │ ├── commit.i0.d100.d200.test │ │ ├── commit.i0.d100.i200.result │ │ ├── commit.i0.d100.i200.test │ │ ├── commit.i0.d100.result │ │ ├── commit.i0.d100.test │ │ ├── commit.i0.i100.d200.result │ │ ├── commit.i0.i100.d200.test │ │ ├── commit.i0.i100.i200.result │ │ ├── commit.i0.i100.i200.test │ │ ├── commit.i0.i100.result │ │ ├── commit.i0.i100.test │ │ ├── commit.i0.result │ │ ├── commit.i0.test │ │ ├── insert.300.result │ │ ├── insert.300.test │ │ ├── placeholder.0.live.result │ │ ├── placeholder.0.live.test │ │ ├── placeholder.0.result │ │ ├── placeholder.0.test │ │ ├── placeholder.1.live.result │ │ ├── placeholder.1.live.test │ │ ├── placeholder.2.live.result │ │ ├── placeholder.2.live.test │ │ ├── placeholder.2.result │ │ ├── placeholder.2.test │ │ ├── placeholder.3.result │ │ ├── placeholder.3.test │ │ ├── prov-2.py │ │ ├── prov.1.live.result │ │ ├── prov.1.live.test │ │ ├── prov.1.result │ │ ├── prov.1.test │ │ ├── prov.aborting.d0.i100.result │ │ ├── prov.aborting.d0.i100.test │ │ ├── prov.aborting.i100.i200.result │ │ ├── prov.aborting.i100.i200.test │ │ ├── prov.committing.d0.i100.result │ │ ├── prov.committing.d0.i100.test │ │ ├── prov.committing.i100.i200.result │ │ ├── prov.committing.i100.i200.test │ │ ├── prov.d0.d100.result │ │ ├── prov.d0.d100.test │ │ ├── prov.d0.d200.d201.result │ │ ├── prov.d0.d200.d201.test │ │ ├── prov.d0.d200.i201.result │ │ ├── prov.d0.d200.i201.test │ │ ├── prov.d0.i100.result │ │ ├── prov.d0.i100.test │ │ ├── prov.d0.i200.d201.result │ │ ├── prov.d0.i200.d201.test │ │ ├── prov.d0.i200.i201.result │ │ ├── prov.d0.i200.i201.test │ │ ├── prov.d0.p200.d201.result │ │ ├── prov.d0.p200.d201.test │ │ ├── prov.d0.p200.i201.result │ │ ├── prov.d0.p200.i201.test │ │ ├── prov.i0.d100.result │ │ ├── prov.i0.d100.test │ │ ├── prov.i0.d200.d201.result │ │ ├── prov.i0.d200.d201.test │ │ ├── prov.i0.d200.i201.result │ │ ├── prov.i0.d200.i201.test │ │ ├── prov.i0.i100.result │ │ ├── prov.i0.i100.test │ │ ├── prov.i0.i200.d201.result │ │ ├── prov.i0.i200.d201.test │ │ ├── prov.i0.i200.i201.result │ │ ├── prov.i0.i200.i201.test │ │ ├── prov.i0.p200.d201.result │ │ ├── prov.i0.p200.d201.test │ │ ├── prov.i0.p200.i201.result │ │ ├── prov.i0.p200.i201.test │ │ ├── prov.live.d0.d100.result │ │ ├── prov.live.d0.d100.test │ │ ├── prov.live.d0.i100.result │ │ ├── prov.live.d0.i100.test │ │ ├── prov.live.i0.d100.result │ │ ├── prov.live.i0.d100.test │ │ ├── prov.live.i0.i100.result │ │ ├── prov.live.i0.i100.test │ │ ├── prov.live200,201.d0.d200.d201.result │ │ ├── prov.live200,201.d0.d200.d201.test │ │ ├── prov.live200,201.d0.d200.i201.result │ │ ├── prov.live200,201.d0.d200.i201.test │ │ ├── prov.live200,201.d0.i200.d201.result │ │ ├── prov.live200,201.d0.i200.d201.test │ │ ├── prov.live200,201.d0.i200.i201.result │ │ ├── prov.live200,201.d0.i200.i201.test │ │ ├── prov.live200,201.d0.p200.d201.result │ │ ├── prov.live200,201.d0.p200.d201.test │ │ ├── prov.live200,201.d0.p200.i201.result │ │ ├── prov.live200,201.d0.p200.i201.test │ │ ├── prov.live200,201.i0.d200.d201.result │ │ ├── prov.live200,201.i0.d200.d201.test │ │ ├── prov.live200,201.i0.d200.i201.result │ │ ├── prov.live200,201.i0.d200.i201.test │ │ ├── prov.live200,201.i0.i200.d201.result │ │ ├── prov.live200,201.i0.i200.d201.test │ │ ├── prov.live200,201.i0.i200.i201.result │ │ ├── prov.live200,201.i0.i200.i201.test │ │ ├── prov.live200,201.i0.p200.d201.result │ │ ├── prov.live200,201.i0.p200.d201.test │ │ ├── prov.live200,201.i0.p200.i201.result │ │ ├── prov.live200,201.i0.p200.i201.test │ │ ├── prov.live200.abort201.commit202.i0.i200.i201.i202.result │ │ ├── prov.live200.abort201.commit202.i0.i200.i201.i202.test │ │ ├── prov.live200.abort201.i0.i200.i201.result │ │ ├── prov.live200.abort201.i0.i200.i201.test │ │ ├── prov.live200.committing201.i0.i200.i201.result │ │ ├── prov.live200.committing201.i0.i200.i201.test │ │ ├── prov.live200.d0.d200.d201.result │ │ ├── prov.live200.d0.d200.d201.test │ │ ├── prov.live200.d0.d200.i201.result │ │ ├── prov.live200.d0.d200.i201.test │ │ ├── prov.live200.d0.i200.d201.result │ │ ├── prov.live200.d0.i200.d201.test │ │ ├── prov.live200.d0.i200.i201.result │ │ ├── prov.live200.d0.i200.i201.test │ │ ├── prov.live200.d0.p200.d201.result │ │ ├── prov.live200.d0.p200.d201.test │ │ ├── prov.live200.d0.p200.i201.result │ │ ├── prov.live200.d0.p200.i201.test │ │ ├── prov.live200.i0.d200.d201.result │ │ ├── prov.live200.i0.d200.d201.test │ │ ├── prov.live200.i0.d200.i201.result │ │ ├── prov.live200.i0.d200.i201.test │ │ ├── prov.live200.i0.i200.d201.result │ │ ├── prov.live200.i0.i200.d201.test │ │ ├── prov.live200.i0.i200.i201.result │ │ ├── prov.live200.i0.i200.i201.test │ │ ├── prov.live200.i0.p200.d201.result │ │ ├── prov.live200.i0.p200.d201.test │ │ ├── prov.live200.i0.p200.i201.result │ │ ├── prov.live200.i0.p200.i201.test │ │ ├── prov.preparing.d0.i100.result │ │ ├── prov.preparing.d0.i100.test │ │ ├── prov.preparing.d0.i200.i201.result │ │ └── prov.preparing.d0.i200.i201.test │ ├── hotindexer-with-queries.cc │ ├── inflate.cc │ ├── inflate2.cc │ ├── insert-dup-prelock.cc │ ├── ipm.py │ ├── isolation-read-committed.cc │ ├── isolation.cc │ ├── key-val.h │ ├── keyrange-merge.cc │ ├── keyrange.cc │ ├── last-verify-time.cc │ ├── loader-cleanup-test.cc │ ├── loader-close-nproc-limit.cc │ ├── loader-create-abort.cc │ ├── loader-create-close.cc │ ├── loader-create-commit-nproc-limit.cc │ ├── loader-create-nproc-limit.cc │ ├── loader-dup-test.cc │ ├── loader-no-puts.cc │ ├── loader-reference-test.cc │ ├── loader-stress-del.cc │ ├── loader-stress-test.cc │ ├── loader-tpch-load.cc │ ├── locktree_escalation_stalls.cc │ ├── manyfiles.cc │ ├── maxsize-for-loader.cc │ ├── medium-nested-commit-commit.cc │ ├── multiprocess.cc │ ├── mvcc-create-table.cc │ ├── mvcc-many-committed.cc │ ├── mvcc-read-committed.cc │ ├── openlimit17-locktree.cc │ ├── openlimit17-metafiles.cc │ ├── openlimit17.cc │ ├── perf_checkpoint_var.cc │ ├── perf_child_txn.cc │ ├── perf_cursor_nop.cc │ ├── perf_iibench.cc │ ├── perf_insert.cc │ ├── perf_malloc_free.cc │ ├── perf_nop.cc │ ├── perf_partitioned_counter.cc │ ├── perf_ptquery.cc │ ├── perf_ptquery2.cc │ ├── perf_rangequery.cc │ ├── perf_read_txn.cc │ ├── perf_read_txn_single_thread.cc │ ├── perf_read_write.cc │ ├── perf_root_txn.cc │ ├── perf_simple_counter.cc │ ├── perf_thread_counter.cc │ ├── perf_txn_single_thread.cc │ ├── powerfail.cc │ ├── preload-db-nested.cc │ ├── preload-db.cc │ ├── prelock-read-read.cc │ ├── prelock-read-write.cc │ ├── prelock-write-read.cc │ ├── prelock-write-write.cc │ ├── print_engine_status.cc │ ├── progress.cc │ ├── put-del-multiple-array-indexing.cc │ ├── queries_with_deletes.cc │ ├── recover-2483.cc │ ├── recover-3113.cc │ ├── recover-5146.cc │ ├── recover-checkpoint-fcreate-fdelete-fcreate.cc │ ├── recover-checkpoint-fopen-abort.cc │ ├── recover-checkpoint-fopen-commit.cc │ ├── recover-child-rollback.cc │ ├── recover-compare-db-descriptor.cc │ ├── recover-compare-db.cc │ ├── recover-del-multiple-abort.cc │ ├── recover-del-multiple-srcdb-fdelete-all.cc │ ├── recover-del-multiple.cc │ ├── recover-delboth-after-checkpoint.cc │ ├── recover-delboth-checkpoint.cc │ ├── recover-descriptor.cc │ ├── recover-descriptor10.cc │ ├── recover-descriptor11.cc │ ├── recover-descriptor12.cc │ ├── recover-descriptor2.cc │ ├── recover-descriptor3.cc │ ├── recover-descriptor4.cc │ ├── recover-descriptor5.cc │ ├── recover-descriptor6.cc │ ├── recover-descriptor7.cc │ ├── recover-descriptor8.cc │ ├── recover-descriptor9.cc │ ├── recover-fassociate.cc │ ├── recover-fclose-in-checkpoint.cc │ ├── recover-fcreate-basementnodesize.cc │ ├── recover-fcreate-fclose.cc │ ├── recover-fcreate-fdelete.cc │ ├── recover-fcreate-nodesize.cc │ ├── recover-fcreate-xabort.cc │ ├── recover-flt1.cc │ ├── recover-flt10.cc │ ├── recover-flt2.cc │ ├── recover-flt3.cc │ ├── recover-flt4.cc │ ├── recover-flt5.cc │ ├── recover-flt6.cc │ ├── recover-flt7.cc │ ├── recover-flt8.cc │ ├── recover-flt9.cc │ ├── recover-fopen-checkpoint-fclose.cc │ ├── recover-fopen-fclose-checkpoint.cc │ ├── recover-fopen-fdelete-checkpoint-fcreate.cc │ ├── recover-hotindexer-simple-abort-put.cc │ ├── recover-loader-test.cc │ ├── recover-lsn-filter-multiple.cc │ ├── recover-lsn-filter.cc │ ├── recover-missing-dbfile-2.cc │ ├── recover-missing-dbfile.cc │ ├── recover-missing-logfile.cc │ ├── recover-put-multiple-abort.cc │ ├── recover-put-multiple-fdelete-all.cc │ ├── recover-put-multiple-fdelete-some.cc │ ├── recover-put-multiple-srcdb-fdelete-all.cc │ ├── recover-put-multiple.cc │ ├── recover-rollback.cc │ ├── recover-rollinclude.cc │ ├── recover-split-checkpoint.cc │ ├── recover-straddle-txn-nested.cc │ ├── recover-straddle-txn.cc │ ├── recover-tablelock.cc │ ├── recover-test-logsuppress-put.cc │ ├── recover-test-logsuppress.cc │ ├── recover-test1.cc │ ├── recover-test2.cc │ ├── recover-test3.cc │ ├── recover-test_crash_in_flusher_thread.h │ ├── recover-test_stress1.cc │ ├── recover-test_stress2.cc │ ├── recover-test_stress3.cc │ ├── recover-test_stress_openclose.cc │ ├── recover-update-multiple-abort.cc │ ├── recover-update-multiple.cc │ ├── recover-update_aborts.cc │ ├── recover-update_aborts_before_checkpoint.cc │ ├── recover-update_aborts_before_close.cc │ ├── recover-update_broadcast_aborts.cc │ ├── recover-update_broadcast_aborts2.cc │ ├── recover-update_broadcast_aborts3.cc │ ├── recover-update_broadcast_aborts_before_checkpoint.cc │ ├── recover-update_broadcast_aborts_before_close.cc │ ├── recover-update_broadcast_changes_values.cc │ ├── recover-update_broadcast_changes_values2.cc │ ├── recover-update_broadcast_changes_values3.cc │ ├── recover-update_broadcast_changes_values_before_checkpoint.cc │ ├── recover-update_broadcast_changes_values_before_close.cc │ ├── recover-update_changes_values.cc │ ├── recover-update_changes_values_before_checkpoint.cc │ ├── recover-update_changes_values_before_close.cc │ ├── recover-upgrade-db-descriptor-multihandle.cc │ ├── recover-upgrade-db-descriptor.cc │ ├── recover-x1-abort.cc │ ├── recover-x1-commit.cc │ ├── recover-x1-nested-abort.cc │ ├── recover-x1-nested-commit.cc │ ├── recover-x2-abort.cc │ ├── recover-x2-commit.cc │ ├── recovery_fileops_stress.cc │ ├── recovery_fileops_unit.cc │ ├── recovery_stress.cc │ ├── redirect.cc │ ├── replace-into-write-lock.cc │ ├── rollback-inconsistency.cc │ ├── root_fifo_1.cc │ ├── root_fifo_2.cc │ ├── root_fifo_31.cc │ ├── root_fifo_32.cc │ ├── root_fifo_41.cc │ ├── rowsize.cc │ ├── run-hotindexer-undo-do-tests.bash │ ├── run_abortrecover_test.sh │ ├── run_checkpoint_stress_test.sh │ ├── run_diskfull_test.sh │ ├── run_powerfail_test.py │ ├── run_recover_stress_test.sh │ ├── run_recover_test.sh │ ├── run_recovery_fileops_unit.sh │ ├── run_stress_test.py │ ├── run_test_thread_stack.sh │ ├── seqinsert.cc │ ├── shutdown-3344.cc │ ├── simple.cc │ ├── stat64-create-modify-times.cc │ ├── stat64-null-txn.cc │ ├── stat64-root-changes.cc │ ├── stat64.cc │ ├── stress-gc.cc │ ├── stress-gc2.cc │ ├── stress-test.cc │ ├── stress_openclose.h │ ├── test-5138.cc │ ├── test-nested-xopen-eclose.cc │ ├── test-prepare.cc │ ├── test-prepare2.cc │ ├── test-prepare3.cc │ ├── test-rollinclude.cc │ ├── test-xa-prepare.cc │ ├── test-xopen-eclose.cc │ ├── test.h │ ├── test1572.cc │ ├── test1753.cc │ ├── test1842.cc │ ├── test3039.cc │ ├── test3219.cc │ ├── test3522.cc │ ├── test3522b.cc │ ├── test3529.cc │ ├── test4573-logtrim.cc │ ├── test5092.cc │ ├── test938.cc │ ├── test938b.cc │ ├── test938c.cc │ ├── test_1672532.cc │ ├── test_3529_insert_2.cc │ ├── test_3529_table_lock.cc │ ├── test_3645.cc │ ├── test_3755.cc │ ├── test_4015.cc │ ├── test_4368.cc │ ├── test_4657.cc │ ├── test_5015.cc │ ├── test_5469.cc │ ├── test_789.cc │ ├── test_935.cc │ ├── test_abort1.cc │ ├── test_abort2.cc │ ├── test_abort3.cc │ ├── test_abort4.cc │ ├── test_abort5.cc │ ├── test_abort_delete_first.cc │ ├── test_archive0.cc │ ├── test_archive1.cc │ ├── test_archive2.cc │ ├── test_bad_implicit_promotion.cc │ ├── test_blobs_leaf_split.cc │ ├── test_bulk_fetch.cc │ ├── test_cachesize.cc │ ├── test_cmp_descriptor.cc │ ├── test_compression_methods.cc │ ├── test_cursor_2.cc │ ├── test_cursor_3.cc │ ├── test_cursor_DB_NEXT_no_dup.cc │ ├── test_cursor_db_current.cc │ ├── test_cursor_delete2.cc │ ├── test_cursor_flags.cc │ ├── test_cursor_interrupt.cc │ ├── test_cursor_nonleaf_expand.cc │ ├── test_cursor_null.cc │ ├── test_cursor_stickyness.cc │ ├── test_cursor_with_read_txn.cc │ ├── test_db_already_exists.cc │ ├── test_db_change_pagesize.cc │ ├── test_db_change_xxx.cc │ ├── test_db_close_no_open.cc │ ├── test_db_current_clobbers_db.cc │ ├── test_db_dbt_mem_behavior.cc │ ├── test_db_delete.cc │ ├── test_db_descriptor.cc │ ├── test_db_env_open_close.cc │ ├── test_db_env_open_nocreate.cc │ ├── test_db_env_open_open_close.cc │ ├── test_db_env_set_errpfx.cc │ ├── test_db_env_set_lg_dir.cc │ ├── test_db_env_set_tmp_dir.cc │ ├── test_db_env_strdup_null.cc │ ├── test_db_get_put_flags.cc │ ├── test_db_named_delete_last.cc │ ├── test_db_no_env.cc │ ├── test_db_open_notexist_reopen.cc │ ├── test_db_remove.cc │ ├── test_db_remove_subdb.cc │ ├── test_db_rowcount.cc │ ├── test_db_set_flags.cc │ ├── test_db_subdb.cc │ ├── test_db_subdb_different_flags.cc │ ├── test_db_txn_locks_nonheaviside.cc │ ├── test_db_txn_locks_read_uncommitted.cc │ ├── test_db_version.cc │ ├── test_env_close_flags.cc │ ├── test_env_create_db_create.cc │ ├── test_env_open_flags.cc │ ├── test_equal_keys_with_different_bytes.cc │ ├── test_error.cc │ ├── test_forkjoin.cc │ ├── test_get_max_row_size.cc │ ├── test_get_zeroed_dbt.cc │ ├── test_groupcommit_count.cc │ ├── test_groupcommit_perf.cc │ ├── test_hsoc.cc │ ├── test_insert_cursor_delete_insert.cc │ ├── test_insert_many_gc.cc │ ├── test_insert_memleak.cc │ ├── test_insert_unique.cc │ ├── test_iterate_live_transactions.cc │ ├── test_iterate_pending_lock_requests.cc │ ├── test_keylen_diff.cc │ ├── test_kv_gen.h │ ├── test_kv_limits.cc │ ├── test_large_update_broadcast_small_cachetable.cc │ ├── test_lock_timeout_callback.cc │ ├── test_locking_with_read_txn.cc │ ├── test_locktree_close.cc │ ├── test_log0.cc │ ├── test_log1.cc │ ├── test_log10.cc │ ├── test_log1_abort.cc │ ├── test_log2.cc │ ├── test_log2_abort.cc │ ├── test_log3.cc │ ├── test_log3_abort.cc │ ├── test_log4.cc │ ├── test_log4_abort.cc │ ├── test_log5.cc │ ├── test_log5_abort.cc │ ├── test_log6.cc │ ├── test_log6_abort.cc │ ├── test_log6a_abort.cc │ ├── test_log7.cc │ ├── test_log8.cc │ ├── test_log9.cc │ ├── test_logflush.cc │ ├── test_logmax.cc │ ├── test_memcmp_magic.cc │ ├── test_mostly_seq.cc │ ├── test_multiple_checkpoints_block_commit.cc │ ├── test_nested.cc │ ├── test_nodup_set.cc │ ├── test_query.cc │ ├── test_rand_insert.cc │ ├── test_read_txn_invalid_ops.cc │ ├── test_redirect_func.cc │ ├── test_restrict.cc │ ├── test_reverse_compare_fun.cc │ ├── test_set_func_malloc.cc │ ├── test_simple_read_txn.cc │ ├── test_stress0.cc │ ├── test_stress1.cc │ ├── test_stress2.cc │ ├── test_stress3.cc │ ├── test_stress4.cc │ ├── test_stress5.cc │ ├── test_stress6.cc │ ├── test_stress7.cc │ ├── test_stress_hot_indexing.cc │ ├── test_stress_openclose.cc │ ├── test_stress_with_verify.cc │ ├── test_thread_flags.cc │ ├── test_thread_insert.cc │ ├── test_trans_desc_during_chkpt.cc │ ├── test_trans_desc_during_chkpt2.cc │ ├── test_trans_desc_during_chkpt3.cc │ ├── test_trans_desc_during_chkpt4.cc │ ├── test_transactional_descriptor.cc │ ├── test_txn_abort5.cc │ ├── test_txn_abort5a.cc │ ├── test_txn_abort6.cc │ ├── test_txn_abort7.cc │ ├── test_txn_begin_commit.cc │ ├── test_txn_close_before_commit.cc │ ├── test_txn_close_before_prepare_commit.cc │ ├── test_txn_cursor_last.cc │ ├── test_txn_nested1.cc │ ├── test_txn_nested2.cc │ ├── test_txn_nested3.cc │ ├── test_txn_nested4.cc │ ├── test_txn_nested5.cc │ ├── test_txn_nested_abort.cc │ ├── test_txn_nested_abort2.cc │ ├── test_txn_nested_abort3.cc │ ├── test_txn_nested_abort4.cc │ ├── test_txn_read_committed_always.cc │ ├── test_txn_recover3.cc │ ├── test_unused_memory_crash.cc │ ├── test_update_abort_works.cc │ ├── test_update_broadcast_abort_works.cc │ ├── test_update_broadcast_calls_back.cc │ ├── test_update_broadcast_can_delete_elements.cc │ ├── test_update_broadcast_changes_values.cc │ ├── test_update_broadcast_indexer.cc │ ├── test_update_broadcast_loader.cc │ ├── test_update_broadcast_nested_updates.cc │ ├── test_update_broadcast_previously_deleted.cc │ ├── test_update_broadcast_stress.cc │ ├── test_update_broadcast_update_fun_has_choices.cc │ ├── test_update_broadcast_with_empty_table.cc │ ├── test_update_calls_back.cc │ ├── test_update_can_delete_elements.cc │ ├── test_update_changes_values.cc │ ├── test_update_nested_updates.cc │ ├── test_update_nonexistent_keys.cc │ ├── test_update_previously_deleted.cc │ ├── test_update_stress.cc │ ├── test_update_txn_snapshot_works_concurrently.cc │ ├── test_update_txn_snapshot_works_correctly_with_deletes.cc │ ├── test_update_with_empty_table.cc │ ├── test_updates_single_key.cc │ ├── test_weakxaction.cc │ ├── test_zero_length_keys.cc │ ├── threaded_stress_test_helpers.h │ ├── time_create_db.cc │ ├── transactional_fileops.cc │ ├── txn_manager_handle_snapshot_atomicity.cc │ ├── update-multiple-data-diagonal.cc │ ├── update-multiple-key0.cc │ ├── update-multiple-nochange.cc │ ├── update-multiple-with-indexer-array.cc │ ├── update-multiple-with-indexer.cc │ ├── update.cc │ ├── upgrade-test-1.cc │ ├── upgrade-test-2.cc │ ├── upgrade-test-3.cc │ ├── upgrade-test-4.cc │ ├── upgrade-test-5.cc │ ├── upgrade-test-6.cc │ ├── upgrade-test-7.cc │ ├── upgrade_simple.cc │ ├── xa-bigtxn-discard-abort.cc │ ├── xa-bigtxn-discard-commit.cc │ ├── xa-dirty-commit.cc │ ├── xa-dirty-rollback.cc │ ├── xa-txn-discard-abort.cc │ ├── xa-txn-discard-commit.cc │ └── zombie_db.cc ├── toku_patent.cc ├── ydb-internal.h ├── ydb.cc ├── ydb.h ├── ydb_cursor.cc ├── ydb_cursor.h ├── ydb_db.cc ├── ydb_db.h ├── ydb_env_func.cc ├── ydb_env_func.h ├── ydb_lib.cc ├── ydb_load.h ├── ydb_row_lock.cc ├── ydb_row_lock.h ├── ydb_txn.cc ├── ydb_txn.h ├── ydb_write.cc └── ydb_write.h ├── third_party ├── snappy-1.1.2 │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── aclocal.m4 │ ├── autogen.sh │ ├── config.guess │ ├── config.h.in │ ├── config.sub │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── format_description.txt │ ├── framing_format.txt │ ├── install-sh │ ├── ltmain.sh │ ├── m4 │ │ └── gtest.m4 │ ├── missing │ ├── snappy-c.cc │ ├── snappy-c.h │ ├── snappy-internal.h │ ├── snappy-sinksource.cc │ ├── snappy-sinksource.h │ ├── snappy-stubs-internal.cc │ ├── snappy-stubs-internal.h │ ├── snappy-stubs-public.h │ ├── snappy-stubs-public.h.in │ ├── snappy-test.cc │ ├── snappy-test.h │ ├── snappy.cc │ ├── snappy.h │ ├── snappy_unittest.cc │ └── testdata │ │ ├── alice29.txt │ │ ├── asyoulik.txt │ │ ├── baddata1.snappy │ │ ├── baddata2.snappy │ │ ├── baddata3.snappy │ │ ├── fireworks.jpeg │ │ ├── geo.protodata │ │ ├── html │ │ ├── html_x_4 │ │ ├── kppkn.gtb │ │ ├── lcet10.txt │ │ ├── paper-100k.pdf │ │ ├── plrabn12.txt │ │ └── urls.10K └── xz-4.999.9beta │ ├── ABOUT-NLS │ ├── AUTHORS │ ├── COPYING │ ├── COPYING.GPLv2 │ ├── COPYING.GPLv3 │ ├── COPYING.LGPLv2.1 │ ├── ChangeLog │ ├── Doxyfile.in │ ├── INSTALL │ ├── INSTALL.generic │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── PACKAGERS │ ├── README │ ├── THANKS │ ├── TODO │ ├── aclocal.m4 │ ├── autogen.sh │ ├── build-aux │ ├── compile │ ├── config.guess │ ├── config.rpath │ ├── config.sub │ ├── depcomp │ ├── install-sh │ ├── ltmain.sh │ └── missing │ ├── config.h.in │ ├── configure │ ├── configure.ac │ ├── debug │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── crc32.c │ ├── full_flush.c │ ├── hex2bin.c │ ├── known_sizes.c │ ├── memusage.c │ ├── repeat.c │ └── sync_flush.c │ ├── doc │ ├── faq.txt │ ├── history.txt │ ├── lzma-file-format.txt │ ├── man │ │ ├── pdf-a4 │ │ │ ├── xz-a4.pdf │ │ │ ├── xzdec-a4.pdf │ │ │ ├── xzdiff-a4.pdf │ │ │ ├── xzgrep-a4.pdf │ │ │ ├── xzless-a4.pdf │ │ │ └── xzmore-a4.pdf │ │ ├── pdf-letter │ │ │ ├── xz-letter.pdf │ │ │ ├── xzdec-letter.pdf │ │ │ ├── xzdiff-letter.pdf │ │ │ ├── xzgrep-letter.pdf │ │ │ ├── xzless-letter.pdf │ │ │ └── xzmore-letter.pdf │ │ └── txt │ │ │ ├── xz.txt │ │ │ ├── xzdec.txt │ │ │ ├── xzdiff.txt │ │ │ ├── xzgrep.txt │ │ │ ├── xzless.txt │ │ │ └── xzmore.txt │ └── xz-file-format.txt │ ├── dos │ ├── Makefile │ ├── README │ └── config.h │ ├── extra │ ├── 7z2lzma │ │ └── 7z2lzma.bash │ └── scanlzma │ │ └── scanlzma.c │ ├── lib │ ├── Makefile.am │ ├── Makefile.in │ ├── getopt.c │ ├── getopt.in.h │ ├── getopt1.c │ └── getopt_int.h │ ├── m4 │ ├── acx_pthread.m4 │ ├── getopt.m4 │ ├── gettext.m4 │ ├── iconv.m4 │ ├── lc_cpucores.m4 │ ├── lc_physmem.m4 │ ├── lib-ld.m4 │ ├── lib-link.m4 │ ├── lib-prefix.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ ├── lt~obsolete.m4 │ ├── nls.m4 │ ├── po.m4 │ ├── posix-shell.m4 │ ├── progtest.m4 │ └── visibility.m4 │ ├── po │ ├── LINGUAS │ ├── Makefile.in.in │ ├── Makevars │ ├── POTFILES.in │ ├── Rules-quot │ ├── boldquot.sed │ ├── en@boldquot.header │ ├── en@quot.header │ ├── insert-header.sin │ ├── quot.sed │ ├── remove-potcdate.sin │ ├── stamp-po │ └── xz.pot │ ├── src │ ├── Makefile.am │ ├── Makefile.in │ ├── common │ │ ├── bswap.h │ │ ├── common_w32res.rc │ │ ├── cpucores.h │ │ ├── integer.h │ │ ├── mythread.h │ │ ├── open_stdxxx.h │ │ ├── physmem.h │ │ └── sysdefs.h │ ├── liblzma │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── api │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── lzma.h │ │ │ └── lzma │ │ │ │ ├── base.h │ │ │ │ ├── bcj.h │ │ │ │ ├── block.h │ │ │ │ ├── check.h │ │ │ │ ├── container.h │ │ │ │ ├── delta.h │ │ │ │ ├── filter.h │ │ │ │ ├── index.h │ │ │ │ ├── index_hash.h │ │ │ │ ├── lzma.h │ │ │ │ ├── stream_flags.h │ │ │ │ ├── subblock.h │ │ │ │ ├── version.h │ │ │ │ └── vli.h │ │ ├── check │ │ │ ├── Makefile.inc │ │ │ ├── check.c │ │ │ ├── check.h │ │ │ ├── crc32_fast.c │ │ │ ├── crc32_small.c │ │ │ ├── crc32_table.c │ │ │ ├── crc32_table_be.h │ │ │ ├── crc32_table_le.h │ │ │ ├── crc32_tablegen.c │ │ │ ├── crc32_x86.S │ │ │ ├── crc64_fast.c │ │ │ ├── crc64_small.c │ │ │ ├── crc64_table.c │ │ │ ├── crc64_table_be.h │ │ │ ├── crc64_table_le.h │ │ │ ├── crc64_tablegen.c │ │ │ ├── crc64_x86.S │ │ │ ├── crc_macros.h │ │ │ └── sha256.c │ │ ├── common │ │ │ ├── Makefile.inc │ │ │ ├── alone_decoder.c │ │ │ ├── alone_decoder.h │ │ │ ├── alone_encoder.c │ │ │ ├── auto_decoder.c │ │ │ ├── block_buffer_decoder.c │ │ │ ├── block_buffer_encoder.c │ │ │ ├── block_decoder.c │ │ │ ├── block_decoder.h │ │ │ ├── block_encoder.c │ │ │ ├── block_encoder.h │ │ │ ├── block_header_decoder.c │ │ │ ├── block_header_encoder.c │ │ │ ├── block_util.c │ │ │ ├── bsr.h │ │ │ ├── common.c │ │ │ ├── common.h │ │ │ ├── easy_buffer_encoder.c │ │ │ ├── easy_decoder_memusage.c │ │ │ ├── easy_encoder.c │ │ │ ├── easy_encoder_memusage.c │ │ │ ├── easy_preset.c │ │ │ ├── easy_preset.h │ │ │ ├── filter_buffer_decoder.c │ │ │ ├── filter_buffer_encoder.c │ │ │ ├── filter_common.c │ │ │ ├── filter_common.h │ │ │ ├── filter_decoder.c │ │ │ ├── filter_decoder.h │ │ │ ├── filter_encoder.c │ │ │ ├── filter_encoder.h │ │ │ ├── filter_flags_decoder.c │ │ │ ├── filter_flags_encoder.c │ │ │ ├── index.c │ │ │ ├── index.h │ │ │ ├── index_decoder.c │ │ │ ├── index_encoder.c │ │ │ ├── index_encoder.h │ │ │ ├── index_hash.c │ │ │ ├── stream_buffer_decoder.c │ │ │ ├── stream_buffer_encoder.c │ │ │ ├── stream_decoder.c │ │ │ ├── stream_decoder.h │ │ │ ├── stream_encoder.c │ │ │ ├── stream_encoder.h │ │ │ ├── stream_flags_common.c │ │ │ ├── stream_flags_common.h │ │ │ ├── stream_flags_decoder.c │ │ │ ├── stream_flags_encoder.c │ │ │ ├── vli_decoder.c │ │ │ ├── vli_encoder.c │ │ │ └── vli_size.c │ │ ├── delta │ │ │ ├── Makefile.inc │ │ │ ├── delta_common.c │ │ │ ├── delta_common.h │ │ │ ├── delta_decoder.c │ │ │ ├── delta_decoder.h │ │ │ ├── delta_encoder.c │ │ │ ├── delta_encoder.h │ │ │ └── delta_private.h │ │ ├── liblzma.pc.in │ │ ├── liblzma_w32res.rc │ │ ├── lz │ │ │ ├── Makefile.inc │ │ │ ├── lz_decoder.c │ │ │ ├── lz_decoder.h │ │ │ ├── lz_encoder.c │ │ │ ├── lz_encoder.h │ │ │ ├── lz_encoder_hash.h │ │ │ └── lz_encoder_mf.c │ │ ├── lzma │ │ │ ├── Makefile.inc │ │ │ ├── fastpos.h │ │ │ ├── fastpos_table.c │ │ │ ├── fastpos_tablegen.c │ │ │ ├── lzma2_decoder.c │ │ │ ├── lzma2_decoder.h │ │ │ ├── lzma2_encoder.c │ │ │ ├── lzma2_encoder.h │ │ │ ├── lzma_common.h │ │ │ ├── lzma_decoder.c │ │ │ ├── lzma_decoder.h │ │ │ ├── lzma_encoder.c │ │ │ ├── lzma_encoder.h │ │ │ ├── lzma_encoder_optimum_fast.c │ │ │ ├── lzma_encoder_optimum_normal.c │ │ │ ├── lzma_encoder_presets.c │ │ │ └── lzma_encoder_private.h │ │ ├── rangecoder │ │ │ ├── Makefile.inc │ │ │ ├── price.h │ │ │ ├── price_table.c │ │ │ ├── price_tablegen.c │ │ │ ├── range_common.h │ │ │ ├── range_decoder.h │ │ │ └── range_encoder.h │ │ ├── simple │ │ │ ├── Makefile.inc │ │ │ ├── arm.c │ │ │ ├── armthumb.c │ │ │ ├── ia64.c │ │ │ ├── powerpc.c │ │ │ ├── simple_coder.c │ │ │ ├── simple_coder.h │ │ │ ├── simple_decoder.c │ │ │ ├── simple_decoder.h │ │ │ ├── simple_encoder.c │ │ │ ├── simple_encoder.h │ │ │ ├── simple_private.h │ │ │ ├── sparc.c │ │ │ └── x86.c │ │ └── subblock │ │ │ ├── Makefile.inc │ │ │ ├── subblock_decoder.c │ │ │ ├── subblock_decoder.h │ │ │ ├── subblock_decoder_helper.c │ │ │ ├── subblock_decoder_helper.h │ │ │ ├── subblock_encoder.c │ │ │ └── subblock_encoder.h │ ├── lzmainfo │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── lzmainfo.1 │ │ └── lzmainfo.c │ ├── scripts │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── xzdiff.1 │ │ ├── xzdiff.in │ │ ├── xzgrep.1 │ │ ├── xzgrep.in │ │ ├── xzless.1 │ │ ├── xzless.in │ │ ├── xzmore.1 │ │ └── xzmore.in │ ├── xz │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── args.c │ │ ├── args.h │ │ ├── coder.c │ │ ├── coder.h │ │ ├── file_io.c │ │ ├── file_io.h │ │ ├── hardware.c │ │ ├── hardware.h │ │ ├── main.c │ │ ├── main.h │ │ ├── message.c │ │ ├── message.h │ │ ├── options.c │ │ ├── options.h │ │ ├── private.h │ │ ├── signals.c │ │ ├── signals.h │ │ ├── suffix.c │ │ ├── suffix.h │ │ ├── util.c │ │ ├── util.h │ │ ├── xz.1 │ │ └── xz_w32res.rc │ └── xzdec │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── lzmadec_w32res.rc │ │ ├── xzdec.1 │ │ ├── xzdec.c │ │ └── xzdec_w32res.rc │ ├── tests │ ├── Makefile.am │ ├── Makefile.in │ ├── bcj_test.c │ ├── compress_prepared_bcj_sparc │ ├── compress_prepared_bcj_x86 │ ├── create_compress_files.c │ ├── files │ │ ├── README │ │ ├── bad-0-backward_size.xz │ │ ├── bad-0-empty-truncated.xz │ │ ├── bad-0-footer_magic.xz │ │ ├── bad-0-header_magic.xz │ │ ├── bad-0-nonempty_index.xz │ │ ├── bad-0cat-alone.xz │ │ ├── bad-0cat-header_magic.xz │ │ ├── bad-0catpad-empty.xz │ │ ├── bad-0pad-empty.xz │ │ ├── bad-1-block_header-1.xz │ │ ├── bad-1-block_header-2.xz │ │ ├── bad-1-block_header-3.xz │ │ ├── bad-1-block_header-4.xz │ │ ├── bad-1-block_header-5.xz │ │ ├── bad-1-check-crc32.xz │ │ ├── bad-1-check-crc64.xz │ │ ├── bad-1-check-sha256.xz │ │ ├── bad-1-lzma2-1.xz │ │ ├── bad-1-lzma2-2.xz │ │ ├── bad-1-lzma2-3.xz │ │ ├── bad-1-lzma2-4.xz │ │ ├── bad-1-lzma2-5.xz │ │ ├── bad-1-lzma2-6.xz │ │ ├── bad-1-lzma2-7.xz │ │ ├── bad-1-lzma2-8.xz │ │ ├── bad-1-stream_flags-1.xz │ │ ├── bad-1-stream_flags-2.xz │ │ ├── bad-1-stream_flags-3.xz │ │ ├── bad-1-vli-1.xz │ │ ├── bad-1-vli-2.xz │ │ ├── bad-2-compressed_data_padding.xz │ │ ├── bad-2-index-1.xz │ │ ├── bad-2-index-2.xz │ │ ├── bad-2-index-3.xz │ │ ├── bad-2-index-4.xz │ │ ├── bad-2-index-5.xz │ │ ├── good-0-empty.xz │ │ ├── good-0cat-empty.xz │ │ ├── good-0catpad-empty.xz │ │ ├── good-0pad-empty.xz │ │ ├── good-1-3delta-lzma2.xz │ │ ├── good-1-block_header-1.xz │ │ ├── good-1-block_header-2.xz │ │ ├── good-1-block_header-3.xz │ │ ├── good-1-check-crc32.xz │ │ ├── good-1-check-crc64.xz │ │ ├── good-1-check-none.xz │ │ ├── good-1-check-sha256.xz │ │ ├── good-1-delta-lzma2.tiff.xz │ │ ├── good-1-lzma2-1.xz │ │ ├── good-1-lzma2-2.xz │ │ ├── good-1-lzma2-3.xz │ │ ├── good-1-lzma2-4.xz │ │ ├── good-1-sparc-lzma2.xz │ │ ├── good-1-x86-lzma2.xz │ │ ├── good-2-lzma2.xz │ │ ├── unsupported-block_header.xz │ │ ├── unsupported-check.xz │ │ ├── unsupported-filter_flags-1.xz │ │ ├── unsupported-filter_flags-2.xz │ │ └── unsupported-filter_flags-3.xz │ ├── test_block_header.c │ ├── test_check.c │ ├── test_compress.sh │ ├── test_files.sh │ ├── test_filter_flags.c │ ├── test_index.c │ ├── test_stream_flags.c │ └── tests.h │ ├── version.sh │ └── windows │ ├── Makefile │ ├── README │ └── config.h ├── tools ├── CMakeLists.txt ├── ftverify.cc ├── pmprof ├── tdb-recover.cc ├── tokudb_dump.cc ├── tokuft_logprint.cc └── tokuftdump.cc └── util ├── CMakeLists.txt ├── bytestring.h ├── constexpr.h ├── context.cc ├── context.h ├── dbt.cc ├── dbt.h ├── dmt.cc ├── dmt.h ├── doubly_linked_list.h ├── fmutex.h ├── frwlock.cc ├── frwlock.h ├── growable_array.h ├── kibbutz.cc ├── kibbutz.h ├── memarena.cc ├── memarena.h ├── mempool.cc ├── mempool.h ├── minicron.cc ├── minicron.h ├── nb_mutex.h ├── omt.cc ├── omt.h ├── partitioned_counter.cc ├── partitioned_counter.h ├── queue.cc ├── queue.h ├── rwlock.h ├── scoped_malloc.cc ├── scoped_malloc.h ├── sort.h ├── status.h ├── tests ├── CMakeLists.txt ├── marked-omt-test.cc ├── memarena-test.cc ├── minicron-change-period-data-race.cc ├── minicron-test.cc ├── omt-test.cc ├── omt-tmpl-test.cc ├── queue-test.cc ├── rwlock_condvar.h ├── sm-basic.cc ├── sm-crash-double-free.cc ├── sort-tmpl-test.cc ├── test-frwlock-fair-writers.cc ├── test-kibbutz.cc ├── test-kibbutz2.cc ├── test-rwlock-cheapness.cc ├── test-rwlock-unfair-writers.cc ├── test-rwlock.cc ├── test.h ├── test_doubly_linked_list.cc ├── test_partitioned_counter.cc ├── test_partitioned_counter_5833.cc ├── threadpool-nproc-limit.cc ├── threadpool-test.cc ├── threadpool-testrunf.cc └── x1764-test.cc ├── threadpool.cc ├── threadpool.h ├── x1764.cc └── x1764.h /.clang-format: -------------------------------------------------------------------------------- 1 | Language: Cpp 2 | BasedOnStyle: Google 3 | 4 | # The following parameters are default for Google style, 5 | # but as they are important for our project they 6 | # are set explicitly here 7 | AlignAfterOpenBracket: Align 8 | BreakBeforeBinaryOperators: None 9 | ColumnLimit: 80 10 | PointerAlignment: Left 11 | SpaceAfterCStyleCast: false 12 | SpaceBeforeAssignmentOperators: true 13 | SpaceBeforeParens: ControlStatements 14 | SpaceInEmptyParentheses: false 15 | SpacesBeforeTrailingComments: 2 16 | SpacesInAngles: false 17 | SpacesInContainerLiterals: true 18 | SpacesInCStyleCastParentheses: false 19 | SpacesInParentheses: false 20 | SpacesInSquareBrackets: false 21 | UseTab: Never 22 | 23 | # Non-default parametes 24 | NamespaceIndentation: All 25 | IndentWidth: 4 26 | TabWidth: 4 27 | AllowShortIfStatementsOnASingleLine: false 28 | AllowShortLoopsOnASingleLine: false 29 | BinPackParameters: false 30 | BinPackArguments: false 31 | ExperimentalAutoDetectBinPacking: false 32 | AllowAllParametersOfDeclarationOnNextLine: false 33 | #AlignConsecutiveAssignments: yes 34 | #AlignConsecutiveDeclarations: yes 35 | BreakStringLiterals: false 36 | ReflowComments: true 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | 6 | # Compiled Dynamic libraries 7 | *.so 8 | *.dylib 9 | 10 | # Compiled Static libraries 11 | *.lai 12 | *.la 13 | *.a 14 | 15 | # Libraries 16 | *.lib 17 | 18 | # Shared objects (inc. Windows DLLs) 19 | *.dll 20 | *.so.* 21 | 22 | # Executables 23 | *.exe 24 | *.out 25 | *.app 26 | 27 | *.py[cod] 28 | 29 | # Tags 30 | GPATH 31 | GRTAGS 32 | GTAGS 33 | TAGS 34 | tags 35 | 36 | # Common symlinks used in compiling 37 | third_party/jemalloc 38 | 39 | # Common cmake build directories 40 | build 41 | dbg 42 | -------------------------------------------------------------------------------- /CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ## This file should be placed in the root directory of your project. 2 | ## Then modify the CMakeLists.txt file in the root directory of your 3 | ## project to incorporate the testing dashboard. 4 | ## # The following are required to uses Dart and the Cdash dashboard 5 | ## ENABLE_TESTING() 6 | ## INCLUDE(CTest) 7 | set(CTEST_PROJECT_NAME "tokudb") 8 | set(CTEST_NIGHTLY_START_TIME "23:59:00 EDT") 9 | 10 | set(CTEST_DROP_METHOD "http") 11 | set(CTEST_DROP_SITE "lex1:8080") 12 | set(CTEST_DROP_LOCATION "/CDash/submit.php?project=tokudb") 13 | set(CTEST_DROP_SITE_CDASH TRUE) 14 | -------------------------------------------------------------------------------- /DartConfig.cmake: -------------------------------------------------------------------------------- 1 | if(BUILD_TESTING) 2 | if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) 3 | # Valgrind on OSX 10.8 generally works but outputs some warning junk 4 | # that is hard to parse out, so we'll just let it run alone 5 | set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind") 6 | endif () 7 | set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --soname-synonyms=somalloc=*tokuportability* --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump,*/tdb-recover --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind") 8 | set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind") 9 | set(UPDATE_COMMAND "svn") 10 | endif() 11 | -------------------------------------------------------------------------------- /bash.suppressions: -------------------------------------------------------------------------------- 1 | { 2 | bash 3 | Memcheck:Leak 4 | ... 5 | obj:/bin/bash 6 | } 7 | -------------------------------------------------------------------------------- /buildbot/compile.suppressions: -------------------------------------------------------------------------------- 1 | # Suppress some warnings we get from jemalloc and lzma, they aren't our fault. 2 | .*third_party/jemalloc/src/jemalloc.c : .*-Wattributes.* 3 | .*third_party/jemalloc/src/ctl.c : .*-Wunused-but-set-variable.* 4 | .*xz/src/build_lzma/src/liblzma/lz/lz_encoder.c : .*-Wunused-but-set-variable.* 5 | -------------------------------------------------------------------------------- /buildheader/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "") 2 | 3 | file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/runcat.sh" "#!/bin/bash 4 | out=$1; shift 5 | exec \"$@\" >$out") 6 | 7 | add_executable(make_tdb make_tdb.cc) 8 | set_property(TARGET make_tdb APPEND PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE) 9 | add_custom_command( 10 | OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/db.h" 11 | COMMAND bash runcat.sh "${CMAKE_CURRENT_BINARY_DIR}/db.h" $ 12 | DEPENDS make_tdb) 13 | add_custom_target(install_tdb_h DEPENDS 14 | "${CMAKE_CURRENT_BINARY_DIR}/db.h") 15 | 16 | # detect when we are being built as a subproject 17 | if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING) 18 | install( 19 | FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h" 20 | DESTINATION include 21 | RENAME tokudb.h 22 | COMPONENT tokukv_headers 23 | ) 24 | install( 25 | FILES "${CMAKE_CURRENT_BINARY_DIR}/db.h" 26 | DESTINATION include 27 | COMPONENT tokukv_headers 28 | ) 29 | endif () 30 | -------------------------------------------------------------------------------- /cmake_modules/FindValgrind.cmake: -------------------------------------------------------------------------------- 1 | # Find Valgrind. 2 | # 3 | # This module defines: 4 | # VALGRIND_INCLUDE_DIR, where to find valgrind/memcheck.h, etc. 5 | # VALGRIND_PROGRAM, the valgrind executable. 6 | # VALGRIND_FOUND, If false, do not try to use valgrind. 7 | # 8 | # If you have valgrind installed in a non-standard place, you can define 9 | # VALGRIND_PREFIX to tell cmake where it is. 10 | 11 | find_path(VALGRIND_INCLUDE_DIR valgrind/memcheck.h) 12 | find_program(VALGRIND_PROGRAM NAMES valgrind) 13 | 14 | find_package_handle_standard_args(Valgrind DEFAULT_MSG 15 | VALGRIND_INCLUDE_DIR 16 | VALGRIND_PROGRAM) 17 | 18 | mark_as_advanced(VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM) 19 | -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-24-clean/log000000000000.tokulog24: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-24-clean/log000000000000.tokulog24 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-24-dirty/log000000000000.tokulog24: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-24-dirty/log000000000000.tokulog24 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-25-clean/log000000000000.tokulog25: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-25-clean/log000000000000.tokulog25 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-25-dirty/log000000000000.tokulog25: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-25-dirty/log000000000000.tokulog25 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-26-clean/log000000000000.tokulog26: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-26-clean/log000000000000.tokulog26 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-26-dirty/log000000000000.tokulog26: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-26-dirty/log000000000000.tokulog26 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-27-clean/log000000000000.tokulog27: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-27-clean/log000000000000.tokulog27 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-27-dirty/log000000000000.tokulog27: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-27-dirty/log000000000000.tokulog27 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-28-clean/log000000000000.tokulog28: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-28-clean/log000000000000.tokulog28 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-28-dirty/log000000000000.tokulog28: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-28-dirty/log000000000000.tokulog28 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-29-clean/log000000000000.tokulog29: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-29-clean/log000000000000.tokulog29 -------------------------------------------------------------------------------- /ft/tests/upgrade.data/upgrade-recovery-logs-29-dirty/log000000000000.tokulog29: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/ft/tests/upgrade.data/upgrade-recovery-logs-29-dirty/log000000000000.tokulog29 -------------------------------------------------------------------------------- /ftcxx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -Wno-deprecated-declarations") 2 | 3 | if (APPLE) 4 | ## osx is weird about weak symbols 5 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-flat_namespace,-undefined,dynamic_lookup") 6 | endif (APPLE) 7 | 8 | add_library(ftcxx STATIC 9 | buffer 10 | cursor 11 | db_env 12 | malloc_utils 13 | ) 14 | add_dependencies(ftcxx install_tdb_h) 15 | 16 | if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING) 17 | install( 18 | TARGETS ftcxx 19 | DESTINATION ${INSTALL_LIBDIR} 20 | COMPONENT tokukv_libs_static 21 | ) 22 | 23 | file(GLOB ftcxx_headers "*.hpp") 24 | install( 25 | FILES ${ftcxx_headers} 26 | DESTINATION include/ftcxx 27 | COMPONENT tokukv_headers 28 | ) 29 | endif () 30 | 31 | add_subdirectory(tests) 32 | -------------------------------------------------------------------------------- /ftcxx/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(..) 2 | include_directories(../../src) 3 | include_directories(../../src/tests) 4 | 5 | find_library(JEMALLOC_STATIC_LIBRARY libjemalloc.a) 6 | 7 | if (BUILD_TESTING) 8 | ## reference implementation with simple size-doubling buffer without 9 | ## jemalloc size tricks 10 | add_library(doubling_buffer_ftcxx STATIC 11 | doubling_buffer 12 | ../cursor 13 | ) 14 | add_dependencies(doubling_buffer_ftcxx install_tdb_h) 15 | 16 | foreach (impl 17 | ftcxx 18 | doubling_buffer_ftcxx 19 | ) 20 | foreach (with_jemalloc 21 | ON 22 | OFF 23 | ) 24 | foreach (test 25 | buffer_test 26 | cursor_test 27 | ) 28 | set(_testname ${impl}_${test}) 29 | if (with_jemalloc AND JEMALLOC_STATIC_LIBRARY) 30 | set(_testname ${_testname}_j) 31 | endif () 32 | add_executable(${_testname} ${test}) 33 | if (with_jemalloc AND JEMALLOC_STATIC_LIBRARY) 34 | if (APPLE) 35 | target_link_libraries(${_testname} -Wl,-force_load ${JEMALLOC_STATIC_LIBRARY}) 36 | else () 37 | target_link_libraries(${_testname} -Wl,--whole-archive ${JEMALLOC_STATIC_LIBRARY} -Wl,--no-whole-archive) 38 | endif () 39 | endif () 40 | target_link_libraries(${_testname} ${impl}) 41 | target_link_libraries(${_testname} ${LIBTOKUDB} ${LIBTOKUPORTABILITY}) 42 | 43 | add_test(${_testname} ${_testname}) 44 | endforeach () 45 | endforeach () 46 | endforeach () 47 | endif (BUILD_TESTING) -------------------------------------------------------------------------------- /locktree/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | set(locktree_srcs 4 | locktree 5 | manager 6 | lock_request 7 | txnid_set 8 | range_buffer 9 | keyrange 10 | wfg 11 | ) 12 | 13 | ## make the shared library for tests 14 | add_library(locktree SHARED ${locktree_srcs}) 15 | add_dependencies(locktree install_tdb_h) 16 | 17 | ## make the real library, it's going to go into libtokudb.so so it needs 18 | ## to be PIC 19 | add_library(locktree_static STATIC ${locktree_srcs}) 20 | add_space_separated_property(TARGET locktree_static COMPILE_FLAGS "-fvisibility=hidden -fPIC") 21 | add_dependencies(locktree_static install_tdb_h) 22 | # The locktree uses the standard portability layer and also the ybt 23 | # functions from the ft layer. Maybe one day the ybt functions will be 24 | # elsewhere. 25 | target_link_libraries(locktree LINK_PRIVATE ft ${LIBTOKUPORTABILITY}) 26 | 27 | maybe_add_gcov_to_libraries(locktree locktree_static) 28 | 29 | add_subdirectory(tests) 30 | -------------------------------------------------------------------------------- /locktree/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(BUILD_TESTING) 2 | function(add_locktree_test bin) 3 | add_toku_test(locktree ${bin} ${ARGN}) 4 | endfunction(add_locktree_test) 5 | 6 | file(GLOB srcs *.cc) 7 | foreach(src ${srcs}) 8 | get_filename_component(base ${src} NAME_WE) 9 | 10 | add_executable(${base} ${base}.cc) 11 | add_space_separated_property(TARGET ${base} COMPILE_FLAGS -fvisibility=hidden) 12 | target_link_libraries(${base} locktree ft ${LIBTOKUPORTABILITY}) 13 | add_locktree_test(${base}) 14 | endforeach(src) 15 | endif(BUILD_TESTING) 16 | -------------------------------------------------------------------------------- /portability/tests/ensure_memcheck_fails.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | test $# -ge 1 || exit 1 4 | 5 | bin=$1; shift 6 | valgrind=$@ 7 | 8 | $valgrind --log-file=$bin.check.valgrind $bin >$bin.check.output 2>&1 9 | if [[ $? = 0 ]] 10 | then 11 | lines=$(cat $bin.check.valgrind | wc -l) 12 | if [[ lines -ne 0 ]] 13 | then 14 | cat $bin.check.valgrind 15 | exit 0 16 | else 17 | exit 1 18 | fi 19 | else 20 | exit 0 21 | fi 22 | -------------------------------------------------------------------------------- /scripts/run-all-nightly-tests.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd $(dirname $0) &>/dev/null 4 | scriptdir=$PWD 5 | popd &>/dev/null 6 | 7 | bash $scriptdir/run-nightly-release-tests.bash 8 | bash $scriptdir/run-nightly-drd-tests.bash 9 | bash $scriptdir/run-nightly-coverage-tests.bash 10 | 11 | -------------------------------------------------------------------------------- /scripts/run-nightly-coverage-tests.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | pushd $(dirname $0) &>/dev/null 6 | scriptdir=$PWD 7 | popd &>/dev/null 8 | tokudbdir=$(dirname $scriptdir) 9 | 10 | cd $tokudbdir 11 | 12 | if [ ! -d build ] ; then 13 | mkdir build 14 | pushd build 15 | cmake \ 16 | -D CMAKE_BUILD_TYPE=Debug \ 17 | -D USE_VALGRIND=ON \ 18 | -D TOKU_DEBUG_PARANOID=ON \ 19 | -D USE_CTAGS=OFF \ 20 | -D USE_GTAGS=OFF \ 21 | -D USE_CSCOPE=OFF \ 22 | -D USE_ETAGS=OFF \ 23 | -D USE_GCOV=ON \ 24 | -D CMAKE_LINK_DEPENDS_NO_SHARED=ON \ 25 | -G Ninja \ 26 | -D RUN_LONG_TESTS=ON \ 27 | -D TOKUDB_DATA=$tokudbdir/../tokudb.data \ 28 | .. 29 | ninja build_lzma build_snappy 30 | popd 31 | fi 32 | 33 | cd build 34 | ctest -j16 \ 35 | -D NightlyStart \ 36 | -D NightlyUpdate \ 37 | -D NightlyConfigure \ 38 | -D NightlyBuild \ 39 | -D NightlyTest \ 40 | -D NightlyCoverage \ 41 | -D NightlySubmit \ 42 | -E '/drd|/helgrind' 43 | -------------------------------------------------------------------------------- /scripts/run-nightly-drd-tests.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | pushd $(dirname $0) &>/dev/null 6 | scriptdir=$PWD 7 | popd &>/dev/null 8 | tokudbdir=$(dirname $scriptdir) 9 | 10 | cd $tokudbdir 11 | 12 | if [ ! -d build ] ; then 13 | mkdir build 14 | pushd build 15 | cmake \ 16 | -D CMAKE_BUILD_TYPE=drd \ 17 | -D USE_VALGRIND=ON \ 18 | -D TOKU_DEBUG_PARANOID=ON \ 19 | -D USE_CTAGS=OFF \ 20 | -D USE_GTAGS=OFF \ 21 | -D USE_CSCOPE=OFF \ 22 | -D USE_ETAGS=OFF \ 23 | -D CMAKE_LINK_DEPENDS_NO_SHARED=ON \ 24 | -G Ninja \ 25 | -D RUN_LONG_TESTS=ON \ 26 | -D TOKUDB_DATA=$tokudbdir/../tokudb.data \ 27 | .. 28 | ninja build_lzma build_snappy 29 | popd 30 | fi 31 | 32 | cd build 33 | ctest -j16 \ 34 | -D Nightly \ 35 | -R '/drd|/helgrind' 36 | -------------------------------------------------------------------------------- /scripts/run-nightly-release-tests.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | pushd $(dirname $0) &>/dev/null 6 | scriptdir=$PWD 7 | popd &>/dev/null 8 | tokudbdir=$(dirname $scriptdir) 9 | 10 | cd $tokudbdir 11 | 12 | if [ ! -d build ] ; then 13 | mkdir build 14 | pushd build 15 | cmake \ 16 | -D CMAKE_BUILD_TYPE=Release \ 17 | -D USE_VALGRIND=ON \ 18 | -D TOKU_DEBUG_PARANOID=OFF \ 19 | -D USE_CTAGS=OFF \ 20 | -D USE_GTAGS=OFF \ 21 | -D USE_CSCOPE=OFF \ 22 | -D USE_ETAGS=OFF \ 23 | -D CMAKE_LINK_DEPENDS_NO_SHARED=ON \ 24 | -G Ninja \ 25 | -D RUN_LONG_TESTS=ON \ 26 | -D TOKUDB_DATA=$tokudbdir/../tokudb.data \ 27 | .. 28 | ninja build_lzma build_snappy 29 | popd 30 | fi 31 | 32 | cd build 33 | set +e 34 | ctest -j16 \ 35 | -D NightlyStart \ 36 | -D NightlyUpdate \ 37 | -D NightlyConfigure \ 38 | -D NightlyBuild \ 39 | -D NightlyTest \ 40 | -E '/drd|/helgrind' 41 | ctest -j16 \ 42 | -D NightlyMemCheck \ 43 | -E 'test1426\.tdb|/drd|/helgrind' 44 | set -e 45 | ctest -D NightlySubmit 46 | -------------------------------------------------------------------------------- /scripts/tokugrind: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function usage() { 4 | echo "check for valgrind error and set the exit code" 5 | } 6 | 7 | function cleanup() { 8 | if [ "$logfile" != "" ] ; then rm $logfile; fi 9 | exit 1 10 | } 11 | 12 | args=$* 13 | 14 | logfile= 15 | createlogfile=0 16 | errorexitcode=1 17 | 18 | while [ $# -gt 0 ] ; do 19 | arg=$1; shift 20 | if [[ $arg =~ "--" ]] ; then 21 | if [[ $arg =~ --log-file=(.*) ]] ; then 22 | logfile=${BASH_REMATCH[1]} 23 | elif [[ $arg =~ --error-exitcode=(.*) ]] ; then 24 | errorexitcode=${BASH_REMATCH[1]} 25 | fi 26 | else 27 | break 28 | fi 29 | done 30 | 31 | if [ "$logfile" = "" ] ; then 32 | createlogfile=1 33 | trap cleanup SIGINT 34 | logfile=`mktemp /tmp/$(whoami).tokugrind.XXXXXXXX` 35 | args="--log-file=$logfile $args" 36 | fi 37 | 38 | valgrind $args 39 | exitcode=$? 40 | if [ $exitcode = 0 ] ; then 41 | lines=$(wc -l <$logfile) 42 | if [ $lines -ne 0 ] ; then 43 | exitcode=$errorexitcode 44 | fi 45 | fi 46 | 47 | if [ $createlogfile != 0 ] ; then 48 | cat $logfile >>/dev/stderr 49 | rm $logfile 50 | fi 51 | 52 | exit $exitcode 53 | -------------------------------------------------------------------------------- /scripts/tokuvalgrind: -------------------------------------------------------------------------------- 1 | tokugrind -------------------------------------------------------------------------------- /scripts/watch.stress-tests.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | watch "date ; awk '{ print \$1, \$3 }' < /tmp/stress-tests-log | sort -k 2 | uniq -c | sort -k 3 -r -s | head -n10; echo ; echo; echo 'Failing tests:'; grep FAILED /tmp/stress-tests-log | sort -k 3 -r -s" 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.d100.d200.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/commit.d0.d100.d200.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.d100.d200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | delete committed 100 4 | delete committed 200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.d100.i200.result: -------------------------------------------------------------------------------- 1 | insert_committed [200] v100 k1 2 | commit_any [200] v100 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.d100.i200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | delete committed 100 4 | insert committed 200 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.d100.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/commit.d0.d100.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.d100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | delete committed 100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.i100.d200.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v100 k1 2 | commit_any [100] v100 3 | delete_committed [200] v100 4 | commit_any [200] v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.i100.d200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert committed 100 v100 4 | delete committed 200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.i100.i200.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v100 k1 2 | commit_any [100] v100 3 | delete_committed [200] v100 4 | insert_committed [200] v200 k1 5 | commit_any [200] v100 6 | commit_any [200] v200 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.i100.i200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert committed 100 v100 4 | insert committed 200 v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.i100.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v100 k1 2 | commit_any [100] v100 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.i100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert committed 100 v100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/commit.d0.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.d0.test: -------------------------------------------------------------------------------- 1 | # this test runs the undo do function on a leaf entry that consists of a single committed delete 2 | key k1 3 | delete committed 0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.d100.d200.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/commit.i0.d100.d200.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.d100.d200.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/commit.i0.d100.d200.test -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.d100.i200.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [100] v0 3 | commit_any [100] v0 4 | insert_committed [200] v100 k1 5 | commit_any [200] v100 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.d100.i200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | delete committed 100 4 | insert committed 200 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.d100.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_committed [100] v10 3 | commit_any [100] v10 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.d100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v10 3 | delete committed 100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.i100.d200.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [100] v0 3 | insert_committed [100] v100 k1 4 | commit_any [100] v0 5 | commit_any [100] v100 6 | delete_committed [200] v100 7 | commit_any [200] v100 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.i100.d200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | insert committed 100 v100 4 | delete committed 200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.i100.i200.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [100] v0 3 | insert_committed [100] v100 k1 4 | commit_any [100] v0 5 | commit_any [100] v100 6 | delete_committed [200] v100 7 | insert_committed [200] v200 k1 8 | commit_any [200] v100 9 | commit_any [200] v200 10 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.i100.i200.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | insert committed 100 v100 4 | insert committed 200 v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.i100.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_committed [100] v10 3 | insert_committed [100] v20 k1 4 | commit_any [100] v10 5 | commit_any [100] v20 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.i100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v10 3 | insert committed 100 v20 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v100 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/commit.i0.test: -------------------------------------------------------------------------------- 1 | # committed insert 2 | key k1 3 | insert committed 0 v100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/insert.300.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v100 k1 2 | delete_committed [200] v100 3 | insert_committed [200] v200 k1 4 | commit_any [200] v100 5 | commit_any [200] v200 6 | delete_committed [300] v200 7 | insert_committed [300] v300 k1 8 | commit_any [300] v200 9 | commit_any [300] v300 10 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/insert.300.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v100 3 | insert committed 200 v200 4 | insert committed 300 v300 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.0.live.result: -------------------------------------------------------------------------------- 1 | insert_provisional [300,301,302] v10 k1 2 | lock [300] v10 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.0.live.test: -------------------------------------------------------------------------------- 1 | live 300 301 302 2 | key k1 3 | delete committed 0 4 | placeholder 300 5 | placeholder 301 6 | insert provisional 302 v10 7 | 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.0.result: -------------------------------------------------------------------------------- 1 | insert_committed [300] v10 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.0.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | placeholder 300 4 | placeholder 301 5 | insert provisional 302 v10 6 | 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.1.live.result: -------------------------------------------------------------------------------- 1 | insert_provisional [300,301] v10 k1 2 | lock [300] v10 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.1.live.test: -------------------------------------------------------------------------------- 1 | live 300 301 2 | key k1 3 | delete committed 0 4 | placeholder 300 5 | placeholder 301 6 | insert provisional 302 v10 7 | 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.2.live.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v10 k1 2 | commit_any [100] v10 3 | delete_provisional [300,301,302] v10 4 | lock [300] v10 5 | insert_provisional [300,301,302] v20 k1 6 | lock [300] v20 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.2.live.test: -------------------------------------------------------------------------------- 1 | live 300 301 302 2 | key k1 3 | delete committed 0 4 | insert committed 100 v10 5 | placeholder 300 6 | placeholder 301 7 | insert provisional 302 v20 8 | 9 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.2.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v10 k1 2 | commit_any [100] v10 3 | delete_committed [300] v10 4 | insert_committed [300] v20 k1 5 | commit_any [300] v10 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.2.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert committed 100 v10 4 | placeholder 300 5 | placeholder 301 6 | insert provisional 302 v20 7 | 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.3.result: -------------------------------------------------------------------------------- 1 | insert_committed [300] v18 k1 2 | delete_committed [300] v18 3 | insert_committed [300] v20 k1 4 | commit_any [300] v18 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/placeholder.3.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert provisional 300 v18 4 | placeholder 301 5 | insert provisional 302 v20 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov-2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # generate hotindexing undo provisional tests with 2 nested transactions 3 | 4 | import sys 5 | 6 | def print_tr(fp, tr, trstack): 7 | trtype = tr[0] 8 | xid = tr[1:] 9 | if trtype == 'i': 10 | print >>fp, "insert", trstack, xid, "v"+xid 11 | if trtype == 'd': 12 | print >>fp, "delete", trstack, xid 13 | if trtype == 'p': 14 | print >>fp, "placeholder", trstack, xid 15 | 16 | def print_test(fp, live, commit, prov0, prov1): 17 | if live != "": 18 | for xid in live.split(","): 19 | print >>fp, "live", xid 20 | print >>fp, "key k1" 21 | print_tr(fp, commit, "committed") 22 | print_tr(fp, prov0, "provisional") 23 | print_tr(fp, prov1, "provisional") 24 | 25 | def main(): 26 | # live transactions 27 | for live in ["", "200", "200,201"]: 28 | # committed transaction records 29 | for commit in ["i0", "d0"]: 30 | # provisional level 0 transaction records 31 | for prov0 in ["i200", "d200", "p200"]: 32 | # provisional level 1 transaction records 33 | for prov1 in ["i201", "d201"]: 34 | if live == "": 35 | fname = "prov.%s.%s.%s.test" % (commit, prov0, prov1) 36 | else: 37 | fname = "prov.live%s.%s.%s.%s.test" % (live, commit, prov0, prov1) 38 | print fname 39 | fp = open(fname, "w") 40 | if fp: 41 | print_test(fp, live, commit, prov0, prov1) 42 | fp.close() 43 | return 0 44 | 45 | sys.exit(main()) 46 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.1.live.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_committed [100] v10 3 | insert_committed [100] v20 k1 4 | commit_any [100] v10 5 | commit_any [100] v20 6 | delete_committed [200] v20 7 | insert_committed [200] v10 k1 8 | commit_any [200] v20 9 | commit_any [200] v10 10 | delete_provisional [300,301] v10 11 | lock [300] v10 12 | insert_provisional [300,301] v30 k1 13 | lock [300] v30 14 | delete_provisional [300,301,302] v30 15 | lock [300] v30 16 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.1.live.test: -------------------------------------------------------------------------------- 1 | live 300 301 302 2 | key k1 3 | insert committed 0 v10 4 | insert committed 100 v20 5 | insert committed 200 v10 6 | placeholder 300 7 | insert provisional 301 v30 8 | delete provisional 302 9 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.1.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_committed [100] v10 3 | insert_committed [100] v20 k1 4 | commit_any [100] v10 5 | commit_any [100] v20 6 | delete_committed [200] v20 7 | insert_committed [200] v10 k1 8 | commit_any [200] v20 9 | commit_any [200] v10 10 | delete_committed [300] v10 11 | insert_committed [300] v30 k1 12 | delete_committed [300] v30 13 | commit_any [300] v10 14 | commit_any [300] v30 15 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.1.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v10 3 | insert committed 100 v20 4 | insert committed 200 v10 5 | placeholder 300 6 | insert provisional 301 v30 7 | delete provisional 302 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.aborting.d0.i100.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.aborting.d0.i100.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.aborting.d0.i100.test: -------------------------------------------------------------------------------- 1 | xid 100 aborting 2 | key k1 3 | delete committed 0 4 | insert provisional 100 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.aborting.i100.i200.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v100 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.aborting.i100.i200.test: -------------------------------------------------------------------------------- 1 | xid 100 aborting 2 | key k1 3 | insert committed 0 v100 4 | insert provisional 100 v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.committing.d0.i100.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v100 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.committing.d0.i100.test: -------------------------------------------------------------------------------- 1 | xid 100 committing 2 | key k1 3 | delete committed 0 4 | insert provisional 100 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.committing.i100.i200.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v100 k1 2 | delete_committed [100] v100 3 | insert_committed [100] v200 k1 4 | commit_any [100] v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.committing.i100.i200.test: -------------------------------------------------------------------------------- 1 | xid 100 committing 2 | key k1 3 | insert committed 0 v100 4 | insert provisional 100 v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.d100.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.d0.d100.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.d100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | delete provisional 100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.d200.d201.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.d0.d200.d201.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.d200.d201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | delete provisional 200 4 | delete provisional 201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.d200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [200] v201 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.d200.i201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | delete provisional 200 4 | insert provisional 201 v201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.i100.result: -------------------------------------------------------------------------------- 1 | insert_committed [100] v100 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.i100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert provisional 100 v100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.i200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [200] v200 k1 2 | delete_committed [200] v200 3 | commit_any [200] v200 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.i200.d201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert provisional 200 v200 4 | delete provisional 201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [200] v200 k1 2 | delete_committed [200] v200 3 | insert_committed [200] v201 k1 4 | commit_any [200] v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.i200.i201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | insert provisional 200 v200 4 | insert provisional 201 v201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.p200.d201.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.d0.p200.d201.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.p200.d201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | placeholder provisional 200 4 | delete provisional 201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.p200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [200] v201 k1 2 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.d0.p200.i201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | delete committed 0 3 | placeholder provisional 200 4 | insert provisional 201 v201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.d100.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_committed [100] v10 3 | commit_any [100] v10 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.d100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v10 3 | delete provisional 100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.d200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [200] v0 3 | commit_any [200] v0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.d200.d201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | delete provisional 200 4 | delete provisional 201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.d200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [200] v0 3 | insert_committed [200] v201 k1 4 | commit_any [200] v0 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.d200.i201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | delete provisional 200 4 | insert provisional 201 v201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.i100.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_committed [100] v10 3 | insert_committed [100] v100 k1 4 | commit_any [100] v10 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.i100.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v10 3 | insert provisional 100 v100 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.i200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [200] v0 3 | insert_committed [200] v200 k1 4 | delete_committed [200] v200 5 | commit_any [200] v0 6 | commit_any [200] v200 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.i200.d201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | insert provisional 200 v200 4 | delete provisional 201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [200] v0 3 | insert_committed [200] v200 k1 4 | delete_committed [200] v200 5 | insert_committed [200] v201 k1 6 | commit_any [200] v0 7 | commit_any [200] v200 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.i200.i201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | insert provisional 200 v200 4 | insert provisional 201 v201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.p200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [200] v0 3 | commit_any [200] v0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.p200.d201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | placeholder provisional 200 4 | delete provisional 201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.p200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_committed [200] v0 3 | insert_committed [200] v201 k1 4 | commit_any [200] v0 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.i0.p200.i201.test: -------------------------------------------------------------------------------- 1 | key k1 2 | insert committed 0 v0 3 | placeholder provisional 200 4 | insert provisional 201 v201 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.d0.d100.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.live.d0.d100.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.d0.d100.test: -------------------------------------------------------------------------------- 1 | live 100 2 | key k1 3 | delete committed 0 4 | delete provisional 100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.d0.i100.result: -------------------------------------------------------------------------------- 1 | insert_provisional [100] v100 k1 2 | lock [100] v100 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.d0.i100.test: -------------------------------------------------------------------------------- 1 | live 100 2 | key k1 3 | delete committed 0 4 | insert provisional 100 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.i0.d100.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_provisional [100] v10 3 | lock [100] v10 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.i0.d100.test: -------------------------------------------------------------------------------- 1 | live 100 2 | key k1 3 | insert committed 0 v10 4 | delete provisional 100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.i0.i100.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v10 k1 2 | delete_provisional [100] v10 3 | lock [100] v10 4 | insert_provisional [100] v100 k1 5 | lock [100] v100 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live.i0.i100.test: -------------------------------------------------------------------------------- 1 | live 100 2 | key k1 3 | insert committed 0 v10 4 | insert provisional 100 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.d200.d201.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.d200.d201.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.d200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | delete committed 0 5 | delete provisional 200 6 | delete provisional 201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.d200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200,201] v201 k1 2 | lock [200] v201 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.d200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | delete committed 0 5 | delete provisional 200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.i200.d201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v200 k1 2 | lock [200] v200 3 | delete_provisional [200,201] v200 4 | lock [200] v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.i200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | delete committed 0 5 | insert provisional 200 v200 6 | delete provisional 201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v200 k1 2 | lock [200] v200 3 | delete_provisional [200,201] v200 4 | lock [200] v200 5 | insert_provisional [200,201] v201 k1 6 | lock [200] v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.i200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | delete committed 0 5 | insert provisional 200 v200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.p200.d201.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.p200.d201.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.p200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | delete committed 0 5 | placeholder provisional 200 6 | delete provisional 201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.p200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200,201] v201 k1 2 | lock [200] v201 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.d0.p200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | delete committed 0 5 | placeholder provisional 200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.d200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.d200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | insert committed 0 v0 5 | delete provisional 200 6 | delete provisional 201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.d200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200,201] v201 k1 5 | lock [200] v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.d200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | insert committed 0 v0 5 | delete provisional 200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.i200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | delete_provisional [200,201] v200 7 | lock [200] v200 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.i200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | insert committed 0 v0 5 | insert provisional 200 v200 6 | delete provisional 201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | delete_provisional [200,201] v200 7 | lock [200] v200 8 | insert_provisional [200,201] v201 k1 9 | lock [200] v201 10 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.i200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | insert committed 0 v0 5 | insert provisional 200 v200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.p200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200,201] v0 3 | lock [200] v0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.p200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | insert committed 0 v0 5 | placeholder provisional 200 6 | delete provisional 201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.p200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200,201] v0 3 | lock [200] v0 4 | insert_provisional [200,201] v201 k1 5 | lock [200] v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200,201.i0.p200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | live 201 3 | key k1 4 | insert committed 0 v0 5 | placeholder provisional 200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.abort201.commit202.i0.i200.i201.i202.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.abort201.commit202.i0.i200.i201.i202.test: -------------------------------------------------------------------------------- 1 | xid 200 live 2 | xid 201 aborting 3 | key k1 4 | insert committed 0 v0 5 | insert provisional 200 v200 6 | insert provisional 201 v201 7 | insert provisional 202 v202 8 | 9 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.abort201.i0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.abort201.i0.i200.i201.test: -------------------------------------------------------------------------------- 1 | xid 200 live 2 | xid 201 aborting 3 | key k1 4 | insert committed 0 v0 5 | insert provisional 200 v200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.committing201.i0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | delete_provisional [200] v200 7 | lock [200] v200 8 | insert_provisional [200] v201 k1 9 | lock [200] v201 10 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.committing201.i0.i200.i201.test: -------------------------------------------------------------------------------- 1 | xid 200 live 2 | xid 201 committing 3 | key k1 4 | insert committed 0 v0 5 | insert provisional 200 v200 6 | insert provisional 201 v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.d200.d201.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.live200.d0.d200.d201.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.d200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | delete committed 0 4 | delete provisional 200 5 | delete provisional 201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.d200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v201 k1 2 | lock [200] v201 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.d200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | delete committed 0 4 | delete provisional 200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.i200.d201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v200 k1 2 | lock [200] v200 3 | delete_provisional [200] v200 4 | lock [200] v200 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.i200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | delete committed 0 4 | insert provisional 200 v200 5 | delete provisional 201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v200 k1 2 | lock [200] v200 3 | delete_provisional [200] v200 4 | lock [200] v200 5 | insert_provisional [200] v201 k1 6 | lock [200] v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.i200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | delete committed 0 4 | insert provisional 200 v200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.p200.d201.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/src/tests/hotindexer-undo-do-tests/prov.live200.d0.p200.d201.result -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.p200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | delete committed 0 4 | placeholder provisional 200 5 | delete provisional 201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.p200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v201 k1 2 | lock [200] v201 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.d0.p200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | delete committed 0 4 | placeholder provisional 200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.d200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.d200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | insert committed 0 v0 4 | delete provisional 200 5 | delete provisional 201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.d200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v201 k1 5 | lock [200] v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.d200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | insert committed 0 v0 4 | delete provisional 200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.i200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | delete_provisional [200] v200 7 | lock [200] v200 8 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.i200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | insert committed 0 v0 4 | insert provisional 200 v200 5 | delete provisional 201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v200 k1 5 | lock [200] v200 6 | delete_provisional [200] v200 7 | lock [200] v200 8 | insert_provisional [200] v201 k1 9 | lock [200] v201 10 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.i200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | insert committed 0 v0 4 | insert provisional 200 v200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.p200.d201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.p200.d201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | insert committed 0 v0 4 | placeholder provisional 200 5 | delete provisional 201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.p200.i201.result: -------------------------------------------------------------------------------- 1 | insert_committed [0] v0 k1 2 | delete_provisional [200] v0 3 | lock [200] v0 4 | insert_provisional [200] v201 k1 5 | lock [200] v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.live200.i0.p200.i201.test: -------------------------------------------------------------------------------- 1 | live 200 2 | key k1 3 | insert committed 0 v0 4 | placeholder provisional 200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.preparing.d0.i100.result: -------------------------------------------------------------------------------- 1 | insert_provisional [100] v100 k1 2 | lock [100] v100 3 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.preparing.d0.i100.test: -------------------------------------------------------------------------------- 1 | xid 100 preparing 2 | key k1 3 | delete committed 0 4 | insert provisional 100 v100 5 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.preparing.d0.i200.i201.result: -------------------------------------------------------------------------------- 1 | insert_provisional [200] v200 k1 2 | lock [200] v200 3 | delete_provisional [200] v200 4 | lock [200] v200 5 | insert_provisional [200] v201 k1 6 | lock [200] v201 7 | -------------------------------------------------------------------------------- /src/tests/hotindexer-undo-do-tests/prov.preparing.d0.i200.i201.test: -------------------------------------------------------------------------------- 1 | xid 200 preparing 2 | key k1 3 | delete committed 0 4 | insert provisional 200 v200 5 | insert provisional 201 v201 6 | -------------------------------------------------------------------------------- /src/tests/ipm.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python2.6 2 | 3 | import sys 4 | import os 5 | import pexpect 6 | import getpass 7 | 8 | # 9 | # remote_cmd 10 | # 11 | 12 | nameaddr='admn@192.168.1.254' 13 | passwd='admn' 14 | 15 | def IPM_cmd(cmds): 16 | # password handling 17 | ssh_newkey = 'Are you sure you want to continue connecting' 18 | p=pexpect.spawn('ssh %s' % nameaddr, timeout=60) 19 | i=p.expect([ssh_newkey,'Password:',pexpect.EOF]) 20 | if i==0: 21 | p.sendline('yes') 22 | i=p.expect([ssh_newkey,'Password:',pexpect.EOF]) 23 | if i==1: 24 | p.sendline(passwd) 25 | elif i==2: 26 | print "I either got key or connection timeout" 27 | pass 28 | 29 | # run command(s) 30 | i = p.expect('Sentry:') 31 | for cmd in cmds: 32 | if i==0: 33 | p.sendline(cmd) 34 | else: 35 | print 'p.expect saw', p.before 36 | i = p.expect('Sentry:') 37 | print p.before 38 | 39 | # close session 40 | p.sendline('quit') 41 | p.expect(pexpect.EOF) 42 | return 0 43 | 44 | def IPM_power_on(): 45 | IPM_cmd(['on all']) 46 | 47 | def IPM_power_off(): 48 | IPM_cmd(['off all']) 49 | 50 | def main(argv): 51 | # passwd = getpass.getpass('password for %s:' % (nameaddr)) 52 | if argv[1] == 'on': 53 | IPM_power_on() 54 | elif argv[1] == 'off': 55 | IPM_power_off() 56 | else: 57 | IPM_cmd(argv[1:]) 58 | return 0 59 | 60 | if __name__ == '__main__': 61 | sys.exit(main(sys.argv)) 62 | -------------------------------------------------------------------------------- /src/tests/run-hotindexer-undo-do-tests.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | # run a sequence of hotindexer undo tests. 7 | 8 | tests="" 9 | verbose=0 10 | valgrind="" 11 | exitcode=0 12 | 13 | for arg in $* ; do 14 | if [[ $arg =~ --(.*)=(.*) ]] ; then 15 | eval ${BASH_REMATCH[1]}=${BASH_REMATCH[2]} 16 | else 17 | tests="$tests $arg" 18 | fi 19 | done 20 | 21 | for t in $tests ; do 22 | testdir=`dirname $t` 23 | testfile=`basename $t` 24 | testname="" 25 | resultfile="" 26 | if [[ $testfile =~ (.*)\.test$ ]] ; then 27 | testname=${BASH_REMATCH[1]} 28 | resultfile=$testname.result 29 | else 30 | exit 1 31 | fi 32 | if [ $verbose != 0 ] ; then echo $testdir $testname $testfile $resultfile; fi 33 | 34 | $valgrind ./hotindexer-undo-do-test.tdb $testdir/$testfile >$testdir/$testname.run 35 | 36 | if [ -f $testdir/$resultfile ] ; then 37 | diff -q $testdir/$testname.run $testdir/$resultfile >/dev/null 2>&1 38 | exitcode=$? 39 | else 40 | exitcode=1 41 | fi 42 | if [ $verbose != 0 ] ; then 43 | echo $testname $exitcode 44 | else 45 | rm $testdir/$testname.run 46 | fi 47 | if [ $exitcode != 0 ] ; then break; fi 48 | done 49 | 50 | exit $exitcode 51 | -------------------------------------------------------------------------------- /src/tests/run_abortrecover_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | 8 | if [[ $# -ne 1 ]]; then exit 1; fi 9 | 10 | bin=$1; shift 11 | 12 | if $bin --test 13 | then 14 | echo $bin --test did not crash 15 | exit 1 16 | else 17 | set -e 18 | $bin --recover 19 | fi 20 | -------------------------------------------------------------------------------- /src/tests/run_checkpoint_stress_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | set -e 8 | 9 | test $# -ge 4 10 | 11 | bin=$1; shift 12 | size=$1; shift 13 | runs=$1; shift 14 | abortcode=$1; shift 15 | 16 | $bin -C -n $size 17 | $bin -C -i 0 -n $size 18 | for (( i = 1; i < $runs; i++ )) 19 | do 20 | echo -n "$i: " && date 21 | set +e 22 | $bin -c -i $i -n $size -X novalgrind 2>$TOKU_TEST_FILENAME/error.$i 23 | test $? -eq $abortcode || exit 1 24 | set -e 25 | grep -q 'HAPPY CRASH' $TOKU_TEST_FILENAME/error.$i 26 | done 27 | -------------------------------------------------------------------------------- /src/tests/run_diskfull_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | set -e 8 | 9 | test $# -ge 2 10 | 11 | bin=$1; shift 12 | abortcode=$1; shift 13 | 14 | num_writes=$($bin -q) 15 | set +e 16 | for (( i = 0; i < $num_writes; i++ )) 17 | do 18 | $bin -C $i 19 | test $? -eq $abortcode || exit 1 20 | done 21 | -------------------------------------------------------------------------------- /src/tests/run_recover_stress_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | set -e 8 | 9 | test $# -ge 4 10 | 11 | bin=$1; shift 12 | size=$1; shift 13 | runs=$1; shift 14 | abortcode=$1; shift 15 | 16 | mkdir -p $TOKU_TEST_FILENAME 17 | $bin -C -n $size -l 18 | $bin -C -i 0 -n $size -l 19 | for (( i = 1; i < $runs; i++ )) 20 | do 21 | echo -n "$i: " && date 22 | set +e 23 | $bin -c -i $i -n $size -l -X novalgrind 2>$TOKU_TEST_FILENAME/error.$i 24 | test $? -eq $abortcode || exit 1 25 | set -e 26 | grep -q 'HAPPY CRASH' $TOKU_TEST_FILENAME/error.$i 27 | done 28 | -------------------------------------------------------------------------------- /src/tests/run_recover_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | set -e 8 | 9 | test $# -ge 4 10 | 11 | bin=$1; shift 12 | envdir=$1; shift 13 | tdbrecover=$1; shift 14 | tdbdump=$1; shift 15 | 16 | echo doing $bin 17 | $bin --no-shutdown 18 | rm -rf $envdir/recoverdir 19 | mkdir $envdir/recoverdir 20 | cp $envdir/tokudb.directory $envdir/recoverdir/ 21 | cp $envdir/tokudb.environment $envdir/recoverdir/ 22 | cp $envdir/tokudb.rollback $envdir/recoverdir/ 23 | cp $envdir/*.tokulog* $envdir/recoverdir/ 24 | echo doing recovery 25 | $tdbrecover $envdir/recoverdir $envdir/recoverdir 26 | echo dump and compare 27 | $tdbdump -h $envdir foo.db >$envdir/foo.dump 28 | $tdbdump -h $envdir/recoverdir foo.db >$envdir/recoverdir/foo.dump 29 | diff -q $envdir/foo.dump $envdir/recoverdir/foo.dump 30 | -------------------------------------------------------------------------------- /src/tests/run_recovery_fileops_unit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | set -e 8 | test $# -ge 3 9 | 10 | bin=$1; shift 11 | errorfile=$1; shift 12 | abortcode=$1; shift 13 | 14 | set +e 15 | $bin -X novalgrind -c $@ 2> $errorfile 16 | test $? -eq $abortcode || { cat $errorfile; echo Error: no crash in $errorfile; exit 1; } 17 | set -e 18 | grep -q 'HAPPY CRASH' $errorfile || { cat $errorfile; echo Error: incorrect crash in $errorfile; exit 1; } 19 | rm -f $errorfile 20 | exec $bin -r $@ 21 | -------------------------------------------------------------------------------- /src/tests/run_stress_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python2.6 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | import sys 8 | import os 9 | import optparse 10 | 11 | # options 12 | parser = optparse.OptionParser() 13 | parser.add_option('--test', dest='test', type='string', default=None, help="name of stress test to run") 14 | parser.add_option('--iterations', dest='iterations', type='int', default=1, help="Number of test iterations (default = 1)") 15 | parser.add_option('--verbose', dest='verbose', action="store_true", default=False, help="Verbose printing (default = FALSE)") 16 | options, remainder = parser.parse_args() 17 | 18 | def run_test(): 19 | cmd = options.test 20 | if ( options.verbose ): cmd += ' -v' 21 | for i in range(options.iterations): 22 | os.system(cmd + ' -i %d' % (i)) 23 | 24 | 25 | def main(argv): 26 | run_test() 27 | return 0 28 | 29 | if __name__ == '__main__': 30 | usage = sys.modules["__main__"].__doc__ 31 | parser.set_usage(usage) 32 | unused_flags, new_argv = parser.parse_args(args=sys.argv[1:], values=options) 33 | sys.exit(main([sys.argv[0]] + new_argv)) 34 | 35 | -------------------------------------------------------------------------------- /src/tests/run_test_thread_stack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of PerconaFT. 4 | # Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. 5 | # 6 | 7 | if [[ $# -ne 1 ]]; then exit 1; fi 8 | 9 | bin=$1; shift 10 | 11 | set -e 12 | 13 | $bin -a -thread_stack 16384 14 | $bin -a -thread_stack 16384 -resume 15 | -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/AUTHORS: -------------------------------------------------------------------------------- 1 | opensource@google.com 2 | -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | set(snappy_srcs 4 | snappy 5 | snappy-c 6 | snappy-sinksource 7 | snappy-stubs-internal 8 | ) 9 | 10 | add_definitions("-Wno-sign-compare -Wno-unused-function -Wno-unused-parameter -fvisibility=hidden -fPIC") 11 | 12 | ## make the library, it's going to go into libtokudb.so so it needs 13 | ## to be PIC 14 | add_library(snappy STATIC ${snappy_srcs}) 15 | set_target_properties(snappy PROPERTIES POSITION_INDEPENDENT_CODE ON) 16 | install( 17 | TARGETS snappy 18 | DESTINATION lib 19 | ) 20 | install( 21 | FILES snappy.h snappy-stubs-public.h 22 | DESTINATION include 23 | ) 24 | -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | # Library. 4 | lib_LTLIBRARIES = libsnappy.la 5 | libsnappy_la_SOURCES = snappy.cc snappy-sinksource.cc snappy-stubs-internal.cc snappy-c.cc 6 | libsnappy_la_LDFLAGS = -version-info $(SNAPPY_LTVERSION) 7 | 8 | include_HEADERS = snappy.h snappy-sinksource.h snappy-stubs-public.h snappy-c.h 9 | noinst_HEADERS = snappy-internal.h snappy-stubs-internal.h snappy-test.h 10 | 11 | # Unit tests and benchmarks. 12 | snappy_unittest_CPPFLAGS = $(gflags_CFLAGS) $(GTEST_CPPFLAGS) 13 | snappy_unittest_SOURCES = snappy_unittest.cc snappy-test.cc 14 | snappy_unittest_LDFLAGS = $(GTEST_LDFLAGS) 15 | snappy_unittest_LDADD = libsnappy.la $(UNITTEST_LIBS) $(gflags_LIBS) $(GTEST_LIBS) 16 | TESTS = snappy_unittest 17 | noinst_PROGRAMS = $(TESTS) 18 | 19 | EXTRA_DIST = autogen.sh testdata/alice29.txt testdata/asyoulik.txt testdata/baddata1.snappy testdata/baddata2.snappy testdata/baddata3.snappy testdata/geo.protodata testdata/fireworks.jpeg testdata/html testdata/html_x_4 testdata/kppkn.gtb testdata/lcet10.txt testdata/paper-100k.pdf testdata/plrabn12.txt testdata/urls.10K 20 | dist_doc_DATA = ChangeLog COPYING INSTALL NEWS README format_description.txt framing_format.txt 21 | 22 | libtool: $(LIBTOOL_DEPS) 23 | $(SHELL) ./config.status --recheck 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/testdata/baddata1.snappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/snappy-1.1.2/testdata/baddata1.snappy -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/testdata/baddata2.snappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/snappy-1.1.2/testdata/baddata2.snappy -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/testdata/baddata3.snappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/snappy-1.1.2/testdata/baddata3.snappy -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/testdata/fireworks.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/snappy-1.1.2/testdata/fireworks.jpeg -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/testdata/geo.protodata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/snappy-1.1.2/testdata/geo.protodata -------------------------------------------------------------------------------- /third_party/snappy-1.1.2/testdata/paper-100k.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/snappy-1.1.2/testdata/paper-100k.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | Authors of XZ Utils 3 | =================== 4 | 5 | XZ Utils is developed and maintained by Lasse Collin 6 | . 7 | 8 | Major parts of liblzma are based on code written by Igor Pavlov, 9 | specifically the LZMA SDK . Without 10 | this code, XZ Utils wouldn't exist. 11 | 12 | The SHA-256 implementation in liblzma is based on the code found from 13 | 7-Zip , which has a modified version of the SHA-256 14 | code found from Crypto++ . The SHA-256 code 15 | in Crypto++ was written by Kevin Springle and Wei Dai. 16 | 17 | Some scripts have been adapted from gzip. The original versions 18 | were written by Jean-loup Gailly, Charles Levert, and Paul Eggert. 19 | Andrew Dudman helped adapting the script and their man pages for 20 | XZ Utils. 21 | 22 | The GNU Autotools based build system contains files from many authors, 23 | which I'm not trying list here. 24 | 25 | Several people have contributed fixes or reported bugs. Most of them 26 | are mentioned in the file THANKS. 27 | 28 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/NEWS -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/THANKS: -------------------------------------------------------------------------------- 1 | 2 | Thanks 3 | ====== 4 | 5 | Some people have helped more, some less, but nevertheless everyone's help 6 | has been important. :-) In alphabetical order: 7 | - Mark Adler 8 | - H. Peter Anvin 9 | - Nelson H. F. Beebe 10 | - Anders F. Björklund 11 | - Emmanuel Blot 12 | - David Burklund 13 | - Andrew Dudman 14 | - İsmail Dönmez 15 | - Mike Frysinger 16 | - Per Øyvind Karlsen 17 | - Ville Koskinen 18 | - Stephan Kulow 19 | - Peter Lawler 20 | - Hin-Tak Leung 21 | - Andraž 'ruskie' Levstik 22 | - Jim Meyering 23 | - Hongbo Ni 24 | - Jonathan Nieder 25 | - Igor Pavlov 26 | - Mikko Pouru 27 | - Bernhard Reutner-Fischer 28 | - Christian von Roques 29 | - Alexandre Sauvé 30 | - Andreas Schwab 31 | - Dan Shechter 32 | - Jonathan Stott 33 | - Paul Townsend 34 | - Mohammed Adnène Trojette 35 | - Patrick J. Volkerding 36 | - Bert Wesarg 37 | - Ralf Wildenhues 38 | - Charles Wilson 39 | - Lars Wirzenius 40 | - Pilorz Wojciech 41 | - Andreas Zieringer 42 | 43 | Also thanks to all the people who have participated in the Tukaani project. 44 | 45 | I have probably forgot to add some names to the above list. Sorry about 46 | that and thanks for your help. 47 | 48 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ############################################################################### 4 | # 5 | # Author: Lasse Collin 6 | # 7 | # This file has been put into the public domain. 8 | # You can do whatever you want with this file. 9 | # 10 | ############################################################################### 11 | 12 | # The result of using "autoreconf -fi" should be identical to using this 13 | # script. I'm leaving this script here just in case someone finds it useful. 14 | 15 | set -e -x 16 | 17 | ${AUTOPOINT:-autopoint} -f 18 | ${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f 19 | ${ACLOCAL:-aclocal} -I m4 20 | ${AUTOCONF:-autoconf} 21 | ${AUTOHEADER:-autoheader} 22 | ${AUTOMAKE:-automake} -acf --foreign 23 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/debug/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | noinst_PROGRAMS = \ 9 | repeat \ 10 | sync_flush \ 11 | full_flush \ 12 | memusage \ 13 | crc32 \ 14 | known_sizes \ 15 | hex2bin 16 | 17 | AM_CPPFLAGS = \ 18 | -I$(top_srcdir)/src/common \ 19 | -I$(top_srcdir)/src/liblzma/api \ 20 | $(STATIC_CPPFLAGS) 21 | 22 | AM_LDFLAGS = $(STATIC_LDFLAGS) 23 | 24 | LDADD = $(top_builddir)/src/liblzma/liblzma.la 25 | 26 | if COND_GNULIB 27 | LDADD += $(top_builddir)/lib/libgnu.a 28 | endif 29 | 30 | LDADD += $(LTLIBINTL) 31 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/debug/README: -------------------------------------------------------------------------------- 1 | 2 | Debug tools 3 | ----------- 4 | 5 | This directory contains a few tiny programs that may be helpful when 6 | debugging LZMA Utils. 7 | 8 | These tools are not meant to be installed. Often one needs to edit 9 | the source code a little to make the programs do the wanted things. 10 | If you don't know how these programs could help you, it is likely 11 | that they really are useless to you. 12 | 13 | These aren't intended to be used as example programs. They take some 14 | shortcuts here and there, which correct programs should not do. Many 15 | possible errors (especially I/O errors) are ignored. Don't report 16 | bugs or send patches to fix this kind of bugs. 17 | 18 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/debug/crc32.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file crc32.c 6 | /// \brief Primitive CRC32 calculation tool 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "sysdefs.h" 16 | #include 17 | 18 | 19 | int 20 | main(void) 21 | { 22 | uint32_t crc = 0; 23 | 24 | do { 25 | uint8_t buf[BUFSIZ]; 26 | const size_t size = fread(buf, 1, sizeof(buf), stdin); 27 | crc = lzma_crc32(buf, size, crc); 28 | } while (!ferror(stdin) && !feof(stdin)); 29 | 30 | //printf("%08" PRIX32 "\n", crc); 31 | 32 | // I want it little endian so it's easy to work with hex editor. 33 | printf("%02" PRIX32 " ", crc & 0xFF); 34 | printf("%02" PRIX32 " ", (crc >> 8) & 0xFF); 35 | printf("%02" PRIX32 " ", (crc >> 16) & 0xFF); 36 | printf("%02" PRIX32 " ", crc >> 24); 37 | printf("\n"); 38 | 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/debug/hex2bin.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file hex2bin.c 6 | /// \brief Converts hexadecimal input strings to binary 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "sysdefs.h" 16 | #include 17 | #include 18 | 19 | 20 | static int 21 | getbin(int x) 22 | { 23 | if (x >= '0' && x <= '9') 24 | return x - '0'; 25 | 26 | if (x >= 'A' && x <= 'F') 27 | return x - 'A' + 10; 28 | 29 | return x - 'a' + 10; 30 | } 31 | 32 | 33 | int 34 | main(void) 35 | { 36 | while (true) { 37 | int byte = getchar(); 38 | if (byte == EOF) 39 | return 0; 40 | if (!isxdigit(byte)) 41 | continue; 42 | 43 | const int digit = getchar(); 44 | if (digit == EOF || !isxdigit(digit)) { 45 | fprintf(stderr, "Invalid input\n"); 46 | return 1; 47 | } 48 | 49 | byte = (getbin(byte) << 4) | getbin(digit); 50 | if (putchar(byte) == EOF) { 51 | perror(NULL); 52 | return 1; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/debug/memusage.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file memusage.c 6 | /// \brief Calculates memory usage using lzma_memory_usage() 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "sysdefs.h" 16 | #include "lzma.h" 17 | #include 18 | 19 | int 20 | main(void) 21 | { 22 | lzma_options_lzma lzma = { 23 | .dict_size = (1U << 30) + (1U << 29), 24 | .lc = 3, 25 | .lp = 0, 26 | .pb = 2, 27 | .preset_dict = NULL, 28 | .preset_dict_size = 0, 29 | .mode = LZMA_MODE_NORMAL, 30 | .nice_len = 48, 31 | .mf = LZMA_MF_BT4, 32 | .depth = 0, 33 | }; 34 | 35 | /* 36 | lzma_options_filter filters[] = { 37 | { LZMA_FILTER_LZMA1, 38 | (lzma_options_lzma *)&lzma_preset_lzma[6 - 1] }, 39 | { UINT64_MAX, NULL } 40 | }; 41 | */ 42 | lzma_filter filters[] = { 43 | { LZMA_FILTER_LZMA1, &lzma }, 44 | { UINT64_MAX, NULL } 45 | }; 46 | 47 | printf("Encoder: %10" PRIu64 " B\n", lzma_memusage_encoder(filters)); 48 | printf("Decoder: %10" PRIu64 " B\n", lzma_memusage_decoder(filters)); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/debug/repeat.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file repeat.c 6 | /// \brief Repeats given string given times 7 | /// 8 | /// This program can be useful when debugging run-length encoder in 9 | /// the Subblock filter, especially the condition when repeat count 10 | /// doesn't fit into 28-bit integer. 11 | // 12 | // Author: Lasse Collin 13 | // 14 | // This file has been put into the public domain. 15 | // You can do whatever you want with this file. 16 | // 17 | /////////////////////////////////////////////////////////////////////////////// 18 | 19 | #include "sysdefs.h" 20 | #include 21 | 22 | 23 | int 24 | main(int argc, char **argv) 25 | { 26 | if (argc != 3) { 27 | fprintf(stderr, "Usage: %s COUNT STRING\n", argv[0]); 28 | exit(1); 29 | } 30 | 31 | unsigned long long count = strtoull(argv[1], NULL, 10); 32 | const size_t size = strlen(argv[2]); 33 | 34 | while (count-- != 0) 35 | fwrite(argv[2], 1, size, stdout); 36 | 37 | return !!(ferror(stdout) || fclose(stdout)); 38 | } 39 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-a4/xz-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-a4/xz-a4.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-a4/xzdec-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-a4/xzdec-a4.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-a4/xzdiff-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-a4/xzdiff-a4.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-a4/xzgrep-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-a4/xzgrep-a4.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-a4/xzless-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-a4/xzless-a4.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-a4/xzmore-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-a4/xzmore-a4.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-letter/xz-letter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-letter/xz-letter.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-letter/xzdec-letter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-letter/xzdec-letter.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-letter/xzdiff-letter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-letter/xzdiff-letter.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-letter/xzgrep-letter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-letter/xzgrep-letter.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-letter/xzless-letter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-letter/xzless-letter.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/pdf-letter/xzmore-letter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/doc/man/pdf-letter/xzmore-letter.pdf -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/txt/xzdiff.txt: -------------------------------------------------------------------------------- 1 | XZDIFF(1) XZ Utils XZDIFF(1) 2 | 3 | 4 | 5 | NAME 6 | xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files 7 | 8 | SYNOPSIS 9 | xzcmp [cmp_options] file1 [file2] 10 | xzdiff [diff_options] file1 [file2] 11 | lzcmp [cmp_options] file1 [file2] 12 | lzdiff [diff_options] file1 [file2] 13 | 14 | DESCRIPTION 15 | xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with 16 | xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed 17 | directly to cmp or diff. If only one file is specified, then the files 18 | compared are file1 (which must have a suffix of a supported compression 19 | format) and file1 from which the compression format suffix has been 20 | stripped. If two files are specified, then they are uncompressed if 21 | necessary and fed to cmp(1) or diff(1). The exit status from cmp or 22 | diff is preserved. 23 | 24 | The names lzcmp and lzdiff are provided for backward compatibility with 25 | LZMA Utils. 26 | 27 | SEE ALSO 28 | cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1) 29 | 30 | BUGS 31 | Messages from the cmp(1) or diff(1) programs refer to temporary file- 32 | names instead of those specified. 33 | 34 | 35 | 36 | Tukaani 2009-07-05 XZDIFF(1) 37 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/txt/xzgrep.txt: -------------------------------------------------------------------------------- 1 | XZGREP(1) XZ Utils XZGREP(1) 2 | 3 | 4 | 5 | NAME 6 | xzgrep - search compressed files for a regular expression 7 | 8 | SYNOPSIS 9 | xzgrep [grep_options] [-e] pattern file... 10 | xzegrep ... 11 | xzfgrep ... 12 | lzgrep ... 13 | lzegrep ... 14 | lzfgrep ... 15 | 16 | DESCRIPTION 17 | xzgrep invokes grep(1) on files which may be either uncompressed or 18 | compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options 19 | specified are passed directly to grep(1). 20 | 21 | If no file is specified, then the standard input is decompressed if 22 | necessary and fed to grep(1). When reading from standard input, 23 | gzip(1) and bzip2(1) compressed files are not supported. 24 | 25 | If xzgrep is invoked as xzegrep or xzfgrep then egrep(1) or fgrep(1) is 26 | used instead of grep(1). The same applies to names lzgrep, lzegrep, 27 | and lzfgrep, which are provided for backward compatibility with LZMA 28 | Utils. 29 | 30 | ENVIRONMENT 31 | GREP If the GREP environment variable is set, xzgrep uses it instead 32 | of grep(1), egrep(1), or fgrep(1). 33 | 34 | SEE ALSO 35 | grep(1), xz(1), gzip(1), bzip2(1), zgrep(1) 36 | 37 | 38 | 39 | Tukaani 2009-07-05 XZGREP(1) 40 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/txt/xzless.txt: -------------------------------------------------------------------------------- 1 | XZLESS(1) XZ Utils XZLESS(1) 2 | 3 | 4 | 5 | NAME 6 | xzless, lzless - view xz or lzma compressed (text) files 7 | 8 | SYNOPSIS 9 | xzless [file...] 10 | lzless [file...] 11 | 12 | DESCRIPTION 13 | xzless is a filter that displays pagefulls of uncompressed text from 14 | compressed file(s) to a terminal. It works on files compressed with 15 | xz(1) or lzma(1). If no files are given, xzless reads from standard 16 | input. 17 | 18 | xzless uses less(1) as its only pager. Unlike xzmore, the choice of 19 | pagers is not alterable by an environment variable. Commands are based 20 | on both more(1) and vi(1), and allow back and forth movement and 21 | searching. See the less(1) manual for more information. 22 | 23 | The command named lzless is provided for backward compatibility with 24 | LZMA Utils. 25 | 26 | ENVIRONMENT 27 | LESSMETACHARS 28 | A list of characters special to the shell. Set by xzless unless 29 | it is already set in the environment. 30 | 31 | LESSOPEN 32 | Set to a command line to invoke the xz(1) decompressor for pre- 33 | processing the input files to less(1). 34 | 35 | SEE ALSO 36 | less(1), xz(1), xzmore(1), zless(1) 37 | 38 | 39 | 40 | Tukaani 2009-07-05 XZLESS(1) 41 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/doc/man/txt/xzmore.txt: -------------------------------------------------------------------------------- 1 | XZMORE(1) XZ Utils XZMORE(1) 2 | 3 | 4 | 5 | NAME 6 | xzmore, lzmore - view xz or lzma compressed (text) files 7 | 8 | SYNOPSIS 9 | xzmore [filename ...] 10 | lzmore [filename ...] 11 | 12 | DESCRIPTION 13 | xzmore is a filter which allows examination of xz(1) or lzma(1) com- 14 | pressed text files one screenful at a time on a soft-copy terminal. 15 | 16 | To use a pager other than the default more, set environment variable 17 | PAGER to the name of the desired program. The name lzmore is provided 18 | for backward compatibility with LZMA Utils. 19 | 20 | e or q When the prompt --More--(Next file: file) is printed, this com- 21 | mand causes xzmore to exit. 22 | 23 | s When the prompt --More--(Next file: file) is printed, this com- 24 | mand causes xzmore to skip the next file and continue. 25 | 26 | For list of keyboard commands supported while actually viewing the con- 27 | tent of a file, refer to manual of the pager you use, usually more(1). 28 | 29 | SEE ALSO 30 | more(1), xz(1), xzless(1), zmore(1) 31 | 32 | 33 | 34 | Tukaani 2009-07-05 XZMORE(1) 35 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Copyright (C) 2004-2007 Free Software Foundation, Inc. 3 | ## 4 | ## This program is free software; you can redistribute it and/or modify 5 | ## it under the terms of the GNU General Public License as published by 6 | ## the Free Software Foundation; either version 2 of the License, or 7 | ## (at your option) any later version. 8 | ## 9 | ## This program is distributed in the hope that it will be useful, 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ## GNU General Public License for more details. 13 | ## 14 | 15 | ## Not using gnulib-tool, at least for now. It is likely that we won't 16 | ## need anything else from Gnulib than getopt_long(). 17 | 18 | noinst_LIBRARIES = libgnu.a 19 | 20 | libgnu_a_SOURCES = 21 | libgnu_a_DEPENDENCIES = $(LIBOBJS) 22 | libgnu_a_LIBADD = $(LIBOBJS) 23 | 24 | EXTRA_DIST = getopt.in.h getopt.c getopt1.c getopt_int.h 25 | BUILT_SOURCES = $(GETOPT_H) 26 | MOSTLYCLEANFILES = getopt.h getopt.h-t 27 | 28 | getopt.h: getopt.in.h 29 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 30 | cat $(srcdir)/getopt.in.h; \ 31 | } > $@-t 32 | mv -f $@-t $@ 33 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # Generated from ltversion.in. 11 | 12 | # serial 3012 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.2.6]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3012]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.2.6' 20 | macro_revision='1.3012' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/m4/nls.m4: -------------------------------------------------------------------------------- 1 | # nls.m4 serial 3 (gettext-0.15) 2 | dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Authors: 17 | dnl Ulrich Drepper , 1995-2000. 18 | dnl Bruno Haible , 2000-2003. 19 | 20 | AC_PREREQ(2.50) 21 | 22 | AC_DEFUN([AM_NLS], 23 | [ 24 | AC_MSG_CHECKING([whether NLS is requested]) 25 | dnl Default is enabled NLS 26 | AC_ARG_ENABLE(nls, 27 | [ --disable-nls do not use Native Language Support], 28 | USE_NLS=$enableval, USE_NLS=yes) 29 | AC_MSG_RESULT($USE_NLS) 30 | AC_SUBST(USE_NLS) 31 | ]) 32 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/LINGUAS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/po/LINGUAS -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files which contain translatable strings. 2 | src/xz/args.c 3 | src/xz/coder.c 4 | src/xz/file_io.c 5 | src/xz/hardware.c 6 | src/xz/main.c 7 | src/xz/message.c 8 | src/xz/options.c 9 | src/xz/suffix.c 10 | src/xz/util.c 11 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/po/stamp-po: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | SUBDIRS = liblzma xz xzdec lzmainfo scripts 9 | EXTRA_DIST = common 10 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/common/common_w32res.rc: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Lasse Collin 3 | * 4 | * This file has been put into the public domain. 5 | * You can do whatever you want with this file. 6 | */ 7 | 8 | #include 9 | #include "config.h" 10 | #define LZMA_H_INTERNAL 11 | #define LZMA_H_INTERNAL_RC 12 | #include "lzma/version.h" 13 | 14 | #ifndef MY_BUILD 15 | # define MY_BUILD 0 16 | #endif 17 | #define MY_VERSION LZMA_VERSION_MAJOR,LZMA_VERSION_MINOR,LZMA_VERSION_PATCH,MY_BUILD 18 | 19 | #define MY_FILENAME MY_NAME MY_SUFFIX 20 | #define MY_COMPANY "Lasse Collin and Igor Pavlov" 21 | #define MY_COPYRIGHT "Public Domain by " MY_COMPANY 22 | #define MY_COMMENTS "http://tukaani.org/xz/" 23 | 24 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 25 | VS_VERSION_INFO VERSIONINFO 26 | FILEVERSION MY_VERSION 27 | PRODUCTVERSION MY_VERSION 28 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 29 | FILEFLAGS 0 30 | FILEOS VOS_NT_WINDOWS32 31 | FILETYPE MY_TYPE 32 | FILESUBTYPE 0x0L 33 | BEGIN 34 | BLOCK "StringFileInfo" 35 | BEGIN 36 | BLOCK "040904b0" 37 | BEGIN 38 | VALUE "Comments", MY_COMMENTS 39 | VALUE "CompanyName", MY_COMPANY 40 | VALUE "FileDescription", MY_DESC 41 | VALUE "FileVersion", LZMA_VERSION_STRING 42 | VALUE "InternalName", MY_NAME 43 | VALUE "LegalCopyright", MY_COPYRIGHT 44 | VALUE "OriginalFilename", MY_FILENAME 45 | VALUE "ProductName", PACKAGE_NAME 46 | VALUE "ProductVersion", LZMA_VERSION_STRING 47 | END 48 | END 49 | BLOCK "VarFileInfo" 50 | BEGIN 51 | VALUE "Translation", 0x409, 1200 52 | END 53 | END 54 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/common/cpucores.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file cpucores.h 6 | /// \brief Get the number of online CPU cores 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef CPUCORES_H 16 | #define CPUCORES_H 17 | 18 | #if defined(HAVE_CPUCORES_SYSCONF) 19 | # include 20 | 21 | #elif defined(HAVE_CPUCORES_SYSCTL) 22 | # ifdef HAVE_SYS_PARAM_H 23 | # include 24 | # endif 25 | # ifdef HAVE_SYS_SYSCTL_H 26 | # include 27 | # endif 28 | #endif 29 | 30 | 31 | static inline uint32_t 32 | cpucores(void) 33 | { 34 | uint32_t ret = 0; 35 | 36 | #if defined(HAVE_CPUCORES_SYSCONF) 37 | const long cpus = sysconf(_SC_NPROCESSORS_ONLN); 38 | if (cpus > 0) 39 | ret = (uint32_t)(cpus); 40 | 41 | #elif defined(HAVE_CPUCORES_SYSCTL) 42 | int name[2] = { CTL_HW, HW_NCPU }; 43 | int cpus; 44 | size_t cpus_size = sizeof(cpus); 45 | if (!sysctl(name, &cpus, &cpus_size, NULL, NULL) 46 | && cpus_size == sizeof(cpus) && cpus > 0) 47 | ret = (uint32_t)(cpus); 48 | #endif 49 | 50 | return ret; 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/common/mythread.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file mythread.h 6 | /// \brief Wrappers for threads 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "sysdefs.h" 16 | 17 | 18 | #ifdef HAVE_PTHREAD 19 | # include 20 | 21 | # define mythread_once(func) \ 22 | do { \ 23 | static pthread_once_t once_ = PTHREAD_ONCE_INIT; \ 24 | pthread_once(&once_, &func); \ 25 | } while (0) 26 | 27 | # define mythread_sigmask(how, set, oset) \ 28 | pthread_sigmask(how, set, oset) 29 | 30 | #else 31 | 32 | # define mythread_once(func) \ 33 | do { \ 34 | static bool once_ = false; \ 35 | if (!once_) { \ 36 | func(); \ 37 | once_ = true; \ 38 | } \ 39 | } while (0) 40 | 41 | # define mythread_sigmask(how, set, oset) \ 42 | sigprocmask(how, set, oset) 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/common/open_stdxxx.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file open_stdxxx.h 6 | /// \brief Make sure that file descriptors 0, 1, and 2 are open 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef OPEN_STDXXX_H 16 | #define OPEN_STDXXX_H 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | 23 | static void 24 | open_stdxxx(int status) 25 | { 26 | for (int i = 0; i <= 2; ++i) { 27 | // We use fcntl() to check if the file descriptor is open. 28 | if (fcntl(i, F_GETFD) == -1 && errno == EBADF) { 29 | // With stdin, we could use /dev/full so that 30 | // writing to stdin would fail. However, /dev/full 31 | // is Linux specific, and if the program tries to 32 | // write to stdin, there's already a problem anyway. 33 | const int fd = open("/dev/null", O_NOCTTY 34 | | (i == 0 ? O_WRONLY : O_RDONLY)); 35 | 36 | if (fd != i) { 37 | // Something went wrong. Exit with the 38 | // exit status we were given. Don't try 39 | // to print an error message, since stderr 40 | // may very well be non-existent. This 41 | // error should be extremely rare. 42 | (void)close(fd); 43 | exit(status); 44 | } 45 | } 46 | } 47 | 48 | return; 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/api/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | nobase_include_HEADERS = \ 9 | lzma.h \ 10 | lzma/base.h \ 11 | lzma/bcj.h \ 12 | lzma/block.h \ 13 | lzma/check.h \ 14 | lzma/container.h \ 15 | lzma/delta.h \ 16 | lzma/filter.h \ 17 | lzma/index.h \ 18 | lzma/index_hash.h \ 19 | lzma/lzma.h \ 20 | lzma/stream_flags.h \ 21 | lzma/subblock.h \ 22 | lzma/version.h \ 23 | lzma/vli.h 24 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/check/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | EXTRA_DIST += \ 9 | check/crc32_tablegen.c \ 10 | check/crc64_tablegen.c 11 | 12 | liblzma_la_SOURCES += \ 13 | check/check.c \ 14 | check/check.h \ 15 | check/crc_macros.h 16 | 17 | if COND_CHECK_CRC32 18 | if COND_SMALL 19 | liblzma_la_SOURCES += check/crc32_small.c 20 | else 21 | liblzma_la_SOURCES += \ 22 | check/crc32_table.c \ 23 | check/crc32_table_le.h \ 24 | check/crc32_table_be.h 25 | if COND_ASM_X86 26 | liblzma_la_SOURCES += check/crc32_x86.S 27 | else 28 | liblzma_la_SOURCES += check/crc32_fast.c 29 | endif 30 | endif 31 | endif 32 | 33 | if COND_CHECK_CRC64 34 | if COND_SMALL 35 | liblzma_la_SOURCES += check/crc64_small.c 36 | else 37 | liblzma_la_SOURCES += \ 38 | check/crc64_table.c \ 39 | check/crc64_table_le.h \ 40 | check/crc64_table_be.h 41 | if COND_ASM_X86 42 | liblzma_la_SOURCES += check/crc64_x86.S 43 | else 44 | liblzma_la_SOURCES += check/crc64_fast.c 45 | endif 46 | endif 47 | endif 48 | 49 | if COND_CHECK_SHA256 50 | liblzma_la_SOURCES += check/sha256.c 51 | endif 52 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/check/crc32_small.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file crc32_small.c 6 | /// \brief CRC32 calculation (size-optimized) 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "check.h" 16 | 17 | 18 | uint32_t lzma_crc32_table[1][256]; 19 | 20 | 21 | static void 22 | crc32_init(void) 23 | { 24 | static const uint32_t poly32 = UINT32_C(0xEDB88320); 25 | 26 | for (size_t b = 0; b < 256; ++b) { 27 | uint32_t r = b; 28 | for (size_t i = 0; i < 8; ++i) { 29 | if (r & 1) 30 | r = (r >> 1) ^ poly32; 31 | else 32 | r >>= 1; 33 | } 34 | 35 | lzma_crc32_table[0][b] = r; 36 | } 37 | 38 | return; 39 | } 40 | 41 | 42 | extern void 43 | lzma_crc32_init(void) 44 | { 45 | mythread_once(crc32_init); 46 | return; 47 | } 48 | 49 | 50 | extern LZMA_API(uint32_t) 51 | lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc) 52 | { 53 | lzma_crc32_init(); 54 | 55 | crc = ~crc; 56 | 57 | while (size != 0) { 58 | crc = lzma_crc32_table[0][*buf++ ^ (crc & 0xFF)] ^ (crc >> 8); 59 | --size; 60 | } 61 | 62 | return ~crc; 63 | } 64 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/check/crc32_table.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file crc32_table.c 6 | /// \brief Precalculated CRC32 table with correct endianness 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "common.h" 16 | 17 | #ifdef WORDS_BIGENDIAN 18 | # include "crc32_table_be.h" 19 | #else 20 | # include "crc32_table_le.h" 21 | #endif 22 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/check/crc64_small.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file crc64_small.c 6 | /// \brief CRC64 calculation (size-optimized) 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "check.h" 16 | 17 | 18 | static uint64_t crc64_table[256]; 19 | 20 | 21 | static void 22 | crc64_init(void) 23 | { 24 | static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42); 25 | 26 | for (size_t b = 0; b < 256; ++b) { 27 | uint64_t r = b; 28 | for (size_t i = 0; i < 8; ++i) { 29 | if (r & 1) 30 | r = (r >> 1) ^ poly64; 31 | else 32 | r >>= 1; 33 | } 34 | 35 | crc64_table[b] = r; 36 | } 37 | 38 | return; 39 | } 40 | 41 | 42 | extern LZMA_API(uint64_t) 43 | lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc) 44 | { 45 | mythread_once(crc64_init); 46 | 47 | crc = ~crc; 48 | 49 | while (size != 0) { 50 | crc = crc64_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8); 51 | --size; 52 | } 53 | 54 | return ~crc; 55 | } 56 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/check/crc64_table.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file crc64_table.c 6 | /// \brief Precalculated CRC64 table with correct endianness 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "common.h" 16 | 17 | #ifdef WORDS_BIGENDIAN 18 | # include "crc64_table_be.h" 19 | #else 20 | # include "crc64_table_le.h" 21 | #endif 22 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/check/crc_macros.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file crc_macros.h 6 | /// \brief Some endian-dependent macros for CRC32 and CRC64 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifdef WORDS_BIGENDIAN 16 | # include "../../common/bswap.h" 17 | 18 | # define A(x) ((x) >> 24) 19 | # define B(x) (((x) >> 16) & 0xFF) 20 | # define C(x) (((x) >> 8) & 0xFF) 21 | # define D(x) ((x) & 0xFF) 22 | 23 | # define S8(x) ((x) << 8) 24 | # define S32(x) ((x) << 32) 25 | 26 | #else 27 | # define A(x) ((x) & 0xFF) 28 | # define B(x) (((x) >> 8) & 0xFF) 29 | # define C(x) (((x) >> 16) & 0xFF) 30 | # define D(x) ((x) >> 24) 31 | 32 | # define S8(x) ((x) >> 8) 33 | # define S32(x) ((x) >> 32) 34 | #endif 35 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/alone_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file alone_decoder.h 6 | /// \brief Decoder for LZMA_Alone files 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_ALONE_DECODER_H 16 | #define LZMA_ALONE_DECODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, 22 | lzma_allocator *allocator, uint64_t memlimit); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/block_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file block_decoder.h 6 | /// \brief Decodes .xz Blocks 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_BLOCK_DECODER_H 16 | #define LZMA_BLOCK_DECODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | extern lzma_ret lzma_block_decoder_init(lzma_next_coder *next, 22 | lzma_allocator *allocator, lzma_block *block); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/bsr.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file bsr.h 6 | /// \brief Bit scan reverse 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_BSR_H 16 | #define LZMA_BSR_H 17 | 18 | // NOTE: Both input and output variables for lzma_bsr must be uint32_t. 19 | 20 | #if defined(__GNUC__) && (defined (HAVE_ASM_X86) || defined(HAVE_ASM_X86_64)) 21 | # define lzma_bsr(dest, n) \ 22 | __asm__("bsrl %1, %0" : "=r" (dest) : "rm" (n)) 23 | 24 | #else 25 | # define lzma_bsr(dest, n) dest = lzma_bsr_helper(n) 26 | 27 | static inline uint32_t 28 | lzma_bsr_helper(uint32_t n) 29 | { 30 | assert(n != 0); 31 | 32 | uint32_t i = 31; 33 | 34 | if ((n & UINT32_C(0xFFFF0000)) == 0) { 35 | n <<= 16; 36 | i = 15; 37 | } 38 | 39 | if ((n & UINT32_C(0xFF000000)) == 0) { 40 | n <<= 8; 41 | i -= 8; 42 | } 43 | 44 | if ((n & UINT32_C(0xF0000000)) == 0) { 45 | n <<= 4; 46 | i -= 4; 47 | } 48 | 49 | if ((n & UINT32_C(0xC0000000)) == 0) { 50 | n <<= 2; 51 | i -= 2; 52 | } 53 | 54 | if ((n & UINT32_C(0x80000000)) == 0) 55 | --i; 56 | 57 | return i; 58 | } 59 | 60 | #endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/easy_buffer_encoder.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file easy_buffer_encoder.c 6 | /// \brief Easy single-call .xz Stream encoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "easy_preset.h" 16 | 17 | 18 | extern LZMA_API(lzma_ret) 19 | lzma_easy_buffer_encode(uint32_t preset, lzma_check check, 20 | lzma_allocator *allocator, const uint8_t *in, size_t in_size, 21 | uint8_t *out, size_t *out_pos, size_t out_size) 22 | { 23 | lzma_options_easy opt_easy; 24 | if (lzma_easy_preset(&opt_easy, preset)) 25 | return LZMA_OPTIONS_ERROR; 26 | 27 | return lzma_stream_buffer_encode(opt_easy.filters, check, 28 | allocator, in, in_size, out, out_pos, out_size); 29 | } 30 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/easy_decoder_memusage.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file easy_decoder_memusage.c 6 | /// \brief Decoder memory usage calculation to match easy encoder presets 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "easy_preset.h" 16 | 17 | 18 | extern LZMA_API(uint64_t) 19 | lzma_easy_decoder_memusage(uint32_t preset) 20 | { 21 | lzma_options_easy opt_easy; 22 | if (lzma_easy_preset(&opt_easy, preset)) 23 | return UINT32_MAX; 24 | 25 | return lzma_raw_decoder_memusage(opt_easy.filters); 26 | } 27 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/easy_encoder_memusage.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file easy_encoder_memusage.c 6 | /// \brief Easy .xz Stream encoder memory usage calculation 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "easy_preset.h" 16 | 17 | 18 | extern LZMA_API(uint64_t) 19 | lzma_easy_encoder_memusage(uint32_t preset) 20 | { 21 | lzma_options_easy opt_easy; 22 | if (lzma_easy_preset(&opt_easy, preset)) 23 | return UINT32_MAX; 24 | 25 | return lzma_raw_encoder_memusage(opt_easy.filters); 26 | } 27 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/easy_preset.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file easy_preset.c 6 | /// \brief Preset handling for easy encoder and decoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "easy_preset.h" 16 | 17 | 18 | extern bool 19 | lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset) 20 | { 21 | if (lzma_lzma_preset(&opt_easy->opt_lzma, preset)) 22 | return true; 23 | 24 | opt_easy->filters[0].id = LZMA_FILTER_LZMA2; 25 | opt_easy->filters[0].options = &opt_easy->opt_lzma; 26 | opt_easy->filters[1].id = LZMA_VLI_UNKNOWN; 27 | 28 | return false; 29 | } 30 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/easy_preset.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file easy_preset.h 6 | /// \brief Preset handling for easy encoder and decoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "common.h" 16 | 17 | 18 | typedef struct { 19 | /// We need to keep the filters array available in case 20 | /// LZMA_FULL_FLUSH is used. 21 | lzma_filter filters[LZMA_FILTERS_MAX + 1]; 22 | 23 | /// Options for LZMA2 24 | lzma_options_lzma opt_lzma; 25 | 26 | // Options for more filters can be added later, so this struct 27 | // is not ready to be put into the public API. 28 | 29 | } lzma_options_easy; 30 | 31 | 32 | /// Set *easy to the settings given by the preset. Returns true on error, 33 | /// false on success. 34 | extern bool lzma_easy_preset(lzma_options_easy *easy, uint32_t preset); 35 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/filter_common.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file filter_common.c 6 | /// \brief Filter-specific stuff common for both encoder and decoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_FILTER_COMMON_H 16 | #define LZMA_FILTER_COMMON_H 17 | 18 | #include "common.h" 19 | 20 | 21 | /// Both lzma_filter_encoder and lzma_filter_decoder begin with these members. 22 | typedef struct { 23 | /// Filter ID 24 | lzma_vli id; 25 | 26 | /// Initializes the filter encoder and calls lzma_next_filter_init() 27 | /// for filters + 1. 28 | lzma_init_function init; 29 | 30 | /// Calculates memory usage of the encoder. If the options are 31 | /// invalid, UINT64_MAX is returned. 32 | uint64_t (*memusage)(const void *options); 33 | 34 | } lzma_filter_coder; 35 | 36 | 37 | typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id); 38 | 39 | 40 | extern lzma_ret lzma_raw_coder_init( 41 | lzma_next_coder *next, lzma_allocator *allocator, 42 | const lzma_filter *filters, 43 | lzma_filter_find coder_find, bool is_encoder); 44 | 45 | 46 | extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find, 47 | const lzma_filter *filters); 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/filter_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file filter_decoder.c 6 | /// \brief Filter ID mapping to filter-specific functions 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_FILTER_DECODER_H 16 | #define LZMA_FILTER_DECODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | extern lzma_ret lzma_raw_decoder_init( 22 | lzma_next_coder *next, lzma_allocator *allocator, 23 | const lzma_filter *options); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/filter_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file filter_encoder.c 6 | /// \brief Filter ID mapping to filter-specific functions 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_FILTER_ENCODER_H 16 | #define LZMA_FILTER_ENCODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | // FIXME !!! Public API 22 | extern lzma_vli lzma_chunk_size(const lzma_filter *filters); 23 | 24 | 25 | extern lzma_ret lzma_raw_encoder_init( 26 | lzma_next_coder *next, lzma_allocator *allocator, 27 | const lzma_filter *options); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/filter_flags_decoder.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file filter_flags_decoder.c 6 | /// \brief Decodes a Filter Flags field 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "filter_decoder.h" 16 | 17 | 18 | extern LZMA_API(lzma_ret) 19 | lzma_filter_flags_decode( 20 | lzma_filter *filter, lzma_allocator *allocator, 21 | const uint8_t *in, size_t *in_pos, size_t in_size) 22 | { 23 | // Set the pointer to NULL so the caller can always safely free it. 24 | filter->options = NULL; 25 | 26 | // Filter ID 27 | return_if_error(lzma_vli_decode(&filter->id, NULL, 28 | in, in_pos, in_size)); 29 | 30 | if (filter->id >= LZMA_FILTER_RESERVED_START) 31 | return LZMA_DATA_ERROR; 32 | 33 | // Size of Properties 34 | lzma_vli props_size; 35 | return_if_error(lzma_vli_decode(&props_size, NULL, 36 | in, in_pos, in_size)); 37 | 38 | // Filter Properties 39 | if (in_size - *in_pos < props_size) 40 | return LZMA_DATA_ERROR; 41 | 42 | const lzma_ret ret = lzma_properties_decode( 43 | filter, allocator, in + *in_pos, props_size); 44 | 45 | *in_pos += props_size; 46 | 47 | return ret; 48 | } 49 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/index_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file index_encoder.h 6 | /// \brief Encodes the Index field 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_INDEX_ENCODER_H 16 | #define LZMA_INDEX_ENCODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next, 22 | lzma_allocator *allocator, lzma_index *i); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/stream_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file stream_decoder.h 6 | /// \brief Decodes .xz Streams 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_STREAM_DECODER_H 16 | #define LZMA_STREAM_DECODER_H 17 | 18 | #include "common.h" 19 | 20 | extern lzma_ret lzma_stream_decoder_init(lzma_next_coder *next, 21 | lzma_allocator *allocator, uint64_t memlimit, uint32_t flags); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/stream_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file stream_encoder.h 6 | /// \brief Encodes .xz Streams 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_STREAM_ENCODER_H 16 | #define LZMA_STREAM_ENCODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | extern lzma_ret lzma_stream_encoder_init( 22 | lzma_next_coder *next, lzma_allocator *allocator, 23 | const lzma_filter *filters, lzma_check check); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/stream_flags_common.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file stream_flags_common.c 6 | /// \brief Common stuff for Stream flags coders 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "stream_flags_common.h" 16 | 17 | 18 | const uint8_t lzma_header_magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 }; 19 | const uint8_t lzma_footer_magic[2] = { 0x59, 0x5A }; 20 | 21 | 22 | extern LZMA_API(lzma_ret) 23 | lzma_stream_flags_compare( 24 | const lzma_stream_flags *a, const lzma_stream_flags *b) 25 | { 26 | // We can compare only version 0 structures. 27 | if (a->version != 0 || b->version != 0) 28 | return LZMA_OPTIONS_ERROR; 29 | 30 | // Check type 31 | if ((unsigned int)(a->check) > LZMA_CHECK_ID_MAX 32 | || (unsigned int)(b->check) > LZMA_CHECK_ID_MAX) 33 | return LZMA_PROG_ERROR; 34 | 35 | if (a->check != b->check) 36 | return LZMA_DATA_ERROR; 37 | 38 | // Backward Sizes are compared only if they are known in both. 39 | if (a->backward_size != LZMA_VLI_UNKNOWN 40 | && b->backward_size != LZMA_VLI_UNKNOWN) { 41 | if (!is_backward_size_valid(a) || !is_backward_size_valid(b)) 42 | return LZMA_PROG_ERROR; 43 | 44 | if (a->backward_size != b->backward_size) 45 | return LZMA_DATA_ERROR; 46 | } 47 | 48 | return LZMA_OK; 49 | } 50 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/stream_flags_common.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file stream_flags_common.h 6 | /// \brief Common stuff for Stream flags coders 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_STREAM_FLAGS_COMMON_H 16 | #define LZMA_STREAM_FLAGS_COMMON_H 17 | 18 | #include "common.h" 19 | 20 | /// Size of the Stream Flags field 21 | #define LZMA_STREAM_FLAGS_SIZE 2 22 | 23 | extern const uint8_t lzma_header_magic[6]; 24 | extern const uint8_t lzma_footer_magic[2]; 25 | 26 | 27 | static inline bool 28 | is_backward_size_valid(const lzma_stream_flags *options) 29 | { 30 | return options->backward_size >= LZMA_BACKWARD_SIZE_MIN 31 | && options->backward_size <= LZMA_BACKWARD_SIZE_MAX 32 | && (options->backward_size & 3) == 0; 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/common/vli_size.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file vli_size.c 6 | /// \brief Calculates the encoded size of a variable-length integer 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "common.h" 16 | 17 | 18 | extern LZMA_API(uint32_t) 19 | lzma_vli_size(lzma_vli vli) 20 | { 21 | if (vli > LZMA_VLI_MAX) 22 | return 0; 23 | 24 | uint32_t i = 0; 25 | do { 26 | vli >>= 7; 27 | ++i; 28 | } while (vli != 0); 29 | 30 | assert(i <= LZMA_VLI_BYTES_MAX); 31 | return i; 32 | } 33 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/delta/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | liblzma_la_SOURCES += \ 9 | delta/delta_common.c \ 10 | delta/delta_common.h \ 11 | delta/delta_private.h 12 | 13 | if COND_ENCODER_DELTA 14 | liblzma_la_SOURCES += \ 15 | delta/delta_encoder.c \ 16 | delta/delta_encoder.h 17 | endif 18 | 19 | if COND_DECODER_DELTA 20 | liblzma_la_SOURCES += \ 21 | delta/delta_decoder.c \ 22 | delta/delta_decoder.h 23 | endif 24 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/delta/delta_common.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file delta_common.h 6 | /// \brief Common stuff for Delta encoder and decoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_DELTA_COMMON_H 16 | #define LZMA_DELTA_COMMON_H 17 | 18 | #include "common.h" 19 | 20 | extern uint64_t lzma_delta_coder_memusage(const void *options); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/delta/delta_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file delta_decoder.h 6 | /// \brief Delta filter decoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_DELTA_DECODER_H 16 | #define LZMA_DELTA_DECODER_H 17 | 18 | #include "delta_common.h" 19 | 20 | extern lzma_ret lzma_delta_decoder_init(lzma_next_coder *next, 21 | lzma_allocator *allocator, const lzma_filter_info *filters); 22 | 23 | extern lzma_ret lzma_delta_props_decode( 24 | void **options, lzma_allocator *allocator, 25 | const uint8_t *props, size_t props_size); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/delta/delta_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file delta_encoder.h 6 | /// \brief Delta filter encoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_DELTA_ENCODER_H 16 | #define LZMA_DELTA_ENCODER_H 17 | 18 | #include "delta_common.h" 19 | 20 | extern lzma_ret lzma_delta_encoder_init(lzma_next_coder *next, 21 | lzma_allocator *allocator, const lzma_filter_info *filters); 22 | 23 | extern lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/delta/delta_private.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file delta_private.h 6 | /// \brief Private common stuff for Delta encoder and decoder 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_DELTA_PRIVATE_H 16 | #define LZMA_DELTA_PRIVATE_H 17 | 18 | #include "delta_common.h" 19 | 20 | struct lzma_coder_s { 21 | /// Next coder in the chain 22 | lzma_next_coder next; 23 | 24 | /// Delta distance 25 | size_t distance; 26 | 27 | /// Position in history[] 28 | uint8_t pos; 29 | 30 | /// Buffer to hold history of the original data 31 | uint8_t history[LZMA_DELTA_DIST_MAX]; 32 | }; 33 | 34 | 35 | extern lzma_ret lzma_delta_coder_init( 36 | lzma_next_coder *next, lzma_allocator *allocator, 37 | const lzma_filter_info *filters, lzma_code_function code); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/liblzma.pc.in: -------------------------------------------------------------------------------- 1 | # 2 | # Author: Lasse Collin 3 | # 4 | # This file has been put into the public domain. 5 | # You can do whatever you want with this file. 6 | # 7 | 8 | prefix=@prefix@ 9 | exec_prefix=@exec_prefix@ 10 | libdir=@libdir@ 11 | includedir=@includedir@ 12 | 13 | Name: liblzma 14 | Description: General purpose data compression library 15 | URL: @PACKAGE_HOMEPAGE@ 16 | Version: @PACKAGE_VERSION@ 17 | Cflags: -I${includedir} 18 | Libs: -L${libdir} -llzma 19 | Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ 20 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/liblzma_w32res.rc: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Lasse Collin 3 | * 4 | * This file has been put into the public domain. 5 | * You can do whatever you want with this file. 6 | */ 7 | 8 | #define MY_TYPE VFT_DLL 9 | #define MY_NAME "liblzma" 10 | #define MY_SUFFIX ".dll" 11 | #define MY_DESC "liblzma data compression library" 12 | #include "common_w32res.rc" 13 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/lz/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | if COND_ENCODER_LZ 9 | liblzma_la_SOURCES += \ 10 | lz/lz_encoder.c \ 11 | lz/lz_encoder.h \ 12 | lz/lz_encoder_hash.h \ 13 | lz/lz_encoder_mf.c 14 | endif 15 | 16 | 17 | if COND_DECODER_LZ 18 | liblzma_la_SOURCES += \ 19 | lz/lz_decoder.c \ 20 | lz/lz_decoder.h 21 | endif 22 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/lzma/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | EXTRA_DIST += lzma/fastpos_tablegen.c 9 | 10 | liblzma_la_SOURCES += lzma/lzma_common.h 11 | 12 | if COND_ENCODER_LZMA1 13 | liblzma_la_SOURCES += \ 14 | lzma/fastpos.h \ 15 | lzma/lzma_encoder.h \ 16 | lzma/lzma_encoder.c \ 17 | lzma/lzma_encoder_presets.c \ 18 | lzma/lzma_encoder_private.h \ 19 | lzma/lzma_encoder_optimum_fast.c \ 20 | lzma/lzma_encoder_optimum_normal.c 21 | 22 | if !COND_SMALL 23 | liblzma_la_SOURCES += lzma/fastpos_table.c 24 | endif 25 | endif 26 | 27 | if COND_DECODER_LZMA1 28 | liblzma_la_SOURCES += \ 29 | lzma/lzma_decoder.c \ 30 | lzma/lzma_decoder.h 31 | endif 32 | 33 | if COND_ENCODER_LZMA2 34 | liblzma_la_SOURCES += \ 35 | lzma/lzma2_encoder.c \ 36 | lzma/lzma2_encoder.h 37 | endif 38 | 39 | if COND_DECODER_LZMA2 40 | liblzma_la_SOURCES += \ 41 | lzma/lzma2_decoder.c \ 42 | lzma/lzma2_decoder.h 43 | endif 44 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/lzma/fastpos_tablegen.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file fastpos_tablegen.c 6 | /// \brief Generates the lzma_fastpos[] lookup table 7 | /// 8 | // Authors: Igor Pavlov 9 | // Lasse Collin 10 | // 11 | // This file has been put into the public domain. 12 | // You can do whatever you want with this file. 13 | // 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | #include 17 | #include 18 | #include 19 | #include "fastpos.h" 20 | 21 | 22 | int 23 | main(void) 24 | { 25 | uint8_t fastpos[1 << FASTPOS_BITS]; 26 | 27 | const uint8_t fast_slots = 2 * FASTPOS_BITS; 28 | uint32_t c = 2; 29 | 30 | fastpos[0] = 0; 31 | fastpos[1] = 1; 32 | 33 | for (uint8_t slot_fast = 2; slot_fast < fast_slots; ++slot_fast) { 34 | const uint32_t k = 1 << ((slot_fast >> 1) - 1); 35 | for (uint32_t j = 0; j < k; ++j, ++c) 36 | fastpos[c] = slot_fast; 37 | } 38 | 39 | printf("/* This file has been automatically generated " 40 | "by fastpos_tablegen.c. */\n\n" 41 | "#include \"common.h\"\n" 42 | "#include \"fastpos.h\"\n\n" 43 | "const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {"); 44 | 45 | for (size_t i = 0; i < (1 << FASTPOS_BITS); ++i) { 46 | if (i % 16 == 0) 47 | printf("\n\t"); 48 | 49 | printf("%3u", (unsigned int)(fastpos[i])); 50 | 51 | if (i != (1 << FASTPOS_BITS) - 1) 52 | printf(","); 53 | } 54 | 55 | printf("\n};\n"); 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/lzma/lzma2_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file lzma2_decoder.h 6 | /// \brief LZMA2 decoder 7 | /// 8 | // Authors: Igor Pavlov 9 | // Lasse Collin 10 | // 11 | // This file has been put into the public domain. 12 | // You can do whatever you want with this file. 13 | // 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | #ifndef LZMA_LZMA2_DECODER_H 17 | #define LZMA_LZMA2_DECODER_H 18 | 19 | #include "common.h" 20 | 21 | extern lzma_ret lzma_lzma2_decoder_init(lzma_next_coder *next, 22 | lzma_allocator *allocator, const lzma_filter_info *filters); 23 | 24 | extern uint64_t lzma_lzma2_decoder_memusage(const void *options); 25 | 26 | extern lzma_ret lzma_lzma2_props_decode( 27 | void **options, lzma_allocator *allocator, 28 | const uint8_t *props, size_t props_size); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/lzma/lzma2_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file lzma2_encoder.h 6 | /// \brief LZMA2 encoder 7 | /// 8 | // Authors: Igor Pavlov 9 | // Lasse Collin 10 | // 11 | // This file has been put into the public domain. 12 | // You can do whatever you want with this file. 13 | // 14 | /////////////////////////////////////////////////////////////////////////////// 15 | 16 | #ifndef LZMA_LZMA2_ENCODER_H 17 | #define LZMA_LZMA2_ENCODER_H 18 | 19 | #include "common.h" 20 | 21 | 22 | /// Maximum number of bytes of actual data per chunk (no headers) 23 | #define LZMA2_CHUNK_MAX (UINT32_C(1) << 16) 24 | 25 | /// Maximum uncompressed size of LZMA chunk (no headers) 26 | #define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21) 27 | 28 | /// Maximum size of LZMA2 headers 29 | #define LZMA2_HEADER_MAX 6 30 | 31 | /// Size of a header for uncompressed chunk 32 | #define LZMA2_HEADER_UNCOMPRESSED 3 33 | 34 | 35 | extern lzma_ret lzma_lzma2_encoder_init( 36 | lzma_next_coder *next, lzma_allocator *allocator, 37 | const lzma_filter_info *filters); 38 | 39 | extern uint64_t lzma_lzma2_encoder_memusage(const void *options); 40 | 41 | extern lzma_ret lzma_lzma2_props_encode(const void *options, uint8_t *out); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/rangecoder/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | EXTRA_DIST += rangecoder/price_tablegen.c 9 | 10 | liblzma_la_SOURCES += rangecoder/range_common.h 11 | 12 | if COND_ENCODER_LZMA1 13 | liblzma_la_SOURCES += \ 14 | rangecoder/range_encoder.h \ 15 | rangecoder/price.h \ 16 | rangecoder/price_table.c 17 | endif 18 | 19 | if COND_DECODER_LZMA1 20 | liblzma_la_SOURCES += rangecoder/range_decoder.h 21 | endif 22 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/rangecoder/price_table.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /* This file has been automatically generated by price_tablegen.c. */ 4 | 5 | #include "range_encoder.h" 6 | 7 | const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE] = { 8 | 128, 103, 91, 84, 78, 73, 69, 66, 9 | 63, 61, 58, 56, 54, 52, 51, 49, 10 | 48, 46, 45, 44, 43, 42, 41, 40, 11 | 39, 38, 37, 36, 35, 34, 34, 33, 12 | 32, 31, 31, 30, 29, 29, 28, 28, 13 | 27, 26, 26, 25, 25, 24, 24, 23, 14 | 23, 22, 22, 22, 21, 21, 20, 20, 15 | 19, 19, 19, 18, 18, 17, 17, 17, 16 | 16, 16, 16, 15, 15, 15, 14, 14, 17 | 14, 13, 13, 13, 12, 12, 12, 11, 18 | 11, 11, 11, 10, 10, 10, 10, 9, 19 | 9, 9, 9, 8, 8, 8, 8, 7, 20 | 7, 7, 7, 6, 6, 6, 6, 5, 21 | 5, 5, 5, 5, 4, 4, 4, 4, 22 | 3, 3, 3, 3, 3, 2, 2, 2, 23 | 2, 2, 2, 1, 1, 1, 1, 1 24 | }; 25 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/simple/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | liblzma_la_SOURCES += \ 9 | simple/simple_coder.c \ 10 | simple/simple_coder.h \ 11 | simple/simple_private.h 12 | 13 | if COND_ENCODER_SIMPLE 14 | liblzma_la_SOURCES += \ 15 | simple/simple_encoder.c \ 16 | simple/simple_encoder.h 17 | endif 18 | 19 | if COND_DECODER_SIMPLE 20 | liblzma_la_SOURCES += \ 21 | simple/simple_decoder.c \ 22 | simple/simple_decoder.h 23 | endif 24 | 25 | if COND_FILTER_X86 26 | liblzma_la_SOURCES += simple/x86.c 27 | endif 28 | 29 | if COND_FILTER_POWERPC 30 | liblzma_la_SOURCES += simple/powerpc.c 31 | endif 32 | 33 | if COND_FILTER_IA64 34 | liblzma_la_SOURCES += simple/ia64.c 35 | endif 36 | 37 | if COND_FILTER_ARM 38 | liblzma_la_SOURCES += simple/arm.c 39 | endif 40 | 41 | if COND_FILTER_ARMTHUMB 42 | liblzma_la_SOURCES += simple/armthumb.c 43 | endif 44 | 45 | if COND_FILTER_SPARC 46 | liblzma_la_SOURCES += simple/sparc.c 47 | endif 48 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/simple/simple_decoder.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file simple_decoder.c 6 | /// \brief Properties decoder for simple filters 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "simple_decoder.h" 16 | 17 | 18 | extern lzma_ret 19 | lzma_simple_props_decode(void **options, lzma_allocator *allocator, 20 | const uint8_t *props, size_t props_size) 21 | { 22 | if (props_size == 0) 23 | return LZMA_OK; 24 | 25 | if (props_size != 4) 26 | return LZMA_OPTIONS_ERROR; 27 | 28 | lzma_options_bcj *opt = lzma_alloc( 29 | sizeof(lzma_options_bcj), allocator); 30 | if (opt == NULL) 31 | return LZMA_MEM_ERROR; 32 | 33 | opt->start_offset = integer_read_32(props); 34 | 35 | // Don't leave an options structure allocated if start_offset is zero. 36 | if (opt->start_offset == 0) 37 | lzma_free(opt, allocator); 38 | else 39 | *options = opt; 40 | 41 | return LZMA_OK; 42 | } 43 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/simple/simple_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file simple_decoder.h 6 | /// \brief Properties decoder for simple filters 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_SIMPLE_DECODER_H 16 | #define LZMA_SIMPLE_DECODER_H 17 | 18 | #include "simple_coder.h" 19 | 20 | extern lzma_ret lzma_simple_props_decode( 21 | void **options, lzma_allocator *allocator, 22 | const uint8_t *props, size_t props_size); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/simple/simple_encoder.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file simple_encoder.c 6 | /// \brief Properties encoder for simple filters 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "simple_encoder.h" 16 | 17 | 18 | extern lzma_ret 19 | lzma_simple_props_size(uint32_t *size, const void *options) 20 | { 21 | const lzma_options_bcj *const opt = options; 22 | *size = (opt == NULL || opt->start_offset == 0) ? 0 : 4; 23 | return LZMA_OK; 24 | } 25 | 26 | 27 | extern lzma_ret 28 | lzma_simple_props_encode(const void *options, uint8_t *out) 29 | { 30 | const lzma_options_bcj *const opt = options; 31 | 32 | // The default start offset is zero, so we don't need to store any 33 | // options unless the start offset is non-zero. 34 | if (opt == NULL || opt->start_offset == 0) 35 | return LZMA_OK; 36 | 37 | integer_write_32(out, opt->start_offset); 38 | 39 | return LZMA_OK; 40 | } 41 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/simple/simple_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file simple_encoder.c 6 | /// \brief Properties encoder for simple filters 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_SIMPLE_ENCODER_H 16 | #define LZMA_SIMPLE_ENCODER_H 17 | 18 | #include "simple_coder.h" 19 | 20 | 21 | extern lzma_ret lzma_simple_props_size(uint32_t *size, const void *options); 22 | 23 | extern lzma_ret lzma_simple_props_encode(const void *options, uint8_t *out); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/subblock/Makefile.inc: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | if COND_ENCODER_SUBBLOCK 9 | liblzma_la_SOURCES += \ 10 | subblock/subblock_encoder.c \ 11 | subblock/subblock_encoder.h 12 | endif 13 | 14 | if COND_DECODER_SUBBLOCK 15 | liblzma_la_SOURCES += \ 16 | subblock/subblock_decoder.c \ 17 | subblock/subblock_decoder.h \ 18 | subblock/subblock_decoder_helper.c \ 19 | subblock/subblock_decoder_helper.h 20 | endif 21 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file subblock_decoder.h 6 | /// \brief Decoder of the Subblock filter 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_SUBBLOCK_DECODER_H 16 | #define LZMA_SUBBLOCK_DECODER_H 17 | 18 | #include "common.h" 19 | 20 | 21 | extern lzma_ret lzma_subblock_decoder_init(lzma_next_coder *next, 22 | lzma_allocator *allocator, const lzma_filter_info *filters); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/subblock/subblock_decoder_helper.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file subblock_decoder_helper.h 6 | /// \brief Helper filter for the Subblock decoder 7 | /// 8 | /// This filter is used to indicate End of Input for subfilters needing it. 9 | // 10 | // Author: Lasse Collin 11 | // 12 | // This file has been put into the public domain. 13 | // You can do whatever you want with this file. 14 | // 15 | /////////////////////////////////////////////////////////////////////////////// 16 | 17 | #ifndef LZMA_SUBBLOCK_DECODER_HELPER_H 18 | #define LZMA_SUBBLOCK_DECODER_HELPER_H 19 | 20 | #include "common.h" 21 | 22 | 23 | typedef struct { 24 | bool end_was_reached; 25 | } lzma_options_subblock_helper; 26 | 27 | 28 | extern lzma_ret lzma_subblock_decoder_helper_init(lzma_next_coder *next, 29 | lzma_allocator *allocator, const lzma_filter_info *filters); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/liblzma/subblock/subblock_encoder.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file subblock_encoder.h 6 | /// \brief Encoder of the Subblock filter 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #ifndef LZMA_SUBBLOCK_ENCODER_H 16 | #define LZMA_SUBBLOCK_ENCODER_H 17 | 18 | #include "common.h" 19 | 20 | extern lzma_ret lzma_subblock_encoder_init(lzma_next_coder *next, 21 | lzma_allocator *allocator, const lzma_filter_info *filters); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/lzmainfo/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | bin_PROGRAMS = lzmainfo 9 | 10 | lzmainfo_SOURCES = lzmainfo.c 11 | 12 | lzmainfo_CPPFLAGS = \ 13 | -DLOCALEDIR=\"$(localedir)\" \ 14 | -I$(top_srcdir)/src/common \ 15 | -I$(top_srcdir)/src/liblzma/api \ 16 | -I$(top_builddir)/lib \ 17 | $(DYNAMIC_CPPFLAGS) 18 | 19 | lzmainfo_LDFLAGS = $(DYNAMIC_LDFLAGS) 20 | lzmainfo_LDADD = $(top_builddir)/src/liblzma/liblzma.la 21 | 22 | if COND_GNULIB 23 | lzmainfo_LDADD += $(top_builddir)/lib/libgnu.a 24 | endif 25 | 26 | lzmainfo_LDADD += $(LTLIBINTL) 27 | 28 | 29 | dist_man_MANS = lzmainfo.1 30 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/lzmainfo/lzmainfo.1: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Author: Lasse Collin 3 | .\" 4 | .\" This file has been put into the public domain. 5 | .\" You can do whatever you want with this file. 6 | .\" 7 | .TH LZMAINFO 1 "2009-08-13" "Tukaani" "XZ Utils" 8 | .SH NAME 9 | lzmainfo \- show infomation stored in the .lzma file header 10 | .SH SYNOPSIS 11 | .B lzmainfo 12 | .RB [ \-\-help ] 13 | .RB [ \-\-version ] 14 | .RI [ file ]... 15 | .SH DESCRIPTION 16 | .B lzmainfo 17 | shows information stored in the 18 | .B .lzma 19 | file header. It reads the first 13 bytes from the specified 20 | .IR file , 21 | decodes the header, and prints it to standard output in human 22 | readable format. If no 23 | .I files 24 | are given or 25 | .I file 26 | is 27 | .BR \- , 28 | standard input is read. 29 | .PP 30 | Usually the most interesting information is the uncompressed size and 31 | the dictionary size. Uncompressed size can be shown only if the file is 32 | in the non-streamed 33 | .B .lzma 34 | format variant. The amount of memory required to decompress the file is 35 | a few dozen kilobytes plus the dictionary size. 36 | .PP 37 | .B lzmainfo 38 | is included in XZ Utils primarily for backward compatibility with LZMA Utils. 39 | .SH EXIT STATUS 40 | .TP 41 | .B 0 42 | All is good. 43 | .TP 44 | .B 1 45 | An error occurred. 46 | .SH BUGS 47 | .B lzmainfo 48 | uses 49 | .B MB 50 | while the correct suffix would be 51 | .B MiB 52 | (2^20 bytes). 53 | This is to keep the output compatible with LZMA Utils. 54 | .SH SEE ALSO 55 | .BR xz (1) 56 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/scripts/xzmore.1: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" Original zdiff.1 for gzip: Jean-loup Gailly 3 | .\" Modifications for XZ Utils: Lasse Collin 4 | .\" 5 | .\" License: GNU GPLv2+ 6 | .\" 7 | .TH XZMORE 1 "2009-07-05" "Tukaani" "XZ Utils" 8 | .SH NAME 9 | xzmore, lzmore \- view xz or lzma compressed (text) files 10 | .SH SYNOPSIS 11 | .B xzmore 12 | .RI [ "filename ..." ] 13 | .br 14 | .B lzmore 15 | .RI [ "filename ..." ] 16 | .SH DESCRIPTION 17 | .B xzmore 18 | is a filter which allows examination of 19 | .BR xz (1) 20 | or 21 | .BR lzma (1) 22 | compressed text files one screenful at a time on a soft-copy terminal. 23 | .PP 24 | To use a pager other than the default 25 | .B more, 26 | set environment variable 27 | .B PAGER 28 | to the name of the desired program. 29 | The name 30 | .B lzmore 31 | is provided for backward compatibility with LZMA Utils. 32 | .TP 33 | .BR e " or " q 34 | When the prompt --More--(Next file: 35 | .IR file ) 36 | is printed, this command causes 37 | .B xzmore 38 | to exit. 39 | .TP 40 | .B s 41 | When the prompt --More--(Next file: 42 | .IR file ) 43 | is printed, this command causes 44 | .B xzmore 45 | to skip the next file and continue. 46 | .PP 47 | For list of keyboard commands supported while actually viewing the 48 | content of a file, refer to manual of the pager you use, usually 49 | .BR more (1). 50 | .SH "SEE ALSO" 51 | .BR more (1), 52 | .BR xz (1), 53 | .BR xzless (1), 54 | .BR zmore (1) 55 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/args.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file args.h 6 | /// \brief Argument parsing 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | typedef struct { 16 | /// Filenames from command line 17 | char **arg_names; 18 | 19 | /// Number of filenames from command line 20 | size_t arg_count; 21 | 22 | /// Name of the file from which to read filenames. This is NULL 23 | /// if --files or --files0 was not used. 24 | char *files_name; 25 | 26 | /// File opened for reading from which filenames are read. This is 27 | /// non-NULL only if files_name is non-NULL. 28 | FILE *files_file; 29 | 30 | /// Delimiter for filenames read from files_file 31 | char files_delim; 32 | 33 | } args_info; 34 | 35 | 36 | extern bool opt_stdout; 37 | extern bool opt_force; 38 | extern bool opt_keep_original; 39 | // extern bool opt_recursive; 40 | 41 | extern const char *stdin_filename; 42 | 43 | extern void args_parse(args_info *args, int argc, char **argv); 44 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/hardware.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file hardware.h 6 | /// \brief Detection of available hardware resources 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | /// Initialize some hardware-specific variables, which are needed by other 16 | /// hardware_* functions. 17 | extern void hardware_init(void); 18 | 19 | 20 | /// Set custom value for maximum number of coder threads. 21 | extern void hardware_threadlimit_set(uint32_t threadlimit); 22 | 23 | /// Get the maximum number of coder threads. Some additional helper threads 24 | /// are allowed on top of this). 25 | extern uint32_t hardware_threadlimit_get(void); 26 | 27 | 28 | /// Set custom memory usage limit. This is used for both encoding and 29 | /// decoding. Zero indicates resetting the limit back to defaults. 30 | extern void hardware_memlimit_set(uint64_t memlimit); 31 | 32 | /// Set custom memory usage limit as a percentage of installed RAM. 33 | /// The percentage must be in the range [1, 100]. 34 | extern void hardware_memlimit_set_percentage(uint32_t percentage); 35 | 36 | /// Get the current memory usage limit. 37 | extern uint64_t hardware_memlimit_get(void); 38 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/main.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file main.h 6 | /// \brief Miscellanous declarations 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | /// Possible exit status values. These are the same as used by gzip and bzip2. 16 | enum exit_status_type { 17 | E_SUCCESS = 0, 18 | E_ERROR = 1, 19 | E_WARNING = 2, 20 | }; 21 | 22 | 23 | /// Sets the exit status after a warning or error has occurred. If new_status 24 | /// is E_WARNING and the old exit status was already E_ERROR, the exit 25 | /// status is not changed. 26 | extern void set_exit_status(enum exit_status_type new_status); 27 | 28 | 29 | /// Use E_SUCCESS instead of E_WARNING if something worth a warning occurs 30 | /// but nothing worth an error has occurred. This is called when --no-warn 31 | /// is specified. 32 | extern void set_exit_no_warn(void); 33 | 34 | 35 | /// Exits the program using the given status. This takes care of closing 36 | /// stdin, stdout, and stderr and catches possible errors. If we had got 37 | /// a signal, this function will raise it so that to the parent process it 38 | /// appears that we were killed by the signal sent by the user. 39 | extern void my_exit(enum exit_status_type status) lzma_attribute((noreturn)); 40 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/options.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file options.h 6 | /// \brief Parser for filter-specific options 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | /// \brief Parser for Subblock options 16 | /// 17 | /// \return Pointer to allocated options structure. 18 | /// Doesn't return on error. 19 | extern lzma_options_subblock *options_subblock(const char *str); 20 | 21 | 22 | /// \brief Parser for Delta options 23 | /// 24 | /// \return Pointer to allocated options structure. 25 | /// Doesn't return on error. 26 | extern lzma_options_delta *options_delta(const char *str); 27 | 28 | 29 | /// \brief Parser for BCJ options 30 | /// 31 | /// \return Pointer to allocated options structure. 32 | /// Doesn't return on error. 33 | extern lzma_options_bcj *options_bcj(const char *str); 34 | 35 | 36 | /// \brief Parser for LZMA options 37 | /// 38 | /// \return Pointer to allocated options structure. 39 | /// Doesn't return on error. 40 | extern lzma_options_lzma *options_lzma(const char *str); 41 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/private.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file private.h 6 | /// \brief Common includes, definions, and prototypes 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | #include "sysdefs.h" 16 | #include "mythread.h" 17 | #include "lzma.h" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef ENABLE_NLS 28 | # include 29 | # define _(msgid) gettext(msgid) 30 | # define N_(msgid1, msgid2, n) ngettext(msgid1, msgid2, n) 31 | #else 32 | # define _(msgid) (msgid) 33 | # define N_(msgid1, msgid2, n) ((n) == 1 ? (msgid1) : (msgid2)) 34 | #endif 35 | 36 | #ifndef STDIN_FILENO 37 | # define STDIN_FILENO (fileno(stdin)) 38 | #endif 39 | 40 | #ifndef STDOUT_FILENO 41 | # define STDOUT_FILENO (fileno(stdout)) 42 | #endif 43 | 44 | #ifndef STDERR_FILENO 45 | # define STDERR_FILENO (fileno(stderr)) 46 | #endif 47 | 48 | #include "main.h" 49 | #include "coder.h" 50 | #include "message.h" 51 | #include "args.h" 52 | #include "hardware.h" 53 | #include "file_io.h" 54 | #include "options.h" 55 | #include "signals.h" 56 | #include "suffix.h" 57 | #include "util.h" 58 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/signals.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file signals.h 6 | /// \brief Handling signals to abort operation 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | /// If this is true, we will clean up the possibly incomplete output file, 16 | /// return to main() as soon as practical. That is, the code needs to poll 17 | /// this variable in various places. 18 | extern volatile sig_atomic_t user_abort; 19 | 20 | 21 | /// Initialize the signal handler, which will set user_abort to true when 22 | /// user e.g. presses C-c. 23 | extern void signals_init(void); 24 | 25 | 26 | #ifndef _WIN32 27 | 28 | /// Block the signals which don't have SA_RESTART and which would just set 29 | /// user_abort to true. This is handy when we don't want to handle EINTR 30 | /// and don't want SA_RESTART either. 31 | extern void signals_block(void); 32 | 33 | /// Unblock the signals blocked by signals_block(). 34 | extern void signals_unblock(void); 35 | 36 | /// If user has sent us a signal earlier to terminate the process, 37 | /// re-raise that signal to actually terminate the process. 38 | extern void signals_exit(void); 39 | 40 | #else 41 | 42 | #define signals_block() do { } while (0) 43 | #define signals_unblock() do { } while (0) 44 | #define signals_exit() do { } while (0) 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/suffix.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 | // vim: expandtab:ts=8:sw=4:softtabstop=4: 3 | /////////////////////////////////////////////////////////////////////////////// 4 | // 5 | /// \file suffix.h 6 | /// \brief Checks filename suffix and creates the destination filename 7 | // 8 | // Author: Lasse Collin 9 | // 10 | // This file has been put into the public domain. 11 | // You can do whatever you want with this file. 12 | // 13 | /////////////////////////////////////////////////////////////////////////////// 14 | 15 | /// \brief Get the name of the destination file 16 | /// 17 | /// Depending on the global variable opt_mode, this tries to find a matching 18 | /// counterpart for src_name. If the name can be constructed, it is allocated 19 | /// and returned (caller must free it). On error, a message is printed and 20 | /// NULL is returned. 21 | extern char *suffix_get_dest_name(const char *src_name); 22 | 23 | 24 | /// \brief Set a custom filename suffix 25 | /// 26 | /// This function calls xstrdup() for the given suffix, thus the caller 27 | /// doesn't need to keep the memory allocated. There can be only one custom 28 | /// suffix, thus if this is called multiple times, the old suffixes are freed 29 | /// and forgotten. 30 | extern void suffix_set(const char *suffix); 31 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xz/xz_w32res.rc: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Lasse Collin 3 | * 4 | * This file has been put into the public domain. 5 | * You can do whatever you want with this file. 6 | */ 7 | 8 | #define MY_TYPE VFT_APP 9 | #define MY_NAME "xz" 10 | #define MY_SUFFIX ".exe" 11 | #define MY_DESC "xz data compression tool for .xz and .lzma files" 12 | #include "common_w32res.rc" 13 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xzdec/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | # Windows resource compiler support. It's fine to use xz_CPPFLAGS 9 | # also for lzmadec. 10 | .rc.o: 11 | $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 12 | $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ 13 | 14 | 15 | bin_PROGRAMS = xzdec lzmadec 16 | 17 | xzdec_SOURCES = xzdec.c 18 | 19 | if COND_W32 20 | xzdec_SOURCES += xzdec_w32res.rc 21 | endif 22 | 23 | xzdec_CPPFLAGS = \ 24 | -I$(top_srcdir)/src/common \ 25 | -I$(top_srcdir)/src/liblzma/api \ 26 | -I$(top_builddir)/lib \ 27 | $(STATIC_CPPFLAGS) 28 | xzdec_LDFLAGS = $(STATIC_LDFLAGS) 29 | xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la 30 | 31 | if COND_GNULIB 32 | xzdec_LDADD += $(top_builddir)/lib/libgnu.a 33 | endif 34 | 35 | xzdec_LDADD += $(LTLIBINTL) 36 | 37 | 38 | lzmadec_SOURCES = xzdec.c 39 | 40 | if COND_W32 41 | lzmadec_SOURCES += lzmadec_w32res.rc 42 | endif 43 | 44 | lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC 45 | lzmadec_LDFLAGS = $(xzdec_LDFLAGS) 46 | lzmadec_LDADD = $(xzdec_LDADD) 47 | 48 | 49 | dist_man_MANS = xzdec.1 50 | 51 | install-data-hook: 52 | cd $(DESTDIR)$(mandir)/man1 && \ 53 | target=`echo xzdec | sed '$(transform)'` && \ 54 | link=`echo lzmadec | sed '$(transform)'` && \ 55 | rm -f $$link.1 && \ 56 | $(LN_S) $$target.1 $$link.1 57 | 58 | uninstall-hook: 59 | cd $(DESTDIR)$(mandir)/man1 && \ 60 | link=`echo lzmadec | sed '$(transform)'` && \ 61 | rm -f $$link.1 62 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xzdec/lzmadec_w32res.rc: -------------------------------------------------------------------------------- 1 | #define MY_TYPE VFT_APP 2 | #define MY_NAME "lzmadec" 3 | #define MY_SUFFIX ".exe" 4 | #define MY_DESC "lzmadec uncompression tool for .lzma files" 5 | #include "common_w32res.rc" 6 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/src/xzdec/xzdec_w32res.rc: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Lasse Collin 3 | * 4 | * This file has been put into the public domain. 5 | * You can do whatever you want with this file. 6 | */ 7 | 8 | #define MY_TYPE VFT_APP 9 | #define MY_NAME "xzdec" 10 | #define MY_SUFFIX ".exe" 11 | #define MY_DESC "xzdec uncompression tool for .xz files" 12 | #include "common_w32res.rc" 13 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | ## 2 | ## Author: Lasse Collin 3 | ## 4 | ## This file has been put into the public domain. 5 | ## You can do whatever you want with this file. 6 | ## 7 | 8 | EXTRA_DIST = \ 9 | files \ 10 | tests.h \ 11 | test_files.sh \ 12 | test_compress.sh \ 13 | bcj_test.c \ 14 | compress_prepared_bcj_sparc \ 15 | compress_prepared_bcj_x86 16 | 17 | AM_CPPFLAGS = \ 18 | -I$(top_srcdir)/src/common \ 19 | -I$(top_srcdir)/src/liblzma/api \ 20 | -I$(top_builddir)/lib \ 21 | $(STATIC_CPPFLAGS) 22 | 23 | AM_LDFLAGS = $(STATIC_LDFLAGS) 24 | 25 | LDADD = $(top_builddir)/src/liblzma/liblzma.la 26 | 27 | if COND_GNULIB 28 | LDADD += $(top_builddir)/lib/libgnu.a 29 | endif 30 | 31 | LDADD += $(LTLIBINTL) 32 | 33 | check_PROGRAMS = \ 34 | create_compress_files \ 35 | test_check \ 36 | test_stream_flags \ 37 | test_filter_flags \ 38 | test_block_header \ 39 | test_index 40 | 41 | TESTS = \ 42 | test_check \ 43 | test_stream_flags \ 44 | test_filter_flags \ 45 | test_block_header \ 46 | test_index \ 47 | test_files.sh \ 48 | test_compress.sh 49 | 50 | clean-local: 51 | -rm -f compress_generated_* 52 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/compress_prepared_bcj_sparc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/compress_prepared_bcj_sparc -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/compress_prepared_bcj_x86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/compress_prepared_bcj_x86 -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0-backward_size.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0-backward_size.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0-empty-truncated.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0-empty-truncated.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0-footer_magic.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0-footer_magic.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0-header_magic.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0-header_magic.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0-nonempty_index.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0-nonempty_index.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0cat-alone.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0cat-alone.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0cat-header_magic.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0cat-header_magic.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0catpad-empty.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0catpad-empty.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-0pad-empty.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-0pad-empty.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-block_header-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-block_header-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-block_header-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-block_header-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-block_header-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-block_header-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-block_header-4.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-block_header-4.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-block_header-5.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-block_header-5.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-check-crc32.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-check-crc32.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-check-crc64.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-check-crc64.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-check-sha256.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-check-sha256.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-4.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-4.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-5.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-5.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-6.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-6.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-7.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-7.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-8.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-lzma2-8.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-stream_flags-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-stream_flags-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-stream_flags-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-stream_flags-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-stream_flags-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-stream_flags-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-vli-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-vli-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-1-vli-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-1-vli-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-2-compressed_data_padding.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-2-compressed_data_padding.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-2-index-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-2-index-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-2-index-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-2-index-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-2-index-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-2-index-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-2-index-4.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-2-index-4.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/bad-2-index-5.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/bad-2-index-5.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-0-empty.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-0-empty.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-0cat-empty.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-0cat-empty.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-0catpad-empty.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-0catpad-empty.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-0pad-empty.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-0pad-empty.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-3delta-lzma2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-3delta-lzma2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-block_header-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-block_header-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-block_header-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-block_header-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-block_header-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-block_header-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-check-crc32.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-check-crc32.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-check-crc64.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-check-crc64.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-check-none.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-check-none.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-check-sha256.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-check-sha256.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-delta-lzma2.tiff.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-delta-lzma2.tiff.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-lzma2-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-lzma2-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-lzma2-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-lzma2-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-lzma2-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-lzma2-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-lzma2-4.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-lzma2-4.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-sparc-lzma2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-sparc-lzma2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-1-x86-lzma2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-1-x86-lzma2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/good-2-lzma2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/good-2-lzma2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/unsupported-block_header.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/unsupported-block_header.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/unsupported-check.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/unsupported-check.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/unsupported-filter_flags-1.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/unsupported-filter_flags-1.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/unsupported-filter_flags-2.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/unsupported-filter_flags-2.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/files/unsupported-filter_flags-3.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/PerconaFT/74d500ff12edf9cc8e6539adfa0a3f6be0707246/third_party/xz-4.999.9beta/tests/files/unsupported-filter_flags-3.xz -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/tests/test_files.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | ############################################################################### 4 | # 5 | # Author: Lasse Collin 6 | # 7 | # This file has been put into the public domain. 8 | # You can do whatever you want with this file. 9 | # 10 | ############################################################################### 11 | 12 | for I in "$srcdir"/files/good-*.xz 13 | do 14 | if ../src/xzdec/xzdec "$I" > /dev/null 2> /dev/null ; then 15 | : 16 | else 17 | echo "Good file failed: $I" 18 | (exit 1) 19 | exit 1 20 | fi 21 | done 22 | 23 | for I in "$srcdir"/files/bad-*.xz 24 | do 25 | if ../src/xzdec/xzdec "$I" > /dev/null 2> /dev/null ; then 26 | echo "Bad file succeeded: $I" 27 | (exit 1) 28 | exit 1 29 | fi 30 | done 31 | 32 | (exit 0) 33 | exit 0 34 | -------------------------------------------------------------------------------- /third_party/xz-4.999.9beta/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | ############################################################################# 4 | # 5 | # Get the version string from version.h and print it out without 6 | # trailing newline. This makes it suitable for use in configure.ac. 7 | # 8 | ############################################################################# 9 | # 10 | # Author: Lasse Collin 11 | # 12 | # This file has been put into the public domain. 13 | # You can do whatever you want with this file. 14 | # 15 | ############################################################################# 16 | 17 | sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/ 18 | s/LZMA_VERSION_STABILITY_BETA/beta/ 19 | s/LZMA_VERSION_STABILITY_STABLE// 20 | s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \ 21 | src/liblzma/api/lzma/version.h \ 22 | | tr '\n' '|' \ 23 | | sed 's/|/./; s/|/./; s/|//g' \ 24 | | tr -d '\n' 25 | -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE DONT_DEPRECATE_ERRNO) 2 | 3 | set(tools tokudb_dump tokuftdump tokuft_logprint tdb-recover ftverify) 4 | foreach(tool ${tools}) 5 | add_executable(${tool} ${tool}.cc) 6 | add_dependencies(${tool} install_tdb_h) 7 | target_link_libraries(${tool} ${LIBTOKUDB}_static ft_static z lzma snappy ${LIBTOKUPORTABILITY}_static ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS}) 8 | 9 | # detect when we are being built as a subproject 10 | if (DEFINED MYSQL_PROJECT_NAME_DOCSTRING) 11 | # if we are compiling under a MySQL variant, this macro must be present 12 | GET_MYSQL_VERSION() 13 | 14 | 15 | if ((CMAKE_BUILD_TYPE MATCHES "Debug") AND 16 | (CMAKE_CXX_FLAGS_DEBUG MATCHES " -DENABLED_DEBUG_SYNC")) 17 | if (MYSQL_BASE_VERSION VERSION_EQUAL "8.0") 18 | target_link_libraries(${tool} sql_main sql_gis sql_main sql_dd sql_gis binlog rpl master slave minchassis ${ICU_LIBRARIES}) 19 | else () 20 | target_link_libraries(${tool} sql binlog rpl master slave) 21 | endif () 22 | else () 23 | target_link_libraries(${tool} perconaserverclient) 24 | endif () 25 | endif () 26 | 27 | add_space_separated_property(TARGET ${tool} COMPILE_FLAGS -fvisibility=hidden) 28 | endforeach(tool) 29 | 30 | # link in math.h library just for this tool. 31 | target_link_libraries(ftverify m) 32 | 33 | install(TARGETS tokuftdump DESTINATION bin COMPONENT tokukv_tools) 34 | install(TARGETS tokuft_logprint DESTINATION bin COMPONENT tokukv_tools) 35 | -------------------------------------------------------------------------------- /tools/pmprof: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # a poor man's profiler 4 | # http://webcache.googleusercontent.com/search?q=cache:http://mituzas.lt/2009/02/15/poor-mans-contention-profiling/ 5 | 6 | nsamples=1 7 | sleeptime=1 8 | 9 | while [ $# -gt 0 ] ; do 10 | arg=$1; 11 | if [[ $arg =~ --(.*)=(.*) ]] ; then 12 | eval ${BASH_REMATCH[1]}=${BASH_REMATCH[2]} 13 | else 14 | break 15 | fi 16 | shift 17 | done 18 | 19 | pid=$1 20 | 21 | for x in $(seq 1 $nsamples) 22 | do 23 | gdb -ex "set pagination 0" -ex "thread apply all bt" -batch -p $pid 24 | sleep $sleeptime 25 | done | \ 26 | awk ' 27 | BEGIN { s = ""; } 28 | /^Thread/ { if (s != "") print s; s = ""; } 29 | /^\#/ { if ($3 == "in") { v = $4; } else { v = $2 } if (s != "" ) { s = s "," v} else { s = v } } 30 | END { print s }' | \ 31 | sort | uniq -c | sort -r -n -k 1,1 32 | -------------------------------------------------------------------------------- /util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(util_srcs 2 | context 3 | dbt 4 | frwlock 5 | kibbutz 6 | memarena 7 | mempool 8 | minicron 9 | partitioned_counter 10 | queue 11 | threadpool 12 | scoped_malloc 13 | x1764 14 | ) 15 | 16 | add_library(util SHARED ${util_srcs}) 17 | add_library(util_static STATIC ${util_srcs}) 18 | maybe_add_gcov_to_libraries(util util_static) 19 | set_target_properties(util_static PROPERTIES POSITION_INDEPENDENT_CODE ON) 20 | target_link_libraries(util LINK_PRIVATE ${LIBTOKUPORTABILITY}) 21 | target_link_libraries(util LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS}) 22 | add_dependencies(util install_tdb_h) 23 | add_dependencies(util_static install_tdb_h) 24 | 25 | # detect when we are being built as a subproject 26 | if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING) 27 | install( 28 | FILES partitioned_counter.h 29 | DESTINATION include 30 | COMPONENT tokukv_headers 31 | ) 32 | endif () 33 | 34 | add_subdirectory(tests) 35 | -------------------------------------------------------------------------------- /util/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(BUILD_TESTING) 2 | file(GLOB srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.cc) 3 | foreach(src ${srcs}) 4 | get_filename_component(base ${src} NAME_WE) 5 | list(APPEND tests ${base}) 6 | endforeach(src) 7 | 8 | foreach(test ${tests}) 9 | add_executable(${test} ${test}.cc) 10 | target_link_libraries(${test} util ${LIBTOKUPORTABILITY}) 11 | endforeach(test) 12 | 13 | add_helgrind_test(util helgrind_test_partitioned_counter $) 14 | add_helgrind_test(util helgrind_test_partitioned_counter_5833 $) 15 | 16 | foreach(test ${tests}) 17 | add_test(util/${test} ${test}) 18 | endforeach(test) 19 | 20 | set(long_tests 21 | util/helgrind_test_partitioned_counter 22 | ) 23 | set_tests_properties(${long_tests} PROPERTIES TIMEOUT 3600) 24 | endif(BUILD_TESTING) 25 | --------------------------------------------------------------------------------