├── .appveyor.yml ├── .editorconfig ├── .gdbinit ├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .gitlab-ci.yml ├── .gitlab.mk ├── .gitmodules ├── .travis.mk ├── .travis.yml ├── AUTHORS ├── CMakeLists.txt ├── Dockerfile.staticbuild ├── Doxyfile ├── Doxyfile.API.in ├── FreeBSD └── databases │ └── tarantool │ ├── Makefile │ ├── distinfo │ ├── files │ ├── pkg-message.in │ └── tarantool.in │ ├── pkg-descr │ └── pkg-plist ├── Jenkinsfile ├── LICENSE ├── README.FreeBSD ├── README.MacOSX ├── README.OpenBSD ├── README.md ├── TODO ├── apk ├── APKBUILD ├── tarantool.post-install └── tarantool.pre-install ├── asan ├── asan.supp └── lsan.supp ├── cmake ├── BuildAres.cmake ├── BuildDecNumber.cmake ├── BuildLibCORO.cmake ├── BuildLibCURL.cmake ├── BuildLibEIO.cmake ├── BuildLibEV.cmake ├── BuildLibYAML.cmake ├── BuildMisc.cmake ├── BuildZSTD.cmake ├── FindCURL.cmake ├── FindICONV.cmake ├── FindICU.cmake ├── FindLibEIO.cmake ├── FindLibEV.cmake ├── FindLibYAML.cmake ├── FindMsgPuck.cmake ├── FindOpenSSL.cmake ├── FindOptionalPackage.cmake ├── FindReadline.cmake ├── FindTermcap.cmake ├── FindZSTD.cmake ├── arch.cmake ├── atomic.cmake ├── compiler.cmake ├── lto.cmake ├── luajit.cmake ├── luatest.cpp ├── module.cmake ├── multilib.cmake ├── os.cmake ├── package.cmake ├── pod2man.cmake ├── profile.cmake ├── rpm.cmake ├── simd.cmake ├── systemd.cmake ├── thread.cmake └── utils.cmake ├── debian ├── changelog ├── compat ├── control ├── copyright ├── rules ├── source │ ├── format │ ├── lintian-overrides │ └── options ├── tarantool-common.dirs ├── tarantool-common.install.systemd.in ├── tarantool-common.install.sysvinit.in ├── tarantool-common.lintian-overrides ├── tarantool-common.postinst ├── tarantool-common.postrm ├── tarantool-common.tarantool.init ├── tarantool-dev.install ├── tarantool.README.Debian ├── tarantool.docs ├── tarantool.install ├── tarantool.lintian-overrides ├── tarantool.postinst ├── tarantool.prerm ├── tarantool.service └── watch ├── doc ├── CMakeLists.txt ├── README.md ├── man │ ├── CMakeLists.txt │ └── tarantool.pod └── rfc │ ├── 1148-stacked-diagnostics.md │ ├── 2592-prepared-statement.md │ ├── 3271-foreign-keys.md │ ├── 3294-topology_discovering_protocol.md │ ├── 3328-wire_protocol.md │ ├── 3328-wire_protocol_img1.svg │ ├── 4182-persistent-lua-functions.md │ ├── template.md │ ├── vclock_struct.md │ └── vylog-ups-and-downs.md ├── extra ├── CMakeLists.txt ├── addopcodes.sh ├── apigen ├── bin2c.c ├── dist │ ├── CMakeLists.txt │ ├── default │ │ └── tarantool.in │ ├── example.lua │ ├── tarantool-generator.in │ ├── tarantool.init │ ├── tarantool.logrotate.in │ ├── tarantool.service │ ├── tarantool.tmpfiles.conf.in │ ├── tarantool@.service.in │ ├── tarantoolctl.in │ └── tarantoolctl.pod ├── dmg │ ├── DESCRIPTION.rtf │ ├── LICENSE.rtf │ ├── README.rtf │ └── postflight.in ├── lemon.c ├── lempar.c ├── luarocks │ ├── CMakeLists.txt │ └── hardcoded.lua.cmake ├── mkkeywordhash.c ├── mkopcodec.sh ├── mkopcodeh.sh ├── org.tarantool.in └── txt2c.c ├── rpm └── tarantool.spec ├── rump └── Makefile ├── snapcraft.yaml ├── src ├── CMakeLists.txt ├── box │ ├── CMakeLists.txt │ ├── alter.cc │ ├── alter.h │ ├── applier.cc │ ├── applier.h │ ├── authentication.cc │ ├── authentication.h │ ├── bind.c │ ├── bind.h │ ├── blackhole.c │ ├── blackhole.h │ ├── bootstrap. │ ├── bootstrap.snap │ ├── box.cc │ ├── box.h │ ├── call.c │ ├── call.h │ ├── checkpoint_schedule.c │ ├── checkpoint_schedule.h │ ├── ck_constraint.c │ ├── ck_constraint.h │ ├── coll_id.c │ ├── coll_id.h │ ├── coll_id_cache.c │ ├── coll_id_cache.h │ ├── coll_id_def.c │ ├── coll_id_def.h │ ├── column_mask.h │ ├── constraint_id.c │ ├── constraint_id.h │ ├── engine.c │ ├── engine.h │ ├── errcode.c │ ├── errcode.h │ ├── error.cc │ ├── error.h │ ├── execute.c │ ├── execute.h │ ├── field_def.c │ ├── field_def.h │ ├── field_map.c │ ├── field_map.h │ ├── fk_constraint.c │ ├── fk_constraint.h │ ├── func.c │ ├── func.h │ ├── func_def.c │ ├── func_def.h │ ├── gc.c │ ├── gc.h │ ├── identifier.c │ ├── identifier.h │ ├── index.cc │ ├── index.h │ ├── index_def.c │ ├── index_def.h │ ├── iproto.cc │ ├── iproto.h │ ├── iproto_constants.c │ ├── iproto_constants.h │ ├── iterator_type.c │ ├── iterator_type.h │ ├── journal.c │ ├── journal.h │ ├── key_def.c │ ├── key_def.h │ ├── key_list.c │ ├── key_list.h │ ├── lua │ │ ├── call.c │ │ ├── call.h │ │ ├── cfg.cc │ │ ├── cfg.h │ │ ├── console.c │ │ ├── console.h │ │ ├── console.lua │ │ ├── ctl.c │ │ ├── ctl.h │ │ ├── error.cc │ │ ├── error.h │ │ ├── execute.c │ │ ├── execute.h │ │ ├── feedback_daemon.lua │ │ ├── index.c │ │ ├── index.h │ │ ├── info.c │ │ ├── info.h │ │ ├── init.c │ │ ├── init.h │ │ ├── key_def.c │ │ ├── key_def.h │ │ ├── key_def.lua │ │ ├── load_cfg.lua │ │ ├── merger.c │ │ ├── merger.h │ │ ├── merger.lua │ │ ├── misc.cc │ │ ├── misc.h │ │ ├── net_box.c │ │ ├── net_box.h │ │ ├── net_box.lua │ │ ├── schema.lua │ │ ├── sequence.c │ │ ├── sequence.h │ │ ├── serialize_lua.c │ │ ├── serialize_lua.h │ │ ├── serpent.lua │ │ ├── session.c │ │ ├── session.h │ │ ├── session.lua │ │ ├── slab.c │ │ ├── slab.h │ │ ├── space.cc │ │ ├── space.h │ │ ├── stat.c │ │ ├── stat.h │ │ ├── tuple.c │ │ ├── tuple.h │ │ ├── tuple.lua │ │ ├── upgrade.lua │ │ ├── xlog.c │ │ ├── xlog.h │ │ └── xlog.lua │ ├── memtx_bitset.c │ ├── memtx_bitset.h │ ├── memtx_engine.c │ ├── memtx_engine.h │ ├── memtx_hash.c │ ├── memtx_hash.h │ ├── memtx_rtree.c │ ├── memtx_rtree.h │ ├── memtx_space.c │ ├── memtx_space.h │ ├── memtx_tree.c │ ├── memtx_tree.h │ ├── merger.c │ ├── merger.h │ ├── mp_error.cc │ ├── mp_error.h │ ├── msgpack.c │ ├── msgpack.h │ ├── opt_def.c │ ├── opt_def.h │ ├── port.c │ ├── port.h │ ├── recovery.cc │ ├── recovery.h │ ├── relay.cc │ ├── relay.h │ ├── replication.cc │ ├── replication.h │ ├── request.c │ ├── request.h │ ├── schema.cc │ ├── schema.h │ ├── schema_def.c │ ├── schema_def.h │ ├── sequence.c │ ├── sequence.h │ ├── service_engine.c │ ├── service_engine.h │ ├── session.cc │ ├── session.h │ ├── session_settings.c │ ├── session_settings.h │ ├── space.c │ ├── space.h │ ├── space_def.c │ ├── space_def.h │ ├── sql.c │ ├── sql.h │ ├── sql │ │ ├── alter.c │ │ ├── analyze.c │ │ ├── build.c │ │ ├── callback.c │ │ ├── cursor.c │ │ ├── cursor.h │ │ ├── date.c │ │ ├── delete.c │ │ ├── expr.c │ │ ├── fk_constraint.c │ │ ├── func.c │ │ ├── global.c │ │ ├── hash.c │ │ ├── hash.h │ │ ├── hwtime.h │ │ ├── in-operator.md │ │ ├── insert.c │ │ ├── legacy.c │ │ ├── main.c │ │ ├── malloc.c │ │ ├── os.c │ │ ├── os.h │ │ ├── os_unix.c │ │ ├── parse.y │ │ ├── parse_def.c │ │ ├── parse_def.h │ │ ├── pragma.c │ │ ├── pragma.h │ │ ├── prepare.c │ │ ├── printf.c │ │ ├── random.c │ │ ├── resolve.c │ │ ├── select.c │ │ ├── sqlInt.h │ │ ├── sqlLimit.h │ │ ├── tarantoolInt.h │ │ ├── tokenize.c │ │ ├── treeview.c │ │ ├── trigger.c │ │ ├── update.c │ │ ├── utf.c │ │ ├── util.c │ │ ├── vdbe.c │ │ ├── vdbe.h │ │ ├── vdbeInt.h │ │ ├── vdbeapi.c │ │ ├── vdbeaux.c │ │ ├── vdbemem.c │ │ ├── vdbesort.c │ │ ├── vdbetrace.c │ │ ├── walker.c │ │ ├── where.c │ │ ├── whereInt.h │ │ ├── wherecode.c │ │ └── whereexpr.c │ ├── sql_stmt_cache.c │ ├── sql_stmt_cache.h │ ├── sysview.c │ ├── sysview.h │ ├── tuple.c │ ├── tuple.h │ ├── tuple_bloom.c │ ├── tuple_bloom.h │ ├── tuple_compare.cc │ ├── tuple_compare.h │ ├── tuple_convert.c │ ├── tuple_convert.h │ ├── tuple_dictionary.c │ ├── tuple_dictionary.h │ ├── tuple_extract_key.cc │ ├── tuple_extract_key.h │ ├── tuple_format.c │ ├── tuple_format.h │ ├── tuple_hash.cc │ ├── tuple_hash.h │ ├── txn.c │ ├── txn.h │ ├── user.cc │ ├── user.h │ ├── user_def.c │ ├── user_def.h │ ├── vclock.c │ ├── vclock.h │ ├── vinyl.c │ ├── vinyl.h │ ├── vy_cache.c │ ├── vy_cache.h │ ├── vy_entry.h │ ├── vy_history.c │ ├── vy_history.h │ ├── vy_log.c │ ├── vy_log.h │ ├── vy_lsm.c │ ├── vy_lsm.h │ ├── vy_mem.c │ ├── vy_mem.h │ ├── vy_point_lookup.c │ ├── vy_point_lookup.h │ ├── vy_quota.c │ ├── vy_quota.h │ ├── vy_range.c │ ├── vy_range.h │ ├── vy_read_iterator.c │ ├── vy_read_iterator.h │ ├── vy_read_set.c │ ├── vy_read_set.h │ ├── vy_read_view.h │ ├── vy_regulator.c │ ├── vy_regulator.h │ ├── vy_run.c │ ├── vy_run.h │ ├── vy_scheduler.c │ ├── vy_scheduler.h │ ├── vy_stat.h │ ├── vy_stmt.c │ ├── vy_stmt.h │ ├── vy_stmt_stream.h │ ├── vy_tx.c │ ├── vy_tx.h │ ├── vy_upsert.c │ ├── vy_upsert.h │ ├── vy_write_iterator.c │ ├── vy_write_iterator.h │ ├── wal.c │ ├── wal.h │ ├── xlog.c │ ├── xlog.h │ ├── xrow.c │ ├── xrow.h │ ├── xrow_io.cc │ ├── xrow_io.h │ ├── xrow_update.c │ ├── xrow_update.h │ ├── xrow_update_array.c │ ├── xrow_update_bar.c │ ├── xrow_update_field.c │ ├── xrow_update_field.h │ ├── xrow_update_map.c │ ├── xrow_update_route.c │ ├── xstream.cc │ └── xstream.h ├── cfg.c ├── cfg.h ├── cpu_feature.c ├── cpu_feature.h ├── crc32.c ├── crc32.h ├── curl.c ├── curl.h ├── exports.c ├── exports.h ├── find_path.c ├── histogram.c ├── histogram.h ├── httpc.c ├── httpc.h ├── latency.c ├── latency.h ├── lib │ ├── CMakeLists.txt │ ├── bit │ │ ├── CMakeLists.txt │ │ ├── bit.c │ │ ├── bit.h │ │ └── int96.h │ ├── bitset │ │ ├── CMakeLists.txt │ │ ├── bitset.c │ │ ├── bitset.h │ │ ├── expr.c │ │ ├── expr.h │ │ ├── index.c │ │ ├── index.h │ │ ├── iterator.c │ │ ├── iterator.h │ │ ├── page.c │ │ └── page.h │ ├── coll │ │ ├── CMakeLists.txt │ │ ├── coll.c │ │ ├── coll.h │ │ ├── coll_def.c │ │ └── coll_def.h │ ├── core │ │ ├── CMakeLists.txt │ │ ├── assoc.c │ │ ├── assoc.h │ │ ├── backtrace.cc │ │ ├── backtrace.h │ │ ├── cbus.c │ │ ├── cbus.h │ │ ├── clock.c │ │ ├── clock.h │ │ ├── coio.cc │ │ ├── coio.h │ │ ├── coio_buf.cc │ │ ├── coio_buf.h │ │ ├── coio_file.c │ │ ├── coio_file.h │ │ ├── coio_task.c │ │ ├── coio_task.h │ │ ├── decimal.c │ │ ├── decimal.h │ │ ├── diag.c │ │ ├── diag.h │ │ ├── errinj.c │ │ ├── errinj.h │ │ ├── evio.c │ │ ├── evio.h │ │ ├── exception.cc │ │ ├── exception.h │ │ ├── fiber.c │ │ ├── fiber.h │ │ ├── fiber_channel.c │ │ ├── fiber_channel.h │ │ ├── fiber_cond.c │ │ ├── fiber_cond.h │ │ ├── fiber_pool.c │ │ ├── fiber_pool.h │ │ ├── fio.c │ │ ├── fio.h │ │ ├── latch.c │ │ ├── latch.h │ │ ├── memory.c │ │ ├── memory.h │ │ ├── mp_decimal.c │ │ ├── mp_decimal.h │ │ ├── mp_extension_types.h │ │ ├── popen.c │ │ ├── popen.h │ │ ├── port.c │ │ ├── port.h │ │ ├── random.c │ │ ├── random.h │ │ ├── ratelimit.h │ │ ├── reflection.c │ │ ├── reflection.h │ │ ├── say.c │ │ ├── say.h │ │ ├── sio.c │ │ ├── sio.h │ │ ├── trigger.cc │ │ ├── trigger.h │ │ ├── tt_static.h │ │ └── util.c │ ├── crypto │ │ ├── CMakeLists.txt │ │ ├── crypto.c │ │ └── crypto.h │ ├── csv │ │ ├── CMakeLists.txt │ │ ├── csv.c │ │ └── csv.h │ ├── http_parser │ │ ├── CMakeLists.txt │ │ ├── http_parser.c │ │ └── http_parser.h │ ├── info │ │ └── info.h │ ├── json │ │ ├── CMakeLists.txt │ │ ├── json.c │ │ └── json.h │ ├── mpstream │ │ ├── CMakeLists.txt │ │ ├── mpstream.c │ │ └── mpstream.h │ ├── salad │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── bloom.c │ │ ├── bloom.h │ │ ├── bps_tree.h │ │ ├── fifo.h │ │ ├── guava.c │ │ ├── guava.h │ │ ├── heap.h │ │ ├── light.h │ │ ├── mhash.h │ │ ├── rope.c │ │ ├── rope.h │ │ ├── rtree.c │ │ ├── rtree.h │ │ └── stailq.h │ ├── swim │ │ ├── CMakeLists.txt │ │ ├── swim.c │ │ ├── swim.h │ │ ├── swim_constants.h │ │ ├── swim_ev.c │ │ ├── swim_ev.h │ │ ├── swim_io.c │ │ ├── swim_io.h │ │ ├── swim_proto.c │ │ ├── swim_proto.h │ │ ├── swim_transport.h │ │ └── swim_transport_udp.c │ ├── uri │ │ ├── CMakeLists.txt │ │ ├── uri.c │ │ ├── uri.h │ │ └── uri.rl │ └── uuid │ │ ├── CMakeLists.txt │ │ ├── mp_uuid.c │ │ ├── mp_uuid.h │ │ ├── tt_uuid.c │ │ └── tt_uuid.h ├── lua │ ├── argparse.lua │ ├── buffer.c │ ├── buffer.lua │ ├── clock.lua │ ├── crypto.lua │ ├── csv.lua │ ├── debug.lua │ ├── decimal.c │ ├── decimal.h │ ├── digest.c │ ├── digest.h │ ├── digest.lua │ ├── env.lua │ ├── errno.c │ ├── errno.h │ ├── errno.lua │ ├── error.c │ ├── error.h │ ├── error.lua │ ├── fiber.c │ ├── fiber.h │ ├── fiber.lua │ ├── fiber_channel.c │ ├── fiber_channel.h │ ├── fiber_cond.c │ ├── fiber_cond.h │ ├── fio.c │ ├── fio.h │ ├── fio.lua │ ├── help.lua │ ├── help_en_US.lua │ ├── httpc.c │ ├── httpc.h │ ├── httpc.lua │ ├── iconv.lua │ ├── info.c │ ├── info.h │ ├── init.c │ ├── init.h │ ├── init.lua │ ├── log.lua │ ├── msgpack.c │ ├── msgpack.h │ ├── msgpackffi.lua │ ├── pickle.c │ ├── pickle.h │ ├── popen.c │ ├── popen.h │ ├── pwd.lua │ ├── socket.c │ ├── socket.h │ ├── socket.lua │ ├── strict.lua │ ├── string.c │ ├── string.h │ ├── string.lua │ ├── swim.c │ ├── swim.h │ ├── swim.lua │ ├── table.lua │ ├── tap.lua │ ├── title.lua │ ├── tnt_iconv.c │ ├── trigger.c │ ├── trigger.h │ ├── trigger.lua │ ├── uri.lua │ ├── utf8.c │ ├── utf8.h │ ├── utils.c │ ├── utils.h │ └── uuid.lua ├── main.cc ├── main.h ├── module_footer.h ├── module_header.h ├── path_lock.c ├── path_lock.h ├── pickle.c ├── pickle.h ├── proc_title.c ├── proc_title.h ├── rmean.c ├── rmean.h ├── scoped_guard.h ├── scramble.c ├── scramble.h ├── serializer_opts.h ├── systemd.c ├── systemd.h ├── title.c ├── title.h ├── trivia │ ├── config.h.cmake │ └── util.h ├── tt_pthread.h ├── version.c └── version.h ├── test ├── .gitattributes ├── .tarantoolctl ├── CMakeLists.txt ├── app-tap │ ├── CMakeLists.txt │ ├── cfg.test.lua │ ├── clock.test.lua │ ├── console.skipcond │ ├── console.test.lua │ ├── console_lua.test.lua │ ├── csv.test.lua │ ├── debug.result │ ├── debug.test.lua │ ├── debug │ │ └── server.lua │ ├── errno.test.lua │ ├── fail_main.result │ ├── fail_main.skipcond │ ├── fail_main.test.lua │ ├── func.test.lua │ ├── gh-4761-json-per-call-options.test.lua │ ├── http_client.skipcond │ ├── http_client.test.lua │ ├── httpd.py │ ├── iconv.test.lua │ ├── info.test.lua │ ├── init_script.result │ ├── init_script.test.lua │ ├── inspector.result │ ├── inspector.test.lua │ ├── json.skipcond │ ├── json.test.lua │ ├── logger.test.lua │ ├── logger_pipe.result │ ├── logger_pipe.test.lua │ ├── lua │ │ ├── require_mod.lua │ │ └── serializer_test.lua │ ├── minimal.test.lua │ ├── module_api.c │ ├── module_api.test.lua │ ├── msgpack.test.lua │ ├── msgpackffi.test.lua │ ├── pcall.result │ ├── pcall.test.lua │ ├── popen.skipcond │ ├── popen.test.lua │ ├── pwd.test.lua │ ├── snapshot.test.lua │ ├── string.test.lua │ ├── suite.ini │ ├── table.test.lua │ ├── tap.result │ ├── tap.test.lua │ ├── tarantoolctl.test.lua │ ├── trigger.test.lua │ ├── uri.test.lua │ └── yaml.test.lua ├── app │ ├── CMakeLists.txt │ ├── app.lua │ ├── argparse.result │ ├── argparse.test.lua │ ├── buffer.result │ ├── buffer.test.lua │ ├── cmdline.result │ ├── cmdline.skipcond │ ├── cmdline.test.lua │ ├── crypto.result │ ├── crypto.skipcond │ ├── crypto.test.lua │ ├── crypto_hmac.result │ ├── crypto_hmac.test.lua │ ├── decimal.result │ ├── decimal.test.lua │ ├── digest.result │ ├── digest.skipcond │ ├── digest.test.lua │ ├── env.result │ ├── env.test.lua │ ├── fiber.result │ ├── fiber.skipcond │ ├── fiber.test.lua │ ├── fiber_channel.result │ ├── fiber_channel.skipcond │ ├── fiber_channel.test.lua │ ├── fiber_cond.result │ ├── fiber_cond.test.lua │ ├── fio.result │ ├── fio.test.lua │ ├── gh-4076-argparse-wrong-bool-handling.result │ ├── gh-4076-argparse-wrong-bool-handling.test.lua │ ├── gh-4662-fiber-storage-leak.result │ ├── gh-4662-fiber-storage-leak.test.lua │ ├── gh-4727-fio-gc.result │ ├── gh-4727-fio-gc.test.lua │ ├── gh-4775-crash-args-l-e.result │ ├── gh-4775-crash-args-l-e.test.lua │ ├── loaders.lua │ ├── loaders.result │ ├── loaders.test.lua │ ├── loaderslib.c │ ├── lua │ │ └── fiber.lua │ ├── luafun.result │ ├── luafun.test.lua │ ├── msgpack.result │ ├── msgpack.test.lua │ ├── pack.result │ ├── pack.test.lua │ ├── socket.result │ ├── socket.skipcond │ ├── socket.test.lua │ ├── strict.result │ ├── strict.test.lua │ ├── suite.ini │ ├── uuid.result │ ├── uuid.skipcond │ └── uuid.test.lua ├── box-py │ ├── args.lua │ ├── args.result │ ├── args.test.py │ ├── bad_trigger.result │ ├── bad_trigger.test.py │ ├── bootstrap.result │ ├── bootstrap.test.py │ ├── box.lua │ ├── call.result │ ├── call.test.py │ ├── iproto.result │ ├── iproto.test.py │ ├── print.result │ ├── print.test.py │ ├── snapshot.result │ ├── snapshot.test.py │ └── suite.ini ├── box-tap │ ├── auth.test.lua │ ├── cfg.skipcond │ ├── cfg.test.lua │ ├── cfgup.test.lua │ ├── extended_error.test.lua │ ├── feedback_daemon.skipcond │ ├── feedback_daemon.test.lua │ ├── gc.test.lua │ ├── gh-4231-box-cfg-idempotence.test.lua │ ├── gh-4231-box-execute-idempotence.test.lua │ ├── gh-4231-box-execute-locking.test.lua │ ├── gh-4785-syslog.test.lua │ ├── key_def.test.lua │ ├── merger.test.lua │ ├── net.box.test.lua │ ├── on_schema_init.test.lua │ ├── schema_mt.test.lua │ ├── session.storage.test.lua │ ├── session.test.lua │ ├── suite.cfg │ ├── suite.ini │ ├── trigger_atexit.result │ ├── trigger_atexit.test.lua │ ├── trigger_yield.result │ └── trigger_yield.test.lua ├── box │ ├── CMakeLists.txt │ ├── access.result │ ├── access.test.lua │ ├── access_bin.result │ ├── access_bin.test.lua │ ├── access_escalation.result │ ├── access_escalation.test.lua │ ├── access_misc.result │ ├── access_misc.test.lua │ ├── access_sysview.result │ ├── access_sysview.test.lua │ ├── admin.result │ ├── admin.test.lua │ ├── alter.result │ ├── alter.test.lua │ ├── alter_limits.result │ ├── alter_limits.test.lua │ ├── backup.result │ ├── backup.test.lua │ ├── backup_test.lua │ ├── before_replace.result │ ├── before_replace.test.lua │ ├── bitset.result │ ├── bitset.test.lua │ ├── blackhole.result │ ├── blackhole.test.lua │ ├── box.lua │ ├── call.result │ ├── call.test.lua │ ├── cfg.result │ ├── cfg.skipcond │ ├── cfg.test.lua │ ├── crossjoin.result │ ├── ddl_alter.result │ ├── ddl_alter.test.lua │ ├── ddl_call_twice_gh-2336.result │ ├── ddl_call_twice_gh-2336.test.lua │ ├── ddl_collation.result │ ├── ddl_collation.test.lua │ ├── ddl_collation_deleted_gh-3290.result │ ├── ddl_collation_deleted_gh-3290.test.lua │ ├── ddl_collation_field_def_gh-2937.result │ ├── ddl_collation_field_def_gh-2937.test.lua │ ├── ddl_collation_types.result │ ├── ddl_collation_types.test.lua │ ├── ddl_collation_wrong_id.result │ ├── ddl_collation_wrong_id.test.lua │ ├── ddl_custom_fields_gh-2839.result │ ├── ddl_custom_fields_gh-2839.test.lua │ ├── ddl_lock_gh-2783.result │ ├── ddl_lock_gh-2783.test.lua │ ├── ddl_no_collation.result │ ├── ddl_no_collation.test.lua │ ├── ddl_parallel.result │ ├── ddl_parallel.test.lua │ ├── ddl_truncate-gh-928.result │ ├── ddl_truncate-gh-928.test.lua │ ├── ddl_tuple.result │ ├── ddl_tuple.test.lua │ ├── engine.cfg │ ├── errinj.result │ ├── errinj.test.lua │ ├── errinj_index.result │ ├── errinj_index.test.lua │ ├── error.result │ ├── error.test.lua │ ├── func_reload.result │ ├── func_reload.test.lua │ ├── function1.c │ ├── function1.result │ ├── function1.test.lua │ ├── gh-2763-session-credentials-update.result │ ├── gh-2763-session-credentials-update.test.lua │ ├── gh-2971-symbol-visibility.result │ ├── gh-2971-symbol-visibility.test.lua │ ├── gh-4513-netbox-self-and-connect-interchangeable.result │ ├── gh-4513-netbox-self-and-connect-interchangeable.test.lua │ ├── gh-4593-netbox-on_connect-disconnect.result │ ├── gh-4593-netbox-on_connect-disconnect.test.lua │ ├── gh-4627-session-use-after-free.result │ ├── gh-4627-session-use-after-free.test.lua │ ├── gh-4648-func-load-unload.result │ ├── gh-4648-func-load-unload.test.lua │ ├── gh-4672-min-integer-value-in-serializer.result │ ├── gh-4672-min-integer-value-in-serializer.test.lua │ ├── gh-4703-on_shutdown-bug.result │ ├── gh-4703-on_shutdown-bug.test.lua │ ├── gh-4769-unprepare-response-body.result │ ├── gh-4769-unprepare-response-body.test.lua │ ├── gh-4770-broken-pairs-for-space-objects.result │ ├── gh-4770-broken-pairs-for-space-objects.test.lua │ ├── hash_32bit_delete.result │ ├── hash_32bit_delete.test.lua │ ├── hash_32bit_insert.result │ ├── hash_32bit_insert.test.lua │ ├── hash_32bit_replace.result │ ├── hash_32bit_replace.test.lua │ ├── hash_32bit_select.result │ ├── hash_32bit_select.test.lua │ ├── hash_64bit_delete.result │ ├── hash_64bit_delete.test.lua │ ├── hash_64bit_insert.result │ ├── hash_64bit_insert.test.lua │ ├── hash_64bit_replace.result │ ├── hash_64bit_replace.test.lua │ ├── hash_64bit_select.result │ ├── hash_64bit_select.test.lua │ ├── hash_collation.result │ ├── hash_collation.test.lua │ ├── hash_gh-1467.result │ ├── hash_gh-1467.test.lua │ ├── hash_gh-3907.result │ ├── hash_gh-3907.test.lua │ ├── hash_gh-616.result │ ├── hash_gh-616.test.lua │ ├── hash_iterate.result │ ├── hash_iterate.test.lua │ ├── hash_multipart.result │ ├── hash_multipart.test.lua │ ├── hash_not_a_multikey.result │ ├── hash_not_a_multikey.test.lua │ ├── hash_replace.result │ ├── hash_replace.test.lua │ ├── hash_string_delete.result │ ├── hash_string_delete.test.lua │ ├── hash_string_insert.result │ ├── hash_string_insert.test.lua │ ├── hash_string_replace.result │ ├── hash_string_replace.test.lua │ ├── hash_string_select.result │ ├── hash_string_select.test.lua │ ├── hash_with_function.result │ ├── hash_with_function.test.lua │ ├── indices_any_type.result │ ├── indices_any_type.test.lua │ ├── info.result │ ├── info.test.lua │ ├── iproto.result │ ├── iproto.test.lua │ ├── iproto_stress.result │ ├── iproto_stress.test.lua │ ├── iterator.result │ ├── iterator.test.lua │ ├── leak.result │ ├── leak.test.lua │ ├── lua.result │ ├── lua.test.lua │ ├── lua │ │ ├── bitset.lua │ │ ├── cfg_bad_vinyl_dir.lua │ │ ├── cfg_memory.lua │ │ ├── cfg_rtree.lua │ │ ├── cfg_test1.lua │ │ ├── cfg_test2.lua │ │ ├── cfg_test3.lua │ │ ├── cfg_test4.lua │ │ ├── cfg_test5.lua │ │ ├── cfg_test6.lua │ │ ├── fifo.lua │ │ ├── identifier.lua │ │ ├── index_random_test.lua │ │ ├── push.lua │ │ ├── require_init.lua │ │ ├── require_mod.lua │ │ ├── test_init.lua │ │ └── utils.lua │ ├── misc.result │ ├── misc.test.lua │ ├── net.box_bad_argument_gh-594.result │ ├── net.box_bad_argument_gh-594.test.lua │ ├── net.box_call_blocks_gh-946.result │ ├── net.box_call_blocks_gh-946.test.lua │ ├── net.box_collectgarbage_gh-3107.result │ ├── net.box_collectgarbage_gh-3107.test.lua │ ├── net.box_connect_timeout_gh-2054.result │ ├── net.box_connect_timeout_gh-2054.test.lua │ ├── net.box_connect_triggers_gh-2858.result │ ├── net.box_connect_triggers_gh-2858.test.lua │ ├── net.box_console_connections_gh-2677.result │ ├── net.box_console_connections_gh-2677.test.lua │ ├── net.box_count_inconsistent_gh-3262.result │ ├── net.box_count_inconsistent_gh-3262.test.lua │ ├── net.box_discard_gh-3107.result │ ├── net.box_discard_gh-3107.test.lua │ ├── net.box_disconnect_gh-3859.result │ ├── net.box_disconnect_gh-3859.test.lua │ ├── net.box_fiber-async_gh-3107.result │ ├── net.box_fiber-async_gh-3107.test.lua │ ├── net.box_field_names_gh-2978.result │ ├── net.box_field_names_gh-2978.test.lua │ ├── net.box_get_connection_object.result │ ├── net.box_get_connection_object.test.lua │ ├── net.box_gibberish_gh-3900.result │ ├── net.box_gibberish_gh-3900.test.lua │ ├── net.box_huge_data_gh-983.result │ ├── net.box_huge_data_gh-983.test.lua │ ├── net.box_incompatible_index-gh-1729.result │ ├── net.box_incompatible_index-gh-1729.test.lua │ ├── net.box_incorrect_iterator_gh-841.result │ ├── net.box_incorrect_iterator_gh-841.test.lua │ ├── net.box_index_unique_flag_gh-4091.result │ ├── net.box_index_unique_flag_gh-4091.test.lua │ ├── net.box_iproto_hangs_gh-3464.result │ ├── net.box_iproto_hangs_gh-3464.test.lua │ ├── net.box_is_nullable_gh-3256.result │ ├── net.box_is_nullable_gh-3256.test.lua │ ├── net.box_leaks_gh-3629.result │ ├── net.box_leaks_gh-3629.test.lua │ ├── net.box_log_corrupted_rows_gh-4040.result │ ├── net.box_log_corrupted_rows_gh-4040.test.lua │ ├── net.box_long-poll_input_gh-3400.result │ ├── net.box_long-poll_input_gh-3400.test.lua │ ├── net.box_methods_gh-3107.result │ ├── net.box_methods_gh-3107.test.lua │ ├── net.box_msgpack_gh-2195.result │ ├── net.box_msgpack_gh-2195.test.lua │ ├── net.box_on_schema_reload-gh-1904.result │ ├── net.box_on_schema_reload-gh-1904.test.lua │ ├── net.box_password_gh-1545.result │ ├── net.box_password_gh-1545.test.lua │ ├── net.box_permissions.result │ ├── net.box_permissions.test.lua │ ├── net.box_pseudo_objects_gh-2401.result │ ├── net.box_pseudo_objects_gh-2401.test.lua │ ├── net.box_raw_response_gh-3107.result │ ├── net.box_raw_response_gh-3107.test.lua │ ├── net.box_readahead_gh-3958.result │ ├── net.box_readahead_gh-3958.test.lua │ ├── net.box_reconnect_after.result │ ├── net.box_reconnect_after.test.lua │ ├── net.box_reconnect_after_gh-3164.result │ ├── net.box_reconnect_after_gh-3164.test.lua │ ├── net.box_reload_schema_gh-636.result │ ├── net.box_reload_schema_gh-636.test.lua │ ├── net.box_remote_method_gh-544.result │ ├── net.box_remote_method_gh-544.test.lua │ ├── net.box_roll_back_gh-822.result │ ├── net.box_roll_back_gh-822.test.lua │ ├── net.box_schema_change_gh-2666.result │ ├── net.box_schema_change_gh-2666.test.lua │ ├── net.box_schema_change_gh-3107.result │ ├── net.box_schema_change_gh-3107.test.lua │ ├── net.box_session_type_gh-2642.result │ ├── net.box_session_type_gh-2642.test.lua │ ├── net.box_space_format_gh-2402.result │ ├── net.box_space_format_gh-2402.test.lua │ ├── net.box_stack_diag_gh-1148.result │ ├── net.box_stack_diag_gh-1148.test.lua │ ├── net.box_timeout-gh-3107.result │ ├── net.box_timeout-gh-3107.test.lua │ ├── net.box_timeout_gh-1533.result │ ├── net.box_timeout_gh-1533.test.lua │ ├── net.box_upsert_gh-970.result │ ├── net.box_upsert_gh-970.test.lua │ ├── net.box_uri_first_arg_gh-398.result │ ├── net.box_uri_first_arg_gh-398.test.lua │ ├── net.box_wait_connected_gh-3856.result │ ├── net.box_wait_connected_gh-3856.test.lua │ ├── net_msg_max.result │ ├── net_msg_max.skipcond │ ├── net_msg_max.test.lua │ ├── on_replace.result │ ├── on_replace.test.lua │ ├── on_schema_init.lua │ ├── on_shutdown.result │ ├── on_shutdown.skipcond │ ├── on_shutdown.test.lua │ ├── protocol.result │ ├── protocol.test.lua │ ├── proxy.lua │ ├── push.result │ ├── push.test.lua │ ├── reconfigure.result │ ├── reconfigure.test.lua │ ├── reload1.c │ ├── reload2.c │ ├── role.result │ ├── role.test.lua │ ├── rtree_array.result │ ├── rtree_array.test.lua │ ├── rtree_errinj.test.lua │ ├── rtree_misc.result │ ├── rtree_misc.test.lua │ ├── rtree_point.result │ ├── rtree_point.test.lua │ ├── rtree_point_r2.result │ ├── rtree_point_r2.test.lua │ ├── rtree_rect.result │ ├── rtree_rect.test.lua │ ├── schema_reload.result │ ├── schema_reload.skipcond │ ├── schema_reload.test.lua │ ├── select.result │ ├── select.test.lua │ ├── sequence.result │ ├── sequence.test.lua │ ├── session_settings.result │ ├── session_settings.test.lua │ ├── space_bsize.result │ ├── space_bsize.test.lua │ ├── sql-update-with-nested-select.result │ ├── sql-update-with-nested-select.test.lua │ ├── sql.result │ ├── sql.test.lua │ ├── stat.result │ ├── stat.test.lua │ ├── stat_net.result │ ├── stat_net.test.lua │ ├── suite.ini │ ├── temp_spaces.result │ ├── temp_spaces.test.lua │ ├── tiny.lua │ ├── transaction.result │ ├── transaction.test.lua │ ├── tree_pk.result │ ├── tree_pk.test.lua │ ├── tree_pk_multipart.result │ ├── tree_pk_multipart.test.lua │ ├── tuple.result │ ├── tuple.skipcond │ ├── tuple.test.lua │ ├── tuple_bench.c │ ├── tuple_bench.result │ ├── tuple_bench.test.lua │ ├── update.result │ ├── update.test.lua │ ├── upsert_errinj.result │ ├── upsert_errinj.test.lua │ ├── varbinary_type.result │ └── varbinary_type.test.lua ├── engine │ ├── box.lua │ ├── conflict.lua │ ├── conflict.result │ ├── conflict.test.lua │ ├── crossjoin.result │ ├── crossjoin.test.lua │ ├── ddl.result │ ├── ddl.test.lua │ ├── decimal.result │ ├── decimal.test.lua │ ├── delete.result │ ├── delete.test.lua │ ├── engine.cfg │ ├── errinj.result │ ├── errinj.test.lua │ ├── errinj_ddl.result │ ├── errinj_ddl.test.lua │ ├── func_index.result │ ├── func_index.test.lua │ ├── gh-4973-concurrent-alter-fails.result │ ├── gh-4973-concurrent-alter-fails.test.lua │ ├── hints.result │ ├── hints.test.lua │ ├── indices_any_type.result │ ├── indices_any_type.test.lua │ ├── insert.result │ ├── insert.test.lua │ ├── iterator.result │ ├── iterator.test.lua │ ├── json.result │ ├── json.test.lua │ ├── lua.result │ ├── lua.test.lua │ ├── misc.result │ ├── misc.test.lua │ ├── multikey.result │ ├── multikey.test.lua │ ├── null.result │ ├── null.test.lua │ ├── params.result │ ├── params.test.lua │ ├── recover_drop.result │ ├── recover_drop.test.lua │ ├── recover_snapshot.result │ ├── recover_snapshot.test.lua │ ├── recover_snapshot_wal.result │ ├── recover_snapshot_wal.test.lua │ ├── recover_wal.result │ ├── recover_wal.test.lua │ ├── replace.result │ ├── replace.test.lua │ ├── replica_join.result │ ├── replica_join.skipcond │ ├── replica_join.test.lua │ ├── savepoint.result │ ├── savepoint.test.lua │ ├── select.result │ ├── select.test.lua │ ├── snapshot.result │ ├── snapshot.test.lua │ ├── suite.ini │ ├── transaction.result │ ├── transaction.test.lua │ ├── tree.result │ ├── tree.test.lua │ ├── tree_min_max_count.result │ ├── tree_min_max_count.test.lua │ ├── tree_variants.result │ ├── tree_variants.test.lua │ ├── truncate.result │ ├── truncate.test.lua │ ├── tuple.result │ ├── tuple.test.lua │ ├── update.result │ ├── update.test.lua │ ├── upsert.result │ ├── upsert.test.lua │ ├── uuid.result │ └── uuid.test.lua ├── engine_long │ ├── box.lua │ ├── delete_insert.result │ ├── delete_insert.test.lua │ ├── delete_replace_update.result │ ├── delete_replace_update.test.lua │ ├── engine.cfg │ ├── suite.ini │ └── suite.lua ├── long_run-py │ ├── box.lua │ ├── finalizers.result │ ├── finalizers.test.py │ ├── lua │ │ └── finalizers.lua │ ├── suite.ini │ └── suite.lua ├── replication-py │ ├── cluster.result │ ├── cluster.test.py │ ├── conflict.result │ ├── conflict.test.py │ ├── failed.lua │ ├── init_storage.result │ ├── init_storage.test.py │ ├── master.lua │ ├── multi.result │ ├── multi.test.py │ ├── panic.lua │ ├── replica.lua │ ├── suite.ini │ ├── swap.result │ ├── swap.test.py │ └── uuid_mismatch.lua ├── replication │ ├── anon.lua │ ├── anon.result │ ├── anon.test.lua │ ├── anon1.lua │ ├── anon2.lua │ ├── autobootstrap.lua │ ├── autobootstrap.result │ ├── autobootstrap.test.lua │ ├── autobootstrap1.lua │ ├── autobootstrap2.lua │ ├── autobootstrap3.lua │ ├── autobootstrap_guest.lua │ ├── autobootstrap_guest.result │ ├── autobootstrap_guest.test.lua │ ├── autobootstrap_guest1.lua │ ├── autobootstrap_guest2.lua │ ├── autobootstrap_guest3.lua │ ├── before_replace.result │ ├── before_replace.test.lua │ ├── bootstrap_leader.result │ ├── bootstrap_leader.test.lua │ ├── box_set_replication_stress.result │ ├── box_set_replication_stress.test.lua │ ├── catch.result │ ├── catch.test.lua │ ├── consistent.result │ ├── consistent.test.lua │ ├── ddl.lua │ ├── ddl.result │ ├── ddl.test.lua │ ├── ddl1.lua │ ├── ddl2.lua │ ├── ddl3.lua │ ├── ddl4.lua │ ├── er_load.lua │ ├── er_load1.lua │ ├── er_load2.lua │ ├── errinj.result │ ├── errinj.test.lua │ ├── force_recovery.result │ ├── force_recovery.test.lua │ ├── gc.result │ ├── gc.test.lua │ ├── gc_no_space.result │ ├── gc_no_space.test.lua │ ├── gh-4114-local-space-replication.result │ ├── gh-4114-local-space-replication.test.lua │ ├── gh-4402-info-errno.result │ ├── gh-4402-info-errno.test.lua │ ├── gh-4605-empty-password.result │ ├── gh-4605-empty-password.test.lua │ ├── gh-4606-admin-creds.result │ ├── gh-4606-admin-creds.test.lua │ ├── gh-4729-netbox-group-id.result │ ├── gh-4729-netbox-group-id.test.lua │ ├── gh-4730-applier-rollback.result │ ├── gh-4730-applier-rollback.test.lua │ ├── gh-4739-vclock-assert.result │ ├── gh-4739-vclock-assert.test.lua │ ├── hot_standby.lua │ ├── hot_standby.result │ ├── hot_standby.test.lua │ ├── join_vclock.result │ ├── join_vclock.test.lua │ ├── join_without_snap.result │ ├── join_without_snap.test.lua │ ├── local_spaces.result │ ├── local_spaces.test.lua │ ├── long_row_timeout.result │ ├── long_row_timeout.test.lua │ ├── lua │ │ ├── fast_replica.lua │ │ └── rlimit.lua │ ├── master.lua │ ├── master1.lua │ ├── master_quorum.lua │ ├── master_quorum1.lua │ ├── master_quorum2.lua │ ├── misc.result │ ├── misc.skipcond │ ├── misc.test.lua │ ├── on_replace.lua │ ├── on_replace.result │ ├── on_replace.test.lua │ ├── on_replace1.lua │ ├── on_replace2.lua │ ├── on_schema_init.result │ ├── on_schema_init.test.lua │ ├── once.result │ ├── once.test.lua │ ├── prune.result │ ├── prune.test.lua │ ├── quorum.lua │ ├── quorum.result │ ├── quorum.test.lua │ ├── quorum1.lua │ ├── quorum2.lua │ ├── quorum3.lua │ ├── rebootstrap.lua │ ├── rebootstrap.result │ ├── rebootstrap.test.lua │ ├── rebootstrap1.lua │ ├── rebootstrap2.lua │ ├── recover_missing_xlog.result │ ├── recover_missing_xlog.test.lua │ ├── replica-applier-rollback.lua │ ├── replica.lua │ ├── replica_apply_order.result │ ├── replica_apply_order.test.lua │ ├── replica_auth.lua │ ├── replica_no_quorum.lua │ ├── replica_on_schema_init.lua │ ├── replica_quorum.lua │ ├── replica_rejoin.result │ ├── replica_rejoin.test.lua │ ├── replica_timeout.lua │ ├── replica_uuid.lua │ ├── replica_uuid_ro.lua │ ├── replica_uuid_ro1.lua │ ├── replica_uuid_ro2.lua │ ├── replica_uuid_ro3.lua │ ├── replica_uuid_rw.lua │ ├── replica_uuid_rw1.lua │ ├── replica_uuid_rw2.lua │ ├── replica_uuid_rw3.lua │ ├── replicaset_ro_mostly.result │ ├── replicaset_ro_mostly.test.lua │ ├── show_error_on_disconnect.result │ ├── show_error_on_disconnect.test.lua │ ├── skip_conflict_row.result │ ├── skip_conflict_row.skipcond │ ├── skip_conflict_row.test.lua │ ├── status.result │ ├── status.test.lua │ ├── suite.cfg │ ├── suite.ini │ ├── sync.result │ ├── sync.skipcond │ ├── sync.test.lua │ ├── transaction.result │ ├── transaction.test.lua │ ├── wal_off.lua │ ├── wal_off.result │ ├── wal_off.test.lua │ ├── wal_rw_stress.result │ └── wal_rw_stress.test.lua ├── share │ └── tarantool.sup ├── sql-tap │ ├── aggnested.test.lua │ ├── alias.test.lua │ ├── alter.test.lua │ ├── alter2.test.lua │ ├── analyze1.test.lua │ ├── analyze3.test.lua │ ├── analyze4.test.lua │ ├── analyze5.test.lua │ ├── analyze6.test.lua │ ├── analyze7.test.lua │ ├── analyze8.test.lua │ ├── analyze9.test.lua │ ├── analyzeC.test.lua │ ├── analyzeD.test.lua │ ├── analyzeE.test.lua │ ├── analyzeF.test.lua │ ├── atof1.test.lua │ ├── autoinc.test.lua │ ├── autoindex4.test.lua │ ├── autoindex5.test.lua │ ├── badutf1.test.lua │ ├── between.test.lua │ ├── bigrow1.test.lua │ ├── blob.test.lua │ ├── boundary1.test.lua │ ├── boundary2.test.lua │ ├── boundary3.test.lua │ ├── cast.test.lua │ ├── check.test.lua │ ├── coalesce.test.lua │ ├── collation.test.lua │ ├── collation_unicode.test.lua │ ├── colname.test.lua │ ├── contrib01.test.lua │ ├── count.test.lua │ ├── cse.test.lua │ ├── date.test.lua │ ├── debug_mode_only.test.lua │ ├── default.test.lua │ ├── delete1.test.lua │ ├── delete3.test.lua │ ├── delete4.test.lua │ ├── distinct.test.lua │ ├── distinctagg.test.lua │ ├── drop_all.test.lua │ ├── e_delete.test.lua │ ├── e_expr.test.lua │ ├── e_select1.test.lua │ ├── engine.cfg │ ├── eqp.test.lua │ ├── explain.test.lua │ ├── fkey1.test.lua │ ├── fkey2.test.lua │ ├── fkey3.test.lua │ ├── fkey4.test.lua │ ├── func.test.lua │ ├── func2.test.lua │ ├── func3.test.lua │ ├── func5.test.lua │ ├── gh-2360-omit-truncate-in-transaction.test.lua │ ├── gh-2549-many-columns.test.lua │ ├── gh-2723-concurrency.test.lua │ ├── gh-2884-forbid-rowid-syntax.test.lua │ ├── gh-2931-savepoints.test.lua │ ├── gh-2996-indexed-by.test.lua │ ├── gh-3083-ephemeral-unref-tuples.test.lua │ ├── gh-3251-string-pattern-comparison.test.lua │ ├── gh-3297-ephemeral-rowid.test.lua │ ├── gh-3307-xfer-optimization-issue.test.lua │ ├── gh-3332-tuple-format-leak.test.lua │ ├── gh-3350-skip-scan.test.lua │ ├── gh-4077-iproto-execute-no-bind.test.lua │ ├── gh-4659-block-hash-index.test.lua │ ├── gh-4766-wrong-cast-from-blob-to-int.test.lua │ ├── gh2127-indentifier-max-length.test.lua │ ├── gh2130-index-refer-table.test.lua │ ├── gh2140-trans.test.lua │ ├── gh2168-temp-tables.test.lua │ ├── gh2250-trigger-chain-limit.test.lua │ ├── gh2259-in-stmt-trans.test.lua │ ├── gh2548-select-compound-limit.test.lua │ ├── gh2964-abort.test.lua │ ├── hexlit.test.lua │ ├── icu.test.lua │ ├── identifier-characters.test.lua │ ├── identifier_case.test.lua │ ├── in1.test.lua │ ├── in2.test.lua │ ├── in3.test.lua │ ├── in4.test.lua │ ├── in5.test.lua │ ├── index-info.test.lua │ ├── index1.test.lua │ ├── index2.test.lua │ ├── index3.test.lua │ ├── index4.test.lua │ ├── index6.test.lua │ ├── index7.test.lua │ ├── insert1.test.lua │ ├── insert3.test.lua │ ├── intpkey.test.lua │ ├── join.test.lua │ ├── join2.test.lua │ ├── join3.test.lua │ ├── join4.test.lua │ ├── join5.test.lua │ ├── join6.test.lua │ ├── keyword1.test.lua │ ├── like2.test.lua │ ├── like3.test.lua │ ├── limit.test.lua │ ├── lua-tables.test.lua │ ├── lua │ │ └── sqltester.lua │ ├── lua_sql.test.lua │ ├── minmax2.test.lua │ ├── minmax3.test.lua │ ├── minmax4.test.lua │ ├── misc1.test.lua │ ├── misc3.test.lua │ ├── misc5.test.lua │ ├── null.test.lua │ ├── numcast.test.lua │ ├── offset1.test.lua │ ├── orderby1.test.lua │ ├── orderby2.test.lua │ ├── orderby3.test.lua │ ├── orderby4.test.lua │ ├── orderby5.test.lua │ ├── orderby6.test.lua │ ├── orderby8.test.lua │ ├── orderby9.test.lua │ ├── position.test.lua │ ├── pragma.test.lua │ ├── printf2.test.lua │ ├── quote.test.lua │ ├── randexpr1.test.lua │ ├── resolver01.test.lua │ ├── select1.test.lua │ ├── select2.test.lua │ ├── select3.test.lua │ ├── select4.test.lua │ ├── select5.test.lua │ ├── select6.test.lua │ ├── select7.test.lua │ ├── select8.test.lua │ ├── select9.test.lua │ ├── selectA.test.lua │ ├── selectB.test.lua │ ├── selectC.test.lua │ ├── selectE.test.lua │ ├── selectF.test.lua │ ├── selectG.test.lua │ ├── sort.test.lua │ ├── sql-errors.test.lua │ ├── start-transaction.test.lua │ ├── subquery.test.lua │ ├── subquery2.test.lua │ ├── subselect.test.lua │ ├── substr.test.lua │ ├── suite.ini │ ├── table.test.lua │ ├── tkt-02a8e81d44.test.lua │ ├── tkt-31338dca7e.test.lua │ ├── tkt-385a5b56b9.test.lua │ ├── tkt-38cb5df375.test.lua │ ├── tkt-3998683a16.test.lua │ ├── tkt-3a77c9714e.test.lua │ ├── tkt-4a03edc4c8.test.lua │ ├── tkt-4c86b126f2.test.lua │ ├── tkt-4dd95f6943.test.lua │ ├── tkt-4ef7e3cfca.test.lua │ ├── tkt-54844eea3f.test.lua │ ├── tkt-752e1646fc.test.lua │ ├── tkt-7a31705a7e6.test.lua │ ├── tkt-7bbfb7d442.test.lua │ ├── tkt-80ba201079.test.lua │ ├── tkt-80e031a00f.test.lua │ ├── tkt-868145d012.test.lua │ ├── tkt-8c63ff0ec.test.lua │ ├── tkt-91e2e8ba6f.test.lua │ ├── tkt-9a8b09f8e6.test.lua │ ├── tkt-a7b7803e.test.lua │ ├── tkt-a8a0d2996a.test.lua │ ├── tkt-b1d3a2e531.test.lua │ ├── tkt-b351d95f9.test.lua │ ├── tkt-b75a9ca6b0.test.lua │ ├── tkt-ba7cbfaedc.test.lua │ ├── tkt-bd484a090c.test.lua │ ├── tkt-d635236375.test.lua │ ├── tkt-f973c7ac31.test.lua │ ├── tkt-fa7bf5ec.test.lua │ ├── tkt-fc7bd6358f.test.lua │ ├── tkt1443.test.lua │ ├── tkt1444.test.lua │ ├── tkt1449.test.lua │ ├── tkt1473.test.lua │ ├── tkt1501.test.lua │ ├── tkt1514.test.lua │ ├── tkt1537.test.lua │ ├── tkt2141.test.lua │ ├── tkt2192.test.lua │ ├── tkt2339.test.lua │ ├── tkt2391.test.lua │ ├── tkt2640.test.lua │ ├── tkt2767.test.lua │ ├── tkt2822.test.lua │ ├── tkt2832.test.lua │ ├── tkt2927.test.lua │ ├── tkt2942.test.lua │ ├── tkt3201.test.lua │ ├── tkt3298.test.lua │ ├── tkt3334.test.lua │ ├── tkt3346.test.lua │ ├── tkt3357.test.lua │ ├── tkt3419.test.lua │ ├── tkt3424.test.lua │ ├── tkt3442.test.lua │ ├── tkt3493.test.lua │ ├── tkt3508.test.lua │ ├── tkt3522.test.lua │ ├── tkt3527.test.lua │ ├── tkt3541.test.lua │ ├── tkt3554.test.lua │ ├── tkt3581.test.lua │ ├── tkt3731.test.lua │ ├── tkt3773.test.lua │ ├── tkt3791.test.lua │ ├── tkt3841.test.lua │ ├── tkt3879.test.lua │ ├── tkt3911.test.lua │ ├── tkt3935.test.lua │ ├── tokenize.test.lua │ ├── transitive1.test.lua │ ├── trigger1.test.lua │ ├── trigger2.test.lua │ ├── trigger4.test.lua │ ├── trigger5.test.lua │ ├── trigger7.test.lua │ ├── trigger8.test.lua │ ├── trigger9.test.lua │ ├── triggerA.test.lua │ ├── triggerB.test.lua │ ├── triggerC.test.lua │ ├── triggerD.test.lua │ ├── types.test.lua │ ├── types2.test.lua │ ├── unicode.test.lua │ ├── unique.test.lua │ ├── update.test.lua │ ├── view.test.lua │ ├── where2.test.lua │ ├── where3.test.lua │ ├── where4.test.lua │ ├── where5.test.lua │ ├── where6.test.lua │ ├── where7.test.lua │ ├── whereA.test.lua │ ├── whereB.test.lua │ ├── whereC.test.lua │ ├── whereD.test.lua │ ├── whereF.test.lua │ ├── whereG.test.lua │ ├── whereI.test.lua │ ├── whereK.test.lua │ ├── with1.test.lua │ └── with2.test.lua ├── sql │ ├── app.lua │ ├── autoincrement.result │ ├── autoincrement.test.lua │ ├── bind.result │ ├── bind.test.lua │ ├── boolean.result │ ├── boolean.test.sql │ ├── check-clear-ephemeral.result │ ├── check-clear-ephemeral.test.lua │ ├── checks.result │ ├── checks.test.lua │ ├── clear.result │ ├── clear.test.lua │ ├── collation.result │ ├── collation.test.lua │ ├── constraint.result │ ├── constraint.test.lua │ ├── ddl.result │ ├── ddl.test.lua │ ├── delete-multiple-idx.result │ ├── delete-multiple-idx.test.lua │ ├── delete.result │ ├── delete.test.lua │ ├── drop-index.result │ ├── drop-index.test.lua │ ├── drop-table.result │ ├── drop-table.test.lua │ ├── engine.cfg │ ├── engine.result │ ├── engine.test.lua │ ├── errinj.result │ ├── errinj.test.lua │ ├── foreign-keys.result │ ├── foreign-keys.test.lua │ ├── full_metadata.result │ ├── full_metadata.test.lua │ ├── func-recreate.result │ ├── func-recreate.test.lua │ ├── gh-2362-select-access-rights.result │ ├── gh-2362-select-access-rights.test.lua │ ├── gh-2929-primary-key.result │ ├── gh-2929-primary-key.test.lua │ ├── gh-2981-check-autoinc.result │ ├── gh-2981-check-autoinc.test.lua │ ├── gh-3199-no-mem-leaks.result │ ├── gh-3199-no-mem-leaks.test.lua │ ├── gh-3613-idx-alter-update-2.result │ ├── gh-3613-idx-alter-update-2.test.lua │ ├── gh-3613-idx-alter-update.result │ ├── gh-3613-idx-alter-update.test.lua │ ├── gh-3888-values-blob-assert.result │ ├── gh-3888-values-blob-assert.test.lua │ ├── gh-4104-view-access-check.result │ ├── gh-4104-view-access-check.test.lua │ ├── gh-4111-format-in-sysview.result │ ├── gh-4111-format-in-sysview.test.lua │ ├── gh-4256-do-not-change-order-during-insertion.result │ ├── gh-4256-do-not-change-order-during-insertion.test.sql │ ├── gh-4546-sql-drop-grants.result │ ├── gh-4546-sql-drop-grants.test.lua │ ├── gh-4697-scalar-bool-sort-cmp.result │ ├── gh-4697-scalar-bool-sort-cmp.test.sql │ ├── gh-4745-table-info-assertion.result │ ├── gh-4745-table-info-assertion.test.lua │ ├── gh-4755-scalar-collation-metadata.result │ ├── gh-4755-scalar-collation-metadata.test.lua │ ├── gh2141-delete-trigger-drop-table.result │ ├── gh2141-delete-trigger-drop-table.test.lua │ ├── gh2251-multiple-update.result │ ├── gh2251-multiple-update.test.lua │ ├── gh2483-remote-persistency-check.result │ ├── gh2483-remote-persistency-check.test.lua │ ├── gh2808-inline-unique-persistency-check.result │ ├── gh2808-inline-unique-persistency-check.test.lua │ ├── icu-upper-lower.result │ ├── icu-upper-lower.test.lua │ ├── insert-unique.result │ ├── insert-unique.test.lua │ ├── integer-overflow.result │ ├── integer-overflow.test.lua │ ├── iproto.result │ ├── iproto.test.lua │ ├── lua │ │ └── sql_tokenizer.lua │ ├── max-on-index.result │ ├── max-on-index.test.lua │ ├── message-func-indexes.result │ ├── message-func-indexes.test.lua │ ├── misc.result │ ├── misc.test.lua │ ├── no-pk-space.result │ ├── no-pk-space.test.lua │ ├── on-conflict.result │ ├── on-conflict.test.lua │ ├── persistency.result │ ├── persistency.test.lua │ ├── prepared.result │ ├── prepared.test.lua │ ├── row-count.result │ ├── row-count.test.lua │ ├── savepoints.result │ ├── savepoints.test.lua │ ├── select-null.result │ ├── select-null.test.lua │ ├── sql-statN-index-drop.result │ ├── sql-statN-index-drop.test.lua │ ├── suite.ini │ ├── tokenizer.result │ ├── tokenizer.test.lua │ ├── transition.result │ ├── transition.test.lua │ ├── transitive-transactions.result │ ├── transitive-transactions.test.lua │ ├── triggers.result │ ├── triggers.test.lua │ ├── types.result │ ├── types.test.lua │ ├── update-with-nested-select.result │ ├── update-with-nested-select.test.lua │ ├── upgrade.result │ ├── upgrade.test.lua │ ├── upgrade │ │ ├── 1.10 │ │ │ └── 00000000000000000003.snap │ │ ├── 2.1.0 │ │ │ └── 00000000000000000003.snap │ │ └── upgrade.lua │ ├── view.result │ ├── view.test.lua │ ├── view_delayed_wal.result │ ├── view_delayed_wal.test.lua │ ├── vinyl-opts-cfg.lua │ ├── vinyl-opts.result │ └── vinyl-opts.test.lua ├── swim │ ├── box.lua │ ├── errinj.result │ ├── errinj.test.lua │ ├── suite.ini │ ├── swim.result │ └── swim.test.lua ├── test-run.py ├── unit │ ├── CMakeLists.txt │ ├── base64.c │ ├── base64.result │ ├── bit.c │ ├── bit.result │ ├── bitset_basic.c │ ├── bitset_basic.result │ ├── bitset_index.c │ ├── bitset_index.result │ ├── bitset_iterator.c │ ├── bitset_iterator.result │ ├── bloom.cc │ ├── bloom.result │ ├── bps_tree.cc │ ├── bps_tree.result │ ├── bps_tree_iterator.cc │ ├── bps_tree_iterator.result │ ├── cbus.c │ ├── cbus.result │ ├── cbus_hang.c │ ├── cbus_hang.result │ ├── cbus_stress.c │ ├── cbus_stress.result │ ├── checkpoint_schedule.c │ ├── checkpoint_schedule.result │ ├── coio.cc │ ├── coio.result │ ├── coll.cpp │ ├── coll.result │ ├── column_mask.c │ ├── column_mask.result │ ├── crc32.c │ ├── crc32.result │ ├── crypto.c │ ├── crypto.result │ ├── csv.c │ ├── csv.result │ ├── decimal.c │ ├── decimal.result │ ├── fiber.cc │ ├── fiber.result │ ├── fiber_channel.cc │ ├── fiber_channel.result │ ├── fiber_channel_stress.cc │ ├── fiber_channel_stress.result │ ├── fiber_cond.c │ ├── fiber_cond.result │ ├── fiber_stack.c │ ├── fiber_stack.result │ ├── fiber_stress.cc │ ├── fiber_stress.result │ ├── find_path.c │ ├── find_path.result │ ├── guard.cc │ ├── guard.result │ ├── guard.skipcond │ ├── guava.c │ ├── guava.result │ ├── heap.c │ ├── heap.result │ ├── heap_iterator.c │ ├── heap_iterator.result │ ├── histogram.c │ ├── histogram.result │ ├── int96.cc │ ├── int96.result │ ├── json.c │ ├── json.result │ ├── light.cc │ ├── light.result │ ├── luaL_iterator.c │ ├── luaL_iterator.result │ ├── luaT_tuple_new.c │ ├── luaT_tuple_new.result │ ├── merger.result │ ├── merger.test.c │ ├── mhash.c │ ├── mhash.result │ ├── mhash_body.c │ ├── mhash_bytemap.c │ ├── mhash_bytemap.result │ ├── mp_error.cc │ ├── mp_error.result │ ├── msgpack.result │ ├── msgpack.skipcond │ ├── popen-child.c │ ├── popen.c │ ├── popen.result │ ├── queue.c │ ├── queue.result │ ├── ratelimit.c │ ├── ratelimit.result │ ├── reflection_c.c │ ├── reflection_c.result │ ├── reflection_cxx.cc │ ├── reflection_cxx.result │ ├── rmean.cc │ ├── rmean.result │ ├── rope.c │ ├── rope.result │ ├── rope_avl.c │ ├── rope_avl.result │ ├── rope_basic.c │ ├── rope_basic.result │ ├── rope_common.h │ ├── rope_stress.c │ ├── rope_stress.result │ ├── rtree.cc │ ├── rtree.result │ ├── rtree_iterator.cc │ ├── rtree_iterator.result │ ├── rtree_multidim.cc │ ├── rtree_multidim.result │ ├── say.c │ ├── say.result │ ├── scramble.c │ ├── scramble.result │ ├── sio.c │ ├── sio.result │ ├── sql-bitvec.result │ ├── stailq.c │ ├── stailq.result │ ├── suite.ini │ ├── swim.c │ ├── swim.result │ ├── swim_errinj.c │ ├── swim_errinj.result │ ├── swim_proto.c │ ├── swim_proto.result │ ├── swim_test_ev.c │ ├── swim_test_ev.h │ ├── swim_test_transport.c │ ├── swim_test_transport.h │ ├── swim_test_utils.c │ ├── swim_test_utils.h │ ├── tuple_bigref.c │ ├── tuple_bigref.result │ ├── unit.c │ ├── unit.h │ ├── uri.c │ ├── uri.result │ ├── uuid.c │ ├── uuid.result │ ├── vclock.cc │ ├── vclock.result │ ├── vy_cache.c │ ├── vy_cache.result │ ├── vy_iterators_helper.c │ ├── vy_iterators_helper.h │ ├── vy_log_stub.c │ ├── vy_mem.c │ ├── vy_mem.result │ ├── vy_point_lookup.c │ ├── vy_point_lookup.result │ ├── vy_write_iterator.c │ ├── vy_write_iterator.result │ ├── xrow.cc │ └── xrow.result ├── vinyl │ ├── bad_run_indexes.lua │ ├── bloom.result │ ├── bloom.test.lua │ ├── cache.result │ ├── cache.test.lua │ ├── compact.result │ ├── compact.test.lua │ ├── constraint.result │ ├── constraint.test.lua │ ├── ddl.result │ ├── ddl.test.lua │ ├── deferred_delete.result │ ├── deferred_delete.test.lua │ ├── dump_stress.result │ ├── dump_stress.test.lua │ ├── errinj.result │ ├── errinj.test.lua │ ├── errinj_ddl.result │ ├── errinj_ddl.test.lua │ ├── errinj_gc.result │ ├── errinj_gc.test.lua │ ├── errinj_recovery.lua │ ├── errinj_stat.result │ ├── errinj_stat.test.lua │ ├── errinj_tx.result │ ├── errinj_tx.test.lua │ ├── errinj_vylog.result │ ├── errinj_vylog.test.lua │ ├── force_recovery.lua │ ├── gc.result │ ├── gc.test.lua │ ├── gh-3395-read-prepared-uncommitted.result │ ├── gh-3395-read-prepared-uncommitted.test.lua │ ├── gh-4805-open-run-err-recovery.result │ ├── gh-4805-open-run-err-recovery.test.lua │ ├── gh-4810-dump-during-index-build.result │ ├── gh-4810-dump-during-index-build.test.lua │ ├── gh-4821-ddl-during-throttled-dump.result │ ├── gh-4821-ddl-during-throttled-dump.test.lua │ ├── gh-4864-stmt-alloc-fail-compact.result │ ├── gh-4864-stmt-alloc-fail-compact.test.lua │ ├── gh-5005-upsert-affecting-pk.result │ ├── gh-5005-upsert-affecting-pk.test.lua │ ├── gh.result │ ├── gh.test.lua │ ├── hermitage.result │ ├── hermitage.test.lua │ ├── iterator.result │ ├── iterator.test.lua │ ├── json.result │ ├── json.test.lua │ ├── large.lua │ ├── large.result │ ├── large.test.lua │ ├── layout.result │ ├── layout.test.lua │ ├── low_quota.lua │ ├── misc.result │ ├── misc.test.lua │ ├── mvcc.result │ ├── mvcc.test.lua │ ├── on_replace.result │ ├── on_replace.test.lua │ ├── options.result │ ├── options.test.lua │ ├── parallel.result │ ├── parallel.test.lua │ ├── partial_dump.result │ ├── partial_dump.test.lua │ ├── quota.result │ ├── quota.test.lua │ ├── quota_timeout.result │ ├── quota_timeout.test.lua │ ├── recover.result │ ├── recover.test.lua │ ├── recovery_quota.result │ ├── recovery_quota.test.lua │ ├── replica_quota.lua │ ├── replica_quota.result │ ├── replica_quota.test.lua │ ├── replica_rejoin.lua │ ├── replica_rejoin.result │ ├── replica_rejoin.test.lua │ ├── savepoint.result │ ├── savepoint.test.lua │ ├── select_consistency.result │ ├── select_consistency.test.lua │ ├── snap_io_rate.result │ ├── snap_io_rate.test.lua │ ├── snapshot.result │ ├── snapshot.test.lua │ ├── split_coalesce.result │ ├── split_coalesce.test.lua │ ├── stat.lua │ ├── stat.result │ ├── stat.test.lua │ ├── stress.lua │ ├── stress.result │ ├── stress.test.lua │ ├── suite.cfg │ ├── suite.ini │ ├── throttle.result │ ├── throttle.test.lua │ ├── tx_conflict.result │ ├── tx_conflict.test.lua │ ├── tx_gap_lock.result │ ├── tx_gap_lock.test.lua │ ├── tx_serial.result │ ├── tx_serial.test.lua │ ├── txn_proxy.lua │ ├── update_optimize.result │ ├── update_optimize.test.lua │ ├── upgrade.lua │ ├── upgrade.result │ ├── upgrade.test.lua │ ├── upgrade │ │ └── fill.lua │ ├── upsert.result │ ├── upsert.test.lua │ ├── vinyl.lua │ ├── write_iterator.result │ ├── write_iterator.test.lua │ ├── write_iterator_rand.result │ └── write_iterator_rand.test.lua ├── wal_off │ ├── alter.result │ ├── alter.test.lua │ ├── expirationd.result │ ├── expirationd.test.lua │ ├── func_max.result │ ├── func_max.test.lua │ ├── iterator_lt_gt.result │ ├── iterator_lt_gt.test.lua │ ├── lua.result │ ├── lua.test.lua │ ├── oom.result │ ├── oom.test.lua │ ├── rtree_benchmark.result │ ├── rtree_benchmark.test.lua │ ├── snapshot_stress.result │ ├── snapshot_stress.skipcond │ ├── snapshot_stress.test.lua │ ├── suite.ini │ ├── tuple.result │ ├── tuple.test.lua │ ├── wal.lua │ ├── wal_mode.result │ └── wal_mode.test.lua ├── xlog-py │ ├── big_lsn.result │ ├── big_lsn.test.py │ ├── box.lua │ ├── dup_key.result │ ├── dup_key.test.py │ ├── empty.result │ ├── empty.test.py │ ├── lsn_gap.result │ ├── lsn_gap.test.py │ ├── misc.result │ ├── misc.test.py │ ├── missing.result │ ├── missing.test.py │ └── suite.ini └── xlog │ ├── big_tx.result │ ├── big_tx.test.lua │ ├── checkpoint_daemon.result │ ├── checkpoint_daemon.test.lua │ ├── checkpoint_threshold.result │ ├── checkpoint_threshold.test.lua │ ├── errinj.result │ ├── errinj.test.lua │ ├── force_recovery.lua │ ├── force_recovery.result │ ├── force_recovery.test.lua │ ├── gh-4771-upgrade.result │ ├── gh-4771-upgrade.test.lua │ ├── gh1433.result │ ├── gh1433.test.lua │ ├── header.result │ ├── header.test.lua │ ├── misc.result │ ├── misc.test.lua │ ├── panic.lua │ ├── panic_on_broken_lsn.result │ ├── panic_on_broken_lsn.test.lua │ ├── panic_on_wal_error.result │ ├── panic_on_wal_error.test.lua │ ├── reader.result │ ├── reader.test.lua │ ├── reader │ ├── crc.bad.xlog │ ├── eof.bad.xlog │ ├── format.bad.xlog │ ├── v12 │ │ ├── 00000000000000000000.ok.snap │ │ └── 00000000000000000000.ok.xlog │ ├── v13 │ │ ├── 00000000000000000000.ok.snap │ │ └── 00000000000000000000.ok.xlog │ └── version.bad.xlog │ ├── replica.lua │ ├── snap_io_rate.result │ ├── snap_io_rate.test.lua │ ├── suite.ini │ ├── transaction.result │ ├── transaction.test.lua │ ├── upgrade.lua │ ├── upgrade │ ├── 2.1.3 │ │ └── gh-4771-upgrade-sequence │ │ │ ├── 00000000000000000014.snap │ │ │ └── fill.lua │ ├── fill.lua │ └── how_to_add_new_test.md │ └── xlog.lua ├── third_party ├── PMurHash.c ├── PMurHash.h ├── README ├── base64.c ├── base64.h ├── clock_gettime.c ├── compat │ ├── sys │ │ └── bsd_time.h │ └── unwind.h ├── coro │ ├── LICENSE │ ├── README │ ├── conftest.c │ ├── coro.c │ └── coro.h ├── crc32.c ├── crc32.h ├── libeio │ ├── CVS │ │ ├── Entries │ │ ├── Repository │ │ └── Root │ ├── Changes │ ├── LICENSE │ ├── Makefile.am │ ├── Makefile.in │ ├── aclocal.m4 │ ├── autogen.sh │ ├── config.h.in │ ├── configure │ ├── configure.ac │ ├── demo.c │ ├── ecb.h │ ├── eio.3 │ ├── eio.c │ ├── eio.h │ ├── eio.pod │ ├── etp.c │ ├── install-sh │ ├── libeio.m4 │ ├── ltmain.sh │ ├── missing │ └── xthread.h ├── libev │ ├── CVS │ │ ├── Entries │ │ ├── Repository │ │ └── Root │ ├── Changes │ ├── LICENSE │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── README.embed │ ├── Symbols.ev │ ├── Symbols.event │ ├── aclocal.m4 │ ├── autogen.sh │ ├── config.h.in │ ├── configure │ ├── configure.ac │ ├── depcomp │ ├── ev++.h │ ├── ev.3 │ ├── ev.c │ ├── ev.h │ ├── ev.pod │ ├── ev_epoll.c │ ├── ev_kqueue.c │ ├── ev_poll.c │ ├── ev_port.c │ ├── ev_select.c │ ├── ev_vars.h │ ├── ev_win32.c │ ├── ev_wrap.h │ ├── event.c │ ├── event.h │ ├── event_compat.h │ ├── import_libevent │ ├── install-sh │ ├── libev.m4 │ ├── ltmain.sh │ ├── missing │ ├── mkinstalldirs │ ├── update_ev_c │ ├── update_ev_wrap │ └── update_symbols ├── libutil_freebsd │ ├── flopen.c │ ├── libutil.h │ └── pidfile.c ├── lua-cjson │ ├── LICENSE │ ├── lua_cjson.c │ ├── lua_cjson.h │ ├── strbuf.c │ └── strbuf.h ├── lua-yaml │ ├── HISTORY │ ├── LICENSE │ ├── LICENSE.LibYAML │ ├── README │ ├── TODO │ ├── b64.c │ ├── b64.h │ ├── lyaml.cc │ └── lyaml.h ├── memmem.c ├── memrchr.c ├── qsort_arg.c ├── qsort_arg.h ├── qsort_arg_mt.c ├── queue.h ├── sha1.c ├── sha1.h ├── sptree.h ├── tarantool_eio.c ├── tarantool_eio.h ├── tarantool_ev.c └── tarantool_ev.h └── tools ├── brew_taps └── tntpython2.rb └── update_repo.sh /.appveyor.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/.appveyor.yml -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | 9 | [CMakeLists.txt] 10 | indent_style = space 11 | indent_size = 4 12 | 13 | [*.cmake] 14 | indent_style = space 15 | indent_size = 4 16 | 17 | [*.lua] 18 | indent_style = space 19 | indent_size = 4 20 | 21 | [*.{h,c,cc}] 22 | indent_style = tab 23 | tab_width = 8 24 | -------------------------------------------------------------------------------- /.gdbinit: -------------------------------------------------------------------------------- 1 | set history save on 2 | handle SIGPIPE nostop noprint pass 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Tarantool version: 2 | 3 | OS version: 4 | 5 | Bug description: 6 | 7 | Steps to reproduce: 8 | 9 | Optional (but very desirable): 10 | * coredump 11 | * backtrace 12 | * netstat 13 | 14 | -------------------------------------------------------------------------------- /Doxyfile.API.in: -------------------------------------------------------------------------------- 1 | @INCLUDE = @PROJECT_SOURCE_DIR@/Doxyfile 2 | INPUT = @PROJECT_BINARY_DIR@/src/module.h 3 | OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doc/api/ 4 | ENABLED_SECTIONS = public 5 | DISABLE_INDEX = YES 6 | GENERATE_TREEVIEW = NO 7 | 8 | -------------------------------------------------------------------------------- /FreeBSD/databases/tarantool/distinfo: -------------------------------------------------------------------------------- 1 | SHA256 (tarantool-1.6.8.371.tar.gz) = 73ffe8d960e2a17528d5743aaf273dc0f33f27714f9e2a24bb5c8133b092131c 2 | SIZE (tarantool-1.6.8.371.tar.gz) = 4894701 3 | -------------------------------------------------------------------------------- /FreeBSD/databases/tarantool/files/pkg-message.in: -------------------------------------------------------------------------------- 1 | ######################################################### 2 | # 3 | # 4 | # After install you'll need: 5 | # 6 | # Configuration at /etc/rc.conf: 7 | # 8 | # * Enable tarantool on startup: 9 | # tarantool_enable="YES" 10 | # * Path to storage instances: 11 | # tarantool_instances="%%ETCDIR%%/instances.enabled" 12 | # 13 | # 14 | ######################################################### 15 | -------------------------------------------------------------------------------- /FreeBSD/databases/tarantool/pkg-descr: -------------------------------------------------------------------------------- 1 | Tarantool/Box, or simply Tarantool, is a high performance key/value 2 | storage server. The code is available for free under the terms of 3 | BSD license. Supported platforms are GNU/Linux and FreeBSD. 4 | 5 | WWW: http://tarantool.org/ 6 | -------------------------------------------------------------------------------- /FreeBSD/databases/tarantool/pkg-plist: -------------------------------------------------------------------------------- 1 | bin/tarantool 2 | bin/tarantoolctl 3 | %%ETCDIR%%/default/tarantool 4 | %%ETCDIR%%/instances.available/example.lua 5 | include/tarantool/lauxlib.h 6 | include/tarantool/lua.h 7 | include/tarantool/lua.hpp 8 | include/tarantool/luaconf.h 9 | include/tarantool/luajit.h 10 | include/tarantool/lualib.h 11 | include/tarantool/module.h 12 | man/man1/tarantool.1.gz 13 | man/man1/tarantoolctl.1.gz 14 | @dir %%ETCDIR%%/instances.enabled 15 | @dir(%%TT_USER%%,%%TT_GROUP%%,) %%TT_DATADIR%% 16 | @dir(%%TT_USER%%,%%TT_GROUP%%,) %%TT_LOGDIR%% 17 | @dir(%%TT_USER%%,%%TT_GROUP%%,) %%TT_RUNDIR%% 18 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | #!groovy 2 | 3 | stage('Build'){ 4 | packpack = new org.tarantool.packpack() 5 | node { 6 | checkout scm 7 | packpack.prepareSources() 8 | } 9 | 10 | packpack.packpackBuildMatrix('result') 11 | } 12 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | We're using Github for task tracking and bugs. 2 | Please use http://github.com/tarantool/tarantool/issues 3 | 4 | Thank you for your interest in Tarantool! 5 | -------------------------------------------------------------------------------- /apk/tarantool.post-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p /var/lib/tarantool 4 | chown tarantool:tarantool /var/lib/tarantool 5 | 6 | mkdir -p /opt/tarantool 7 | chown tarantool:tarantool /opt/tarantool 8 | 9 | mkdir -p /var/run/tarantool 10 | chown tarantool:tarantool /var/run/tarantool 11 | 12 | mkdir /etc/tarantool 13 | chown tarantool:tarantool /etc/tarantool -------------------------------------------------------------------------------- /apk/tarantool.pre-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | addgroup -S tarantool 4 | adduser -S -G tarantool tarantool 5 | 6 | apk add --no-cache 'su-exec>=0.2' -------------------------------------------------------------------------------- /asan/asan.supp: -------------------------------------------------------------------------------- 1 | # All exceptions are under control of the issue: 2 | # https://github.com/tarantool/tarantool/issues/4360 3 | # 4 | # File format: 5 | #fun:* 6 | #src:* 7 | 8 | # !test: app-tap/json.test.lua 9 | # source: third_party/lua-cjson/lua_cjson.c 10 | fun:json_decode 11 | 12 | # test: unit/base64.test.lua 13 | # source: third_party/base64.c 14 | fun:base64_decode_block 15 | # source: test/unit/base64.c 16 | fun:base64_test 17 | 18 | # !test: unit/msgpack.test 19 | # source: src/lib/msgpuck/test/msgpuck.c 20 | fun:test_mp_print 21 | -------------------------------------------------------------------------------- /cmake/BuildDecNumber.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # A macro to build the bundled decNumber lisbrary. 3 | macro(decnumber_build) 4 | set(decnumber_src 5 | ${PROJECT_SOURCE_DIR}/third_party/decNumber/decNumber.c 6 | ${PROJECT_SOURCE_DIR}/third_party/decNumber/decContext.c 7 | ${PROJECT_SOURCE_DIR}/third_party/decNumber/decPacked.c 8 | ) 9 | 10 | add_library(decNumber STATIC ${decnumber_src}) 11 | 12 | set(DECNUMBER_INCLUDE_DIR ${PROJECT_BINARY_DIR}/third_party/decNumber) 13 | unset(decnumber_src) 14 | endmacro(decnumber_build) 15 | -------------------------------------------------------------------------------- /cmake/BuildLibCORO.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # A macro to build the bundled libcoro 3 | macro(libcoro_build) 4 | set(coro_src 5 | ${PROJECT_SOURCE_DIR}/third_party/coro/coro.c 6 | ) 7 | 8 | add_library(coro STATIC ${coro_src}) 9 | 10 | set(LIBCORO_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/coro) 11 | set(LIBCORO_LIBRARIES coro) 12 | 13 | if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64") 14 | add_definitions("-DCORO_ASM") 15 | elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") 16 | add_definitions("-DCORO_ASM") 17 | else() 18 | add_definitions("-DCORO_SJLJ") 19 | endif() 20 | 21 | unset(coro_src) 22 | endmacro(libcoro_build) 23 | 24 | -------------------------------------------------------------------------------- /cmake/BuildLibYAML.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # A macro to build the bundled libyaml 3 | macro(libyaml_build) 4 | set(LIBYAML_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/third_party/libyaml/include) 5 | set(LIBYAML_LIBRARIES yaml) 6 | 7 | add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/libyaml EXCLUDE_FROM_ALL) 8 | # See comments in BuildLibEV.cmake 9 | set_target_properties(yaml PROPERTIES COMPILE_FLAGS "-w") 10 | 11 | find_package_message(LIBYAML 12 | "Using bundled libyaml" 13 | "${LIBYAML_LIBRARIES}:${LIBYAML_INCLUDE_DIRS}") 14 | 15 | unset(yaml_src) 16 | endmacro(libyaml_build) 17 | 18 | -------------------------------------------------------------------------------- /cmake/FindLibEIO.cmake: -------------------------------------------------------------------------------- 1 | find_path(LIBEIO_INCLUDE_DIR NAMES eio.h) 2 | find_library(LIBEIO_LIBRARIES NAMES eio) 3 | 4 | if(LIBEIO_INCLUDE_DIR AND LIBEIO_LIBRARIES) 5 | set(LIBEIO_FOUND ON) 6 | endif(LIBEIO_INCLUDE_DIR AND LIBEIO_LIBRARIES) 7 | 8 | if(LIBEIO_FOUND) 9 | if (NOT LIBEIO_FIND_QUIETLY) 10 | message(STATUS "Found libeio includes: ${LIBEIO_INCLUDE_DIR}/eio.h") 11 | message(STATUS "Found libeio library: ${LIBEIO_LIBRARIES}") 12 | endif (NOT LIBEIO_FIND_QUIETLY) 13 | else(LIBEIO_FOUND) 14 | if (LIBEIO_FIND_REQUIRED) 15 | message(FATAL_ERROR "Could not find libeio development files") 16 | endif (LIBEIO_FIND_REQUIRED) 17 | endif (LIBEIO_FOUND) 18 | -------------------------------------------------------------------------------- /cmake/FindLibEV.cmake: -------------------------------------------------------------------------------- 1 | find_path(LIBEV_INCLUDE_DIR NAMES ev.h) 2 | find_library(LIBEV_LIBRARIES NAMES ev) 3 | 4 | if(LIBEV_INCLUDE_DIR AND LIBEV_LIBRARIES) 5 | set(LIBEV_FOUND ON) 6 | endif(LIBEV_INCLUDE_DIR AND LIBEV_LIBRARIES) 7 | 8 | if(LIBEV_FOUND) 9 | if (NOT LIBEV_FIND_QUIETLY) 10 | message(STATUS "Found libev includes: ${LIBEV_INCLUDE_DIR}/ev.h") 11 | message(STATUS "Found libev library: ${LIBEV_LIBRARIES}") 12 | endif (NOT LIBEV_FIND_QUIETLY) 13 | else(LIBEV_FOUND) 14 | if (LIBEV_FIND_REQUIRED) 15 | message(FATAL_ERROR "Could not find libev development files") 16 | endif (LIBEV_FIND_REQUIRED) 17 | endif (LIBEV_FOUND) 18 | -------------------------------------------------------------------------------- /cmake/FindLibYAML.cmake: -------------------------------------------------------------------------------- 1 | find_path(LIBYAML_INCLUDE_DIR 2 | NAMES yaml.h 3 | ) 4 | 5 | if(BUILD_STATIC) 6 | set(YAML_LIB_NAME libyaml.a) 7 | else() 8 | set(YAML_LIB_NAME yaml) 9 | endif() 10 | 11 | find_library(LIBYAML_LIBRARY 12 | NAMES ${YAML_LIB_NAME} 13 | ) 14 | 15 | set(LIBYAML_INCLUDE_DIRS "${LIBYAML_INCLUDE_DIR}") 16 | set(LIBYAML_LIBRARIES "${LIBYAML_LIBRARY}") 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(LibYAML REQUIRED_VARS 20 | LIBYAML_LIBRARIES LIBYAML_INCLUDE_DIRS) 21 | 22 | mark_as_advanced(LIBYAML_LIBRARY LIBYAML_LIBRARIES 23 | LIBYAML_INCLUDE_DIR LIBYAML_INCLUDE_DIRS) 24 | -------------------------------------------------------------------------------- /cmake/FindMsgPuck.cmake: -------------------------------------------------------------------------------- 1 | # - Find libmsgpuck header-only library 2 | # The module defines the following variables: 3 | # 4 | # MSGPUCK_FOUND - true if MsgPuck was found 5 | # MSGPUCK_INCLUDE_DIRS - the directory of the MsgPuck headers 6 | # MSGPUCK_LIBRARIES - the MsgPuck static library needed for linking 7 | # 8 | 9 | find_path(MSGPUCK_INCLUDE_DIR msgpuck.h PATH_SUFFIXES msgpuck) 10 | find_library(MSGPUCK_LIBRARY NAMES libmsgpuck.a) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | find_package_handle_standard_args(MsgPuck 14 | REQUIRED_VARS MSGPUCK_INCLUDE_DIR MSGPUCK_LIBRARY) 15 | set(MSGPUCK_INCLUDE_DIRS ${MSGPUCK_INCLUDE_DIR}) 16 | set(MSGPUCK_LIBRARIES ${MSGPUCK_LIBRARY}) 17 | mark_as_advanced(MSGPUCK_INCLUDE_DIR MSGPUCK_INCLUDE_DIRS 18 | MSGPUCK_LIBRARY MSGPUCK_LIBRARIES) 19 | -------------------------------------------------------------------------------- /cmake/FindTermcap.cmake: -------------------------------------------------------------------------------- 1 | # find Termcap includes and library 2 | # 3 | # TERMCAP_FOUND 4 | # TERMCAP_LIBRARY 5 | # TERMCAP_INCLUDE_DIR 6 | 7 | if(BUILD_STATIC) 8 | set(TERMCAP_STATIC libtermcap.a) 9 | else() 10 | set(TERMCAP_STATIC termcap) 11 | endif() 12 | 13 | FIND_LIBRARY(TERMCAP_LIBRARY NAMES ${TERMCAP_STATIC}) 14 | FIND_PATH(TERMCAP_INCLUDE_DIR NAMES termcap.h) 15 | 16 | include(FindPackageHandleStandardArgs) 17 | find_package_handle_standard_args(Termcap 18 | REQUIRED_VARS TERMCAP_INCLUDE_DIR TERMCAP_LIBRARY) 19 | set(TERMCAP_INCLUDE_DIRS ${TERMCAP_INCLUDE_DIR}) 20 | set(TERMCAP_LIBRARIES ${TERMCAP_LIBRARY}) 21 | 22 | mark_as_advanced(TERMCAP_LIBRARIES TERMCAP_INCLUDE_DIRS) 23 | -------------------------------------------------------------------------------- /cmake/FindZSTD.cmake: -------------------------------------------------------------------------------- 1 | find_path(ZSTD_INCLUDE_DIR 2 | NAMES zstd.h 3 | ) 4 | 5 | if(BUILD_STATIC) 6 | set(ZSTD_LIB_NAME libzstd.a) 7 | else() 8 | set(ZSTD_LIB_NAME zstd) 9 | endif() 10 | find_library(ZSTD_LIBRARY 11 | NAMES ${ZSTD_LIB_NAME} 12 | ) 13 | 14 | set(ZSTD_INCLUDE_DIRS "${ZSTD_INCLUDE_DIR}") 15 | set(ZSTD_LIBRARIES "${ZSTD_LIBRARY}") 16 | 17 | include(FindPackageHandleStandardArgs) 18 | find_package_handle_standard_args(ZSTD REQUIRED_VARS 19 | ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS) 20 | 21 | mark_as_advanced(ZSTD_LIBRARY ZSTD_LIBRARIES 22 | ZSTD_INCLUDE_DIR ZSTD_INCLUDE_DIRS) 23 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | tarantool source: outdated-autotools-helper-file third_party/libeio/config.guess 2012-02-10 2 | tarantool source: outdated-autotools-helper-file third_party/libeio/config.sub 2012-02-10 3 | tarantool source: outdated-autotools-helper-file third_party/libev/config.guess 2008-01-23 4 | tarantool source: outdated-autotools-helper-file third_party/libev/config.sub 2008-01-16 5 | -------------------------------------------------------------------------------- /debian/source/options: -------------------------------------------------------------------------------- 1 | # don't pack some non-free and generated files for Debian 2 | extend-diff-ignore = ".*\.git$" 3 | extend-diff-ignore = ".*\.git/.*" 4 | extend-diff-ignore = "FreeBSD/" 5 | extend-diff-ignore = "test-run/lib/.*/debian/" 6 | extend-diff-ignore = "doc/www/" 7 | extend-diff-ignore = "doc/sphinx/" 8 | extend-diff-ignore = "src/lib/.*/debian/" 9 | extend-diff-ignore = "src/lib/.*/test.sh" 10 | extend-diff-ignore = "src/lib/small/test" 11 | extend-diff-ignore = "third_party/.*/debian/" 12 | extend-diff-ignore = "third_party/luajit/doc" 13 | extend-diff-ignore = "third_party/luafun/(tests|doc)" 14 | -------------------------------------------------------------------------------- /debian/tarantool-common.dirs: -------------------------------------------------------------------------------- 1 | /etc/tarantool/instances.available 2 | /etc/tarantool/instances.enabled 3 | /var/log/tarantool 4 | /var/lib/tarantool 5 | /usr/share/tarantool/luarocks 6 | -------------------------------------------------------------------------------- /debian/tarantool-common.install.systemd.in: -------------------------------------------------------------------------------- 1 | /etc/default/tarantool 2 | /usr/bin/tarantoolctl 3 | /etc/tarantool/instances.available/example.lua 4 | /etc/logrotate.d/tarantool 5 | /lib/systemd/system/tarantool.service 6 | /lib/systemd/system/tarantool@.service 7 | /lib/systemd/system-generators/tarantool-generator 8 | /usr/lib/tmpfiles.d/tarantool.conf 9 | /usr/share/man/man1/tarantoolctl.1 10 | -------------------------------------------------------------------------------- /debian/tarantool-common.install.sysvinit.in: -------------------------------------------------------------------------------- 1 | /etc/default/tarantool 2 | /usr/bin/tarantoolctl 3 | /etc/tarantool/instances.available/example.lua 4 | /etc/logrotate.d/tarantool 5 | /usr/share/man/man1/tarantoolctl.1 6 | -------------------------------------------------------------------------------- /debian/tarantool-common.lintian-overrides: -------------------------------------------------------------------------------- 1 | tarantool-common: unusual-interpreter usr/bin/tarantoolctl #!tarantool 2 | -------------------------------------------------------------------------------- /debian/tarantool-common.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | SYSUSER=tarantool 6 | 7 | case "$1" in 8 | configure) 9 | if ! getent passwd $SYSUSER > /dev/null; then 10 | adduser \ 11 | --system \ 12 | --group \ 13 | --quiet \ 14 | --home \ 15 | /var/spool/$SYSUSER \ 16 | --no-create-home \ 17 | --disabled-login \ 18 | tarantool 19 | fi 20 | 21 | # Use setgid to allow `adm` members to read logs 22 | install -d -o$SYSUSER -gadm -m2750 /var/log/tarantool 23 | install -d -o$SYSUSER -g$SYSUSER -m750 /var/run/tarantool 24 | install -d -o$SYSUSER -g$SYSUSER -m750 /var/lib/tarantool 25 | ;; 26 | esac 27 | 28 | #DEBHELPER# 29 | -------------------------------------------------------------------------------- /debian/tarantool-common.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | case "$1" in 6 | purge) 7 | rm -fr \ 8 | /etc/tarantool \ 9 | /var/log/tarantool \ 10 | /var/run/tarantool \ 11 | /var/lib/tarantool 12 | ;; 13 | esac 14 | 15 | #DEBHELPER# 16 | 17 | -------------------------------------------------------------------------------- /debian/tarantool-common.tarantool.init: -------------------------------------------------------------------------------- 1 | ../extra/dist/tarantool.init -------------------------------------------------------------------------------- /debian/tarantool-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/tarantool 2 | -------------------------------------------------------------------------------- /debian/tarantool.README.Debian: -------------------------------------------------------------------------------- 1 | To create new instance You should: 2 | 3 | 1. place instance_name.cfg into /etc/tarantool/instances.available/ 4 | 2. create symlink 5 | /etc/tarantool/instances.available/instance_name.cfg -> 6 | /etc/tarantool/instances.enabled/instance_name.cfg 7 | 3. do invoke-rc.d tarantool restart 8 | 9 | -------------------------------------------------------------------------------- /debian/tarantool.docs: -------------------------------------------------------------------------------- 1 | README.md 2 | AUTHORS 3 | -------------------------------------------------------------------------------- /debian/tarantool.install: -------------------------------------------------------------------------------- 1 | /usr/bin/tarantool 2 | /usr/lib/*/tarantool 3 | /usr/share/tarantool 4 | /usr/share/man/man1/tarantool.1 5 | -------------------------------------------------------------------------------- /debian/tarantool.lintian-overrides: -------------------------------------------------------------------------------- 1 | tarantool: unstripped-binary-or-object usr/bin/tarantool 2 | -------------------------------------------------------------------------------- /debian/tarantool.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | case "$1" in 4 | configure) 5 | update-alternatives \ 6 | --install /usr/bin/lua lua-interpreter /usr/bin/tarantool 50 \ 7 | --slave /usr/share/man/man1/lua.1.gz lua-manual \ 8 | /usr/share/man/man1/tarantool.1.gz 9 | esac 10 | 11 | #DEBHELPER# 12 | -------------------------------------------------------------------------------- /debian/tarantool.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | case "$1" in 4 | remove) 5 | update-alternatives --remove lua-interpreter /usr/bin/tarantool 6 | ;; 7 | esac 8 | 9 | #DEBHELPER# 10 | -------------------------------------------------------------------------------- /debian/tarantool.service: -------------------------------------------------------------------------------- 1 | ../extra/dist/tarantool.service -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | http://download.tarantool.org/tarantool/1.7/src/tarantool-(.+).tar.gz 3 | -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(man) 2 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | Please check out http://github.com/tarantool/doc for the main repository 2 | with Tarantool documentation, or read documentation online at 3 | http://tarantool.org/doc/ 4 | -------------------------------------------------------------------------------- /doc/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pod2man ( 2 | tarantool.pod "tarantool" 1 3 | "Lua application server and database management system" 4 | ) 5 | -------------------------------------------------------------------------------- /extra/apigen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sed -n '/^\/\*\* \\cond public \*\/$/,/^\/\*\* \\endcond public \*\/$/P' 4 | -------------------------------------------------------------------------------- /extra/dist/tarantool-generator.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This systemd generator creates dependency symlinks that make all Tarantool 4 | # instances in @TARANTOOL_ENABLEDDIR@ be started/stopped/reloaded 5 | # when tarantool.service is started/stopped/reloaded. 6 | 7 | set -eu 8 | 9 | wantdir="$1/tarantool.service.wants" 10 | service="@SYSTEMD_UNIT_DIR@/tarantool@.service" 11 | 12 | mkdir -p "$wantdir" 13 | 14 | for file in @TARANTOOL_ENABLEDDIR@/*.lua; do 15 | instance=`basename $file .lua` 16 | [ "${instance}" = "*" ] && break # skip empty directory 17 | ln -s "$service" "$wantdir/tarantool@$instance.service" 18 | done 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /extra/dist/tarantool.logrotate.in: -------------------------------------------------------------------------------- 1 | @TARANTOOL_LOGDIR@/*.log { 2 | daily 3 | size 512k 4 | missingok 5 | rotate 10 6 | compress 7 | delaycompress 8 | create 0640 @TARANTOOL_USER@ adm 9 | postrotate 10 | @CMAKE_INSTALL_FULL_BINDIR@/tarantoolctl logrotate `basename ${1%%.*}` 11 | endscript 12 | } 13 | -------------------------------------------------------------------------------- /extra/dist/tarantool.service: -------------------------------------------------------------------------------- 1 | # systemd service for managing all Tarantool instances on the system. This 2 | # service is actually a systemd target, but we are using a service since 3 | # targets cannot be reloaded. 4 | 5 | [Unit] 6 | Description=Tarantool Database Server 7 | 8 | [Service] 9 | Type=oneshot 10 | ExecStart=/bin/true 11 | ExecReload=/bin/true 12 | RemainAfterExit=on 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /extra/dist/tarantool.tmpfiles.conf.in: -------------------------------------------------------------------------------- 1 | d @TARANTOOL_RUNDIR@ 0750 @TARANTOOL_USER@ @TARANTOOL_USER@ - 2 | -------------------------------------------------------------------------------- /extra/dmg/postflight.in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | PLIST_PRODUCT=@LUANCHD_PLIST@ 4 | LUANCHD_PLIST=/Library/LaunchDaemons/${PLIST_PRODUCT} 5 | 6 | if [ -f ${LUANCHD_PLIST} ] 7 | then 8 | launchctl unload ${LUANCHD_PLIST} 9 | rm -f ${LUANCHD_PLIST} 10 | fi 11 | 12 | cp ${3}@CMAKE_INSTALL_PREFIX@/share/tarantool/${PLIST_PRODUCT} ${LUANCHD_PLIST} 13 | 14 | if [ -f ${LUANCHD_PLIST} ] 15 | then 16 | launchctl load ${LUANCHD_PLIST} 17 | else 18 | echo "${LUANCHD_PLIST} could not install" 19 | exit 1 20 | fi 21 | 22 | exit 0 23 | -------------------------------------------------------------------------------- /extra/luarocks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file(hardcoded.lua.cmake hardcoded.lua @ONLY) 2 | install(DIRECTORY ${PROJECT_SOURCE_DIR}/third_party/luarocks/src/luarocks 3 | DESTINATION ${MODULE_LUADIR}) 4 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hardcoded.lua 5 | DESTINATION ${MODULE_LUADIR}/luarocks/core 6 | PERMISSIONS 7 | OWNER_READ OWNER_WRITE OWNER_READ 8 | GROUP_READ WORLD_READ) 9 | -------------------------------------------------------------------------------- /rump/Makefile: -------------------------------------------------------------------------------- 1 | CHOST ?= x86_64-rumprun-netbsd 2 | CBUILDROOT ?= /usr/rumprun-x86_64 3 | 4 | all: 5 | cd .. && ${CHOST}-cmake . \ 6 | -DCMAKE_BUILD_TYPE=Debug \ 7 | -DENABLE_BUNDLED_LIBYAML=ON \ 8 | -DENABLE_DIST=OFF 9 | $(MAKE) -C .. $(MAKEOPTS) tarantool 10 | cp -p ../src/tarantool ../../tarantool 11 | -------------------------------------------------------------------------------- /src/box/bootstrap.: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/src/box/bootstrap. -------------------------------------------------------------------------------- /src/box/bootstrap.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/src/box/bootstrap.snap -------------------------------------------------------------------------------- /src/box/lua/key_def.lua: -------------------------------------------------------------------------------- 1 | local ffi = require('ffi') 2 | local key_def = require('key_def') 3 | local key_def_t = ffi.typeof('struct key_def') 4 | 5 | local methods = { 6 | ['extract_key'] = key_def.extract_key, 7 | ['compare'] = key_def.compare, 8 | ['compare_with_key'] = key_def.compare_with_key, 9 | ['merge'] = key_def.merge, 10 | ['totable'] = key_def.totable, 11 | ['__serialize'] = key_def.totable, 12 | } 13 | 14 | ffi.metatype(key_def_t, { 15 | __index = function(self, key) 16 | return methods[key] 17 | end, 18 | __tostring = function(key_def) return "" end, 19 | }) 20 | -------------------------------------------------------------------------------- /src/box/lua/serpent.lua: -------------------------------------------------------------------------------- 1 | ../../../third_party/serpent/src/serpent.lua -------------------------------------------------------------------------------- /src/box/lua/session.lua: -------------------------------------------------------------------------------- 1 | -- session.lua 2 | 3 | local session = box.session 4 | 5 | setmetatable(session, { 6 | __index = function(tbl, idx) 7 | 8 | if idx ~= 'storage' then 9 | return 10 | end 11 | 12 | local sid = session.id() 13 | 14 | local mt = getmetatable(tbl) 15 | 16 | if mt.aggregate_storage[ sid ] == nil then 17 | mt.aggregate_storage[ sid ] = {} 18 | end 19 | return mt.aggregate_storage[ sid ] 20 | end, 21 | 22 | aggregate_storage = {} 23 | }) 24 | -------------------------------------------------------------------------------- /src/box/lua/xlog.lua: -------------------------------------------------------------------------------- 1 | local internal = require('xlog') 2 | local fun = require('fun') 3 | local function xlog_pairs(...) 4 | return fun.wrap(internal.pairs(...)) 5 | end 6 | 7 | package.loaded['xlog'] = { 8 | pairs = xlog_pairs, 9 | } 10 | -------------------------------------------------------------------------------- /src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(bit) 2 | add_subdirectory(bitset) 3 | set(SMALL_EMBEDDED ON) 4 | add_subdirectory(small) 5 | add_subdirectory(salad) 6 | add_subdirectory(csv) 7 | add_subdirectory(json) 8 | add_subdirectory(uri) 9 | add_subdirectory(http_parser) 10 | add_subdirectory(core) 11 | add_subdirectory(uuid) 12 | add_subdirectory(coll) 13 | add_subdirectory(crypto) 14 | add_subdirectory(swim) 15 | add_subdirectory(mpstream) 16 | if(ENABLE_BUNDLED_MSGPUCK) 17 | add_subdirectory(msgpuck EXCLUDE_FROM_ALL) 18 | endif() 19 | -------------------------------------------------------------------------------- /src/lib/bit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_sources 2 | bit.c 3 | ) 4 | 5 | set_source_files_compile_flags(${lib_sources}) 6 | add_library(bit STATIC ${lib_sources}) 7 | -------------------------------------------------------------------------------- /src/lib/bitset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_sources 2 | bitset.c 3 | page.c 4 | expr.c 5 | iterator.c 6 | index.c 7 | ) 8 | 9 | set_source_files_compile_flags(${lib_sources}) 10 | add_library(bitset STATIC ${lib_sources}) 11 | target_link_libraries(bitset bit) 12 | -------------------------------------------------------------------------------- /src/lib/coll/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(coll STATIC coll.c coll_def.c) 2 | target_link_libraries(coll core ${ICU_LIBRARIES}) 3 | -------------------------------------------------------------------------------- /src/lib/crypto/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_sources crypto.c) 2 | 3 | set_source_files_compile_flags(${lib_sources}) 4 | add_library(crypto STATIC ${lib_sources}) 5 | target_link_libraries(crypto ${OPENSSL_LIBRARIES} core) 6 | -------------------------------------------------------------------------------- /src/lib/csv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_sources 2 | csv.c 3 | ) 4 | 5 | set_source_files_compile_flags(${lib_sources}) 6 | add_library(csv STATIC ${lib_sources}) 7 | -------------------------------------------------------------------------------- /src/lib/http_parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(http_parser STATIC http_parser.c) 2 | -------------------------------------------------------------------------------- /src/lib/json/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_sources 2 | json.c 3 | ) 4 | 5 | set_source_files_compile_flags(${lib_sources}) 6 | add_library(json STATIC ${lib_sources}) 7 | target_link_libraries(json misc) 8 | -------------------------------------------------------------------------------- /src/lib/mpstream/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(mpstream STATIC mpstream.c) 2 | target_link_libraries(mpstream core uuid ${MSGPUCK_LIBRARIES}) 3 | -------------------------------------------------------------------------------- /src/lib/salad/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_sources rope.c rtree.c guava.c bloom.c) 2 | set_source_files_compile_flags(${lib_sources}) 3 | add_library(salad STATIC ${lib_sources}) 4 | -------------------------------------------------------------------------------- /src/lib/salad/README: -------------------------------------------------------------------------------- 1 | salad - Some ALgorithms And Data structures 2 | -------------------------------------------------------------------------------- /src/lib/swim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(lib_swim_sources swim.c swim_io.c swim_proto.c) 2 | set(lib_swim_udp_sources swim_transport_udp.c) 3 | set(lib_swim_ev_sources swim_ev.c) 4 | 5 | set_source_files_compile_flags(${lib_swim_sources} ${lib_swim_udp_sources} 6 | ${lib_swim_ev_sources}) 7 | add_library(swim STATIC ${lib_swim_sources}) 8 | target_link_libraries(swim core misc uuid crypto) 9 | add_library(swim_udp STATIC ${lib_swim_udp_sources}) 10 | target_link_libraries(swim_udp core) 11 | add_library(swim_ev STATIC ${lib_swim_ev_sources}) 12 | target_link_libraries(swim_ev core) 13 | -------------------------------------------------------------------------------- /src/lib/uri/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_custom_target(ragel 2 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 3 | COMMAND ragel -G2 src/lib/uri/uri.rl -o src/lib/uri/uri.c) 4 | 5 | if (CC_HAS_WNO_IMPLICIT_FALLTHROUGH) 6 | # Suppress noise warnings for autogenerated Ragel code 7 | set_source_files_properties(uri.c PROPERTIES COMPILE_FLAGS 8 | -Wno-implicit-fallthrough) 9 | endif() 10 | add_library(uri STATIC uri.c) 11 | -------------------------------------------------------------------------------- /src/lib/uuid/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(uuid STATIC tt_uuid.c mp_uuid.c) 2 | target_link_libraries(uuid core bit) 3 | -------------------------------------------------------------------------------- /src/lua/errno.lua: -------------------------------------------------------------------------------- 1 | local ffi = require('ffi') 2 | local errno_list = require('errno') 3 | 4 | ffi.cdef[[ 5 | char *strerror(int errnum); 6 | ]] 7 | 8 | local function strerror(errno) 9 | if errno == nil then 10 | errno = ffi.errno() 11 | end 12 | return ffi.string(ffi.C.strerror(tonumber(errno))) 13 | end 14 | 15 | return setmetatable({ 16 | strerror = strerror 17 | }, { 18 | __index = errno_list, 19 | __newindex = function() error("Can't create new errno constants") end, 20 | __call = function(self, ...) return ffi.errno(...) end 21 | }) 22 | -------------------------------------------------------------------------------- /src/lua/tnt_iconv.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | iconv_t 4 | tnt_iconv_open(const char *tocode, const char *fromcode) 5 | { 6 | return iconv_open(tocode, fromcode); 7 | } 8 | 9 | int 10 | tnt_iconv_close(iconv_t cd) 11 | { 12 | return iconv_close(cd); 13 | } 14 | 15 | size_t 16 | tnt_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, 17 | char **outbuf, size_t *outbytesleft) 18 | { 19 | return iconv(cd, inbuf, inbytesleft, 20 | outbuf, outbytesleft); 21 | } 22 | -------------------------------------------------------------------------------- /src/module_footer.h: -------------------------------------------------------------------------------- 1 | #if defined(__cplusplus) 2 | } /* extern "C" */ 3 | #endif /* defined(__cplusplus) */ 4 | 5 | #endif /* TARANTOOL_MODULE_H_INCLUDED */ 6 | -------------------------------------------------------------------------------- /test/.gitattributes: -------------------------------------------------------------------------------- 1 | *.result diff merge=text 2 | 3 | -------------------------------------------------------------------------------- /test/.tarantoolctl: -------------------------------------------------------------------------------- 1 | -- Options for test-run tarantoolctl 2 | 3 | local workdir = os.getenv('TEST_WORKDIR') 4 | default_cfg = { 5 | pid_file = workdir, 6 | wal_dir = workdir, 7 | memtx_dir = workdir, 8 | vinyl_dir = workdir, 9 | log = workdir, 10 | background = false, 11 | } 12 | 13 | instance_dir = workdir 14 | 15 | -- vim: set ft=lua : 16 | -------------------------------------------------------------------------------- /test/app-tap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | build_module(module_api module_api.c) 2 | -------------------------------------------------------------------------------- /test/app-tap/clock.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | clock = require("clock") 4 | test = require("tap").test("csv") 5 | test:plan(10) 6 | test:ok(clock.realtime() > 0, "realtime") 7 | test:ok(clock.thread() > 0, "thread") 8 | test:ok(clock.monotonic() > 0, "monotonic") 9 | test:ok(clock.proc() > 0, "proc") 10 | test:ok(clock.realtime64() > 0, "realtime64") 11 | test:ok(clock.thread64() > 0, "thread64") 12 | test:ok(clock.monotonic64() > 0, "monotonic64") 13 | test:ok(clock.proc64() > 0, "proc64") 14 | 15 | test:ok(clock.monotonic() <= clock.monotonic(), "time is monotonic") 16 | test:ok(math.abs(clock.realtime() - os.time()) < 2, "clock.realtime ~ os.time") 17 | -------------------------------------------------------------------------------- /test/app-tap/console.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app-tap/debug/server.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | listen = os.getenv('LISTEN') 5 | } 6 | require('console').listen(os.getenv('ADMIN')) 7 | 8 | box.schema.func.create('debug.sourcefile') 9 | box.schema.func.create('debug.sourcedir') 10 | box.schema.user.grant('guest','execute','function','debug.sourcefile') 11 | box.schema.user.grant('guest','execute','function','debug.sourcedir') 12 | -------------------------------------------------------------------------------- /test/app-tap/fail_main.result: -------------------------------------------------------------------------------- 1 | TAP version 13 2 | 1..1 3 | ok - main script error is handled gracefully 4 | -------------------------------------------------------------------------------- /test/app-tap/fail_main.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app-tap/func.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local tap = require('tap') 4 | 5 | local test = tap.test("func") 6 | 7 | test:plan(2) 8 | 9 | -- gh-3770 Check no segfault with module_reload() without box.cfg{}. 10 | 11 | test:ok(not pcall(box.internal.module_reload, ''), 12 | 'expected error: no module') 13 | test:ok(not pcall(box.internal.module_reload, 'xxx'), 14 | 'expected error: no module') 15 | -------------------------------------------------------------------------------- /test/app-tap/http_client.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # Disabled on OpenBSD due to fail #XXXX. 8 | if platform.system() == 'OpenBSD': 9 | self.skip = 1 10 | 11 | # vim: set ft=python: 12 | -------------------------------------------------------------------------------- /test/app-tap/info.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local tarantool = require('tarantool') 4 | 5 | require('tap').test("info", function(test) 6 | test:plan(9) 7 | test:like(tarantool.version, '^[1-9]', "version") 8 | test:isstring(tarantool.package, "package") 9 | test:ok(_TARANTOOL == tarantool.version, "version") 10 | test:isstring(tarantool.build.target, "build.target") 11 | test:isstring(tarantool.build.compiler, "build.compiler") 12 | test:isstring(tarantool.build.flags, "build.flags") 13 | test:isstring(tarantool.build.options, "build.options") 14 | test:ok(tarantool.uptime() > 0, "uptime") 15 | test:ok(tarantool.pid() > 0, "pid") 16 | end) 17 | -------------------------------------------------------------------------------- /test/app-tap/inspector.result: -------------------------------------------------------------------------------- 1 | create instance 2 | true 3 | start instance 4 | true 5 | -------------------------------------------------------------------------------- /test/app-tap/inspector.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local socket = require('socket') 4 | 5 | test_run = require('test_run') 6 | inspector = test_run.new() 7 | 8 | print('create instance') 9 | print(inspector:cmd("create server replica with rpl_master=default, script='box/box.lua'\n")) 10 | 11 | print('start instance') 12 | print(inspector:cmd('start server replica')) 13 | inspector:cmd('stop server replica') 14 | os.exit(0) 15 | -------------------------------------------------------------------------------- /test/app-tap/json.skipcond: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # Disabled at ASAN build due to issue #4360. 4 | if os.getenv("ASAN") == 'ON': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app-tap/logger_pipe.result: -------------------------------------------------------------------------------- 1 | 48 2 | -------------------------------------------------------------------------------- /test/app-tap/logger_pipe.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | os.setenv('TEST_VAR', '48') 4 | box.cfg { log = '|echo $TEST_VAR; cat > /dev/null' } 5 | os.exit(0) 6 | -------------------------------------------------------------------------------- /test/app-tap/lua/require_mod.lua: -------------------------------------------------------------------------------- 1 | exports = {} 2 | 3 | function exports.test(a, b) 4 | return a+b 5 | end 6 | 7 | return exports 8 | -------------------------------------------------------------------------------- /test/app-tap/pcall.result: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | -- #267: Bad exception catching 3 | -------------------------------------------------------------------------------- 4 | 5 | pcall inside xpcall: true pcall is ok 6 | pcall with Lua error(): false some message 7 | pcall with box.error(): false Illegal parameters, some message 8 | pcall with box.error(): typeof ctype 9 | pcall with box.error(): .type ClientError 10 | pcall with box.error(): .code 1 11 | pcall with box.error(): .message Illegal parameters, some message 12 | pcall with box.error(): .match() some 13 | pcall with no return: 1 14 | pcall with multireturn: true 1 2 3 15 | -------------------------------------------------------------------------------- /test/app-tap/popen.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app-tap/pwd.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local pwd = require("pwd") 4 | 5 | local test = require("tap").test("pwd") 6 | test:plan(6) 7 | 8 | local base_group = pwd.getgr() 9 | local base_user = pwd.getpw() 10 | 11 | test:is_deeply(pwd.getpw(base_user.id), base_user, "checking user by id") 12 | test:is_deeply(pwd.getpw(base_user.name), base_user, "checking user by name") 13 | 14 | test:is_deeply(pwd.getgr(base_group.id), base_group, "checking group by id") 15 | test:is_deeply(pwd.getgr(base_group.name), base_group, "checking group by name") 16 | 17 | test:ok(#pwd.getpwall() > 0, "check output of getpwall") 18 | test:ok(#pwd.getgrall() > 0, "check output of getgrall") 19 | 20 | os.exit(test:check() == true and 0 or 1) 21 | -------------------------------------------------------------------------------- /test/app-tap/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = app 3 | description = application server tests (TAP) 4 | lua_libs = lua/require_mod.lua lua/serializer_test.lua 5 | is_parallel = True 6 | pretest_clean = True 7 | use_unix_sockets_iproto = True 8 | -------------------------------------------------------------------------------- /test/app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | build_module(loaderslib loaderslib.c) 2 | -------------------------------------------------------------------------------- /test/app/app.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | listen = os.getenv("LISTEN"), 5 | memtx_memory = 107374182, 6 | pid_file = "tarantool.pid", 7 | wal_max_size = 2500 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/app/buffer.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | buffer = require('buffer') 3 | ffi = require('ffi') 4 | 5 | -- Registers. 6 | reg1 = buffer.reg1 7 | reg1.u16 = 100 8 | u16 = ffi.new('uint16_t[1]') 9 | ffi.copy(u16, reg1, 2) 10 | u16[0] 11 | 12 | u16[0] = 200 13 | ffi.copy(reg1, u16, 2) 14 | reg1.u16 15 | 16 | -- Alignment. 17 | _ = buffer.static_alloc('char') -- This makes buffer pos unaligned. 18 | p = buffer.static_alloc('int') 19 | ffi.cast('int', p) % ffi.alignof('int') == 0 -- But next alloc is aligned. 20 | 21 | -- Able to allocate bigger than static buffer - such allocations 22 | -- are on the heap. 23 | type(buffer.static_alloc('char', 13000)) 24 | -------------------------------------------------------------------------------- /test/app/cmdline.result: -------------------------------------------------------------------------------- 1 | arg[-1] ~= nil 2 | --- 3 | - true 4 | ... 5 | arg[0] ~= nil 6 | --- 7 | - true 8 | ... 9 | string.match(arg[-1], '^/') ~= nil 10 | --- 11 | - true 12 | ... 13 | string.match(arg[0], '^/') == nil 14 | --- 15 | - true 16 | ... 17 | string.match(arg[-1], '/tarantool$') ~= nil 18 | --- 19 | - true 20 | ... 21 | string.match(arg[2], 'app%.lua$') ~= nil 22 | --- 23 | - true 24 | ... 25 | io.type( io.open(arg[-1]) ) 26 | --- 27 | - file 28 | ... 29 | io.type( io.open(arg[0]) ) 30 | --- 31 | - file 32 | ... 33 | -------------------------------------------------------------------------------- /test/app/cmdline.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app/cmdline.test.lua: -------------------------------------------------------------------------------- 1 | arg[-1] ~= nil 2 | arg[0] ~= nil 3 | string.match(arg[-1], '^/') ~= nil 4 | string.match(arg[0], '^/') == nil 5 | 6 | string.match(arg[-1], '/tarantool$') ~= nil 7 | string.match(arg[2], 'app%.lua$') ~= nil 8 | 9 | io.type( io.open(arg[-1]) ) 10 | io.type( io.open(arg[0]) ) 11 | 12 | -------------------------------------------------------------------------------- /test/app/crypto.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # Disabled on OpenBSD due to fail #XXXX. 8 | if platform.system() == 'OpenBSD': 9 | self.skip = 1 10 | 11 | # vim: set ft=python: 12 | -------------------------------------------------------------------------------- /test/app/digest.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # Disabled on OpenBSD due to fail #XXXX. 8 | if platform.system() == 'OpenBSD': 9 | self.skip = 1 10 | 11 | # vim: set ft=python: 12 | -------------------------------------------------------------------------------- /test/app/fiber.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app/fiber_channel.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/app/fiber_cond.test.lua: -------------------------------------------------------------------------------- 1 | fiber = require('fiber') 2 | 3 | -- fiber.cond 4 | c = fiber.cond() 5 | tostring(c) 6 | -- args validation 7 | c.wait() 8 | c.wait('1') 9 | c:wait('1') 10 | c:wait(-1) 11 | -- timeout 12 | c:wait(0.1) 13 | -- wait success 14 | fiber.create(function() fiber.sleep(.5); c:broadcast() end) and c:wait(.6) 15 | -- signal 16 | t = {} 17 | for i = 1,4 do fiber.create(function() c:wait(); table.insert(t, '#') end) end 18 | c:signal() 19 | fiber.sleep(0.1) 20 | t 21 | -- broadcast 22 | c:broadcast() 23 | fiber.sleep(0.1) 24 | t 25 | -------------------------------------------------------------------------------- /test/app/gh-4775-crash-args-l-e.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- 3 | -- gh-4775: crash on option concatenated with value. 4 | -- 5 | child = io.popen('tarantool -e"print(100) os.exit()"') 6 | | --- 7 | | ... 8 | child:read() 9 | | --- 10 | | - '100' 11 | | ... 12 | -- :close() is omitted, because SIGCHILD may be handled by 13 | -- libev instead of Lua. In that case :close() with fail with 14 | -- ECHILD, but it does not matter for this test. 15 | -------------------------------------------------------------------------------- /test/app/gh-4775-crash-args-l-e.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-4775: crash on option concatenated with value. 3 | -- 4 | child = io.popen('tarantool -e"print(100) os.exit()"') 5 | child:read() 6 | -- :close() is omitted, because SIGCHILD may be handled by 7 | -- libev instead of Lua. In that case :close() with fail with 8 | -- ECHILD, but it does not matter for this test. 9 | -------------------------------------------------------------------------------- /test/app/loaders.lua: -------------------------------------------------------------------------------- 1 | return "success" 2 | -------------------------------------------------------------------------------- /test/app/loaderslib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | LUA_API int 4 | luaopen_loaderslib(lua_State *L) 5 | { 6 | lua_pushliteral(L, "success"); 7 | return 1; 8 | } 9 | -------------------------------------------------------------------------------- /test/app/socket.skipcond: -------------------------------------------------------------------------------- 1 | 2 | # vim: set ft=python : 3 | import re 4 | import os.path 5 | import socket 6 | import os 7 | import tempfile 8 | import platform 9 | 10 | test_dir = tempfile.mkdtemp(prefix='tarantool-test-socket') 11 | test_path = os.path.join(test_dir, 'socket') 12 | 13 | s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 14 | try: 15 | s.bind(test_path) 16 | except: 17 | self.skip = 1 18 | 19 | s.close() 20 | 21 | if os.path.exists(test_path): 22 | os.remove(test_path) 23 | os.rmdir(test_dir) 24 | 25 | # Disabled on FreeBSD due to flaky fail #4271. 26 | if platform.system() == 'FreeBSD': 27 | self.skip = 1 28 | 29 | # Disabled on OpenBSD due to fail #XXX. 30 | if platform.system() == 'OpenBSD': 31 | self.skip = 1 32 | -------------------------------------------------------------------------------- /test/app/strict.result: -------------------------------------------------------------------------------- 1 | strict = require('strict') 2 | --- 3 | ... 4 | strict.on() 5 | --- 6 | ... 7 | if a then a = true end 8 | --- 9 | - error: '[string "if a then a = true end "]:1: variable ''a'' is not declared' 10 | ... 11 | strict.off() 12 | --- 13 | ... 14 | if a then a = true end 15 | --- 16 | ... 17 | -------------------------------------------------------------------------------- /test/app/strict.test.lua: -------------------------------------------------------------------------------- 1 | strict = require('strict') 2 | strict.on() 3 | if a then a = true end 4 | strict.off() 5 | if a then a = true end 6 | -------------------------------------------------------------------------------- /test/app/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = application server tests 4 | script = app.lua 5 | lua_libs = lua/fiber.lua 6 | use_unix_sockets = True 7 | use_unix_sockets_iproto = True 8 | is_parallel = True 9 | pretest_clean = True 10 | fragile = fiber_channel.test.lua ; gh-4961 11 | socket.test.lua ; gh-4978 12 | fiber.test.lua ; gh-4987 13 | -------------------------------------------------------------------------------- /test/app/uuid.skipcond: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | uuid = admin("lua box.uuid_hex()") 4 | 5 | if not re.search(re.compile('^\s+-\s+[a-f0-9]{32}\s*$', re.M), uuid): 6 | if re.search('box.uuid\(\):', uuid): 7 | self.skip = 1 8 | -------------------------------------------------------------------------------- /test/box-py/args.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | for i=-1,#arg do 4 | print(string.format("arg[%d] => %s", i, arg[i])) 5 | end 6 | -------------------------------------------------------------------------------- /test/box-py/bad_trigger.result: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # if on_connect() trigger raises an exception, the connection is dropped 4 | # 5 | 6 | nosuchfunction = nil 7 | --- 8 | ... 9 | function f1() nosuchfunction() end 10 | --- 11 | ... 12 | type(box.session.on_connect(f1)) 13 | --- 14 | - function 15 | ... 16 | greeting: True 17 | fixheader: True 18 | error code 32 19 | error message: [string "function f1() nosuchfunction() end"]:1: attempt to call global 'nosuchfunction' (a nil value) 20 | eof: True 21 | box.session.on_connect(nil, f1) 22 | --- 23 | ... 24 | -------------------------------------------------------------------------------- /test/box-py/bootstrap.test.py: -------------------------------------------------------------------------------- 1 | server.admin('box.internal.bootstrap()') 2 | server.admin('box.space._schema:select{}') 3 | server.admin('box.space._cluster:select{}') 4 | server.admin('box.space._space:select{}') 5 | server.admin('box.space._index:select{}') 6 | server.admin('box.space._user:select{}') 7 | server.admin('for _, v in box.space._func:pairs{} do r = {} table.insert(r, v:update({{"=", 18, ""}, {"=", 19, ""}})) return r end') 8 | server.admin('box.space._priv:select{}') 9 | 10 | # Cleanup 11 | server.stop() 12 | server.cleanup() 13 | server.deploy() 14 | -------------------------------------------------------------------------------- /test/box-py/box.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 107374182, 7 | pid_file = "tarantool.pid", 8 | force_recovery = true, 9 | wal_max_size = 500 10 | } 11 | 12 | require('console').listen(os.getenv('ADMIN')) 13 | -------------------------------------------------------------------------------- /test/box-py/print.result: -------------------------------------------------------------------------------- 1 | print("Hello, world") 2 | --- 3 | ... 4 | io = require('io') 5 | --- 6 | ... 7 | local f = require('fiber').create( 8 | function() 9 | print('Ehllo, world') 10 | io.flush() 11 | end 12 | ) 13 | --- 14 | ... 15 | require('fiber').sleep(0.01) 16 | --- 17 | ... 18 | Check log line (Hello): 19 | --- 20 | - "logfile contains "Hello"" 21 | ... 22 | Check log line (Ehllo): 23 | --- 24 | - "logfile contains "Ehllo"" 25 | ... 26 | -------------------------------------------------------------------------------- /test/box-py/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = legacy python tests 4 | script = box.lua 5 | lua_libs = lua/fiber.lua lua/fifo.lua 6 | use_unix_sockets = True 7 | is_parallel = True 8 | fragile = snapshot.test.py ; gh-4514 9 | -------------------------------------------------------------------------------- /test/box-tap/cfg.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to fail #4271: 4 | # Data segment size exceeds process limit 5 | if platform.system() == 'FreeBSD': 6 | self.skip = 1 7 | 8 | # Disabled on OpenBSD due to fail #XXXX: 9 | if platform.system() == 'OpenBSD': 10 | self.skip = 1 11 | 12 | # vim: set ft=python: 13 | -------------------------------------------------------------------------------- /test/box-tap/feedback_daemon.skipcond: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | # Disabled on Mac OS in CI due to flaky fail #3558. 5 | if os.environ.get('TRAVIS_JOB_ID', '') and platform.system() == 'Darwin': 6 | self.skip = 1 7 | 8 | # vim: set ft=python: 9 | -------------------------------------------------------------------------------- /test/box-tap/suite.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "gh-4231-box-execute-locking.test.lua": { 3 | "box_load_and_execute": {"conf": "box_load_and_execute"}, 4 | "box.execute": {"conf": "box.execute"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/box-tap/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = app 3 | description = Database tests with #! using TAP 4 | is_parallel = True 5 | pretest_clean = True 6 | use_unix_sockets_iproto = True 7 | fragile = cfg.test.lua ; gh-4344 8 | config = suite.cfg 9 | -------------------------------------------------------------------------------- /test/box-tap/trigger_atexit.result: -------------------------------------------------------------------------------- 1 | done 2 | -------------------------------------------------------------------------------- /test/box-tap/trigger_yield.result: -------------------------------------------------------------------------------- 1 | done: 0 2 | -------------------------------------------------------------------------------- /test/box-tap/trigger_yield.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | box.cfg{ 3 | pid_file = "box.pid", 4 | memtx_memory = 104857600, 5 | log = "tarantool.log" 6 | } 7 | 8 | fiber = require('fiber') 9 | 10 | box.schema.space.create('test') 11 | box.space.test:create_index('pk') 12 | 13 | box.space.test:truncate() 14 | 15 | function fail() fiber.sleep(0.0001) error("fail") end 16 | 17 | box.space.test:on_replace(fail) 18 | 19 | function insert() box.space.test:auto_increment{fiber.id()} end 20 | 21 | fibers = {} 22 | for i = 1, 100 do 23 | table.insert(fibers, fiber.create(insert)) 24 | end 25 | 26 | for _,f in pairs(fibers) do 27 | while f:status() ~= 'dead' do fiber.sleep(0.0001) end 28 | end 29 | print('done: '..box.space.test:len()) 30 | box.space.test:drop() 31 | os.exit() 32 | -------------------------------------------------------------------------------- /test/box/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${MSGPUCK_INCLUDE_DIRS}) 2 | build_module(function1 function1.c) 3 | build_module(reload1 reload1.c) 4 | build_module(reload2 reload2.c) 5 | build_module(tuple_bench tuple_bench.c) 6 | -------------------------------------------------------------------------------- /test/box/backup_test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{listen = os.getenv("LISTEN")} 4 | require('console').listen(os.getenv('ADMIN')) 5 | -------------------------------------------------------------------------------- /test/box/cfg.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/box/ddl_alter.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- index should not crash after alter 3 | space = box.schema.space.create('test_swap') 4 | | --- 5 | | ... 6 | index = space:create_index('pk') 7 | | --- 8 | | ... 9 | space:replace({1, 2, 3}) 10 | | --- 11 | | - [1, 2, 3] 12 | | ... 13 | index:rename('primary') 14 | | --- 15 | | ... 16 | index2 = space:create_index('sec') 17 | | --- 18 | | ... 19 | space:replace({2, 3, 1}) 20 | | --- 21 | | - [2, 3, 1] 22 | | ... 23 | space:select() 24 | | --- 25 | | - - [1, 2, 3] 26 | | - [2, 3, 1] 27 | | ... 28 | space:drop() 29 | | --- 30 | | ... 31 | -------------------------------------------------------------------------------- /test/box/ddl_alter.test.lua: -------------------------------------------------------------------------------- 1 | -- index should not crash after alter 2 | space = box.schema.space.create('test_swap') 3 | index = space:create_index('pk') 4 | space:replace({1, 2, 3}) 5 | index:rename('primary') 6 | index2 = space:create_index('sec') 7 | space:replace({2, 3, 1}) 8 | space:select() 9 | space:drop() 10 | -------------------------------------------------------------------------------- /test/box/ddl_call_twice_gh-2336.test.lua: -------------------------------------------------------------------------------- 1 | -- gh-2336 crash if format called twice during snapshot 2 | fiber = require'fiber' 3 | 4 | space = box.schema.space.create('test_format') 5 | _ = space:create_index('pk', { parts = { 1,'str' }}) 6 | space:format({{ name ="key"; type = "string" }, { name ="dataAB"; type = "string" }}) 7 | str = string.rep("t",1024) 8 | for i = 1, 10000 do space:insert{tostring(i), str} end 9 | ch = fiber.channel(3) 10 | _ = fiber.create(function() fiber.yield() box.snapshot() ch:put(true) end) 11 | format = {{name ="key"; type = "string"}, {name ="data"; type = "string"}} 12 | for i = 1, 2 do fiber.create(function() fiber.yield() space:format(format) ch:put(true) end) end 13 | 14 | {ch:get(), ch:get(), ch:get()} 15 | 16 | space:drop() 17 | -------------------------------------------------------------------------------- /test/box/ddl_collation_deleted_gh-3290.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- 3 | -- gh-3290: expose ICU into Lua. It uses built-in collations, that 4 | -- must work even if a collation is deleted from _collation. 5 | -- 6 | t = box.space._collation:delete{1} 7 | | --- 8 | | ... 9 | utf8.cmp('abc', 'def') 10 | | --- 11 | | - -1 12 | | ... 13 | box.space._collation:replace(t) 14 | | --- 15 | | - [1, 'unicode', 1, 'ICU', '', {'strength': 'tertiary'}] 16 | | ... 17 | -------------------------------------------------------------------------------- /test/box/ddl_collation_deleted_gh-3290.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-3290: expose ICU into Lua. It uses built-in collations, that 3 | -- must work even if a collation is deleted from _collation. 4 | -- 5 | t = box.space._collation:delete{1} 6 | utf8.cmp('abc', 'def') 7 | box.space._collation:replace(t) 8 | -------------------------------------------------------------------------------- /test/box/ddl_collation_field_def_gh-2937.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- 3 | -- gh-2937: allow to specify collation in field definition. 4 | -- 5 | format = {} 6 | | --- 7 | | ... 8 | format[1] = {name = 'field1', type = 'string', collation = 'unicode'} 9 | | --- 10 | | ... 11 | format[2] = {'field2', 'any', collation = 'unicode_ci'} 12 | | --- 13 | | ... 14 | format[3] = {type = 'scalar', name = 'field3', collation = 'unicode'} 15 | | --- 16 | | ... 17 | s = box.schema.create_space('test', {format = format}) 18 | | --- 19 | | ... 20 | s:format() 21 | | --- 22 | | - [{'type': 'string', 'name': 'field1', 'collation': 1}, {'type': 'any', 'name': 'field2', 23 | | 'collation': 2}, {'type': 'scalar', 'name': 'field3', 'collation': 1}] 24 | | ... 25 | s:drop() 26 | | --- 27 | | ... 28 | -------------------------------------------------------------------------------- /test/box/ddl_collation_field_def_gh-2937.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-2937: allow to specify collation in field definition. 3 | -- 4 | format = {} 5 | format[1] = {name = 'field1', type = 'string', collation = 'unicode'} 6 | format[2] = {'field2', 'any', collation = 'unicode_ci'} 7 | format[3] = {type = 'scalar', name = 'field3', collation = 'unicode'} 8 | s = box.schema.create_space('test', {format = format}) 9 | s:format() 10 | s:drop() 11 | -------------------------------------------------------------------------------- /test/box/ddl_collation_types.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- Check that collation is allowed only for strings, scalar and any types. 3 | format = {} 4 | | --- 5 | | ... 6 | format[1] = {'field1', 'unsigned', collation = 'unicode'} 7 | | --- 8 | | ... 9 | s = box.schema.create_space('test', {format = format}) 10 | | --- 11 | | - error: 'Failed to create space ''test'': collation is reasonable only for string, 12 | | scalar and any fields' 13 | | ... 14 | format[1] = {'field2', 'array', collation = 'unicode_ci'} 15 | | --- 16 | | ... 17 | s = box.schema.create_space('test', {format = format}) 18 | | --- 19 | | - error: 'Failed to create space ''test'': collation is reasonable only for string, 20 | | scalar and any fields' 21 | | ... 22 | -------------------------------------------------------------------------------- /test/box/ddl_collation_types.test.lua: -------------------------------------------------------------------------------- 1 | -- Check that collation is allowed only for strings, scalar and any types. 2 | format = {} 3 | format[1] = {'field1', 'unsigned', collation = 'unicode'} 4 | s = box.schema.create_space('test', {format = format}) 5 | format[1] = {'field2', 'array', collation = 'unicode_ci'} 6 | s = box.schema.create_space('test', {format = format}) 7 | -------------------------------------------------------------------------------- /test/box/ddl_collation_wrong_id.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- Check that error is raised when collation with wrong id is used. 3 | _space = box.space[box.schema.SPACE_ID] 4 | | --- 5 | | ... 6 | utils = require('utils') 7 | | --- 8 | | ... 9 | EMPTY_MAP = utils.setmap({}) 10 | | --- 11 | | ... 12 | format = {{name = 'field1', type = 'string', collation = 666}} 13 | | --- 14 | | ... 15 | surrogate_space = {12345, 1, 'test', 'memtx', 0, EMPTY_MAP, format} 16 | | --- 17 | | ... 18 | _space:insert(surrogate_space) 19 | | --- 20 | | - error: 'Wrong collation options (field 1): collation was not found by ID' 21 | | ... 22 | -------------------------------------------------------------------------------- /test/box/ddl_collation_wrong_id.test.lua: -------------------------------------------------------------------------------- 1 | -- Check that error is raised when collation with wrong id is used. 2 | _space = box.space[box.schema.SPACE_ID] 3 | utils = require('utils') 4 | EMPTY_MAP = utils.setmap({}) 5 | format = {{name = 'field1', type = 'string', collation = 666}} 6 | surrogate_space = {12345, 1, 'test', 'memtx', 0, EMPTY_MAP, format} 7 | _space:insert(surrogate_space) 8 | -------------------------------------------------------------------------------- /test/box/ddl_custom_fields_gh-2839.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- 3 | -- gh-2839: allow to store custom fields in field definition. 4 | -- 5 | format = {} 6 | | --- 7 | | ... 8 | format[1] = {name = 'field1', type = 'unsigned'} 9 | | --- 10 | | ... 11 | format[2] = {'field2', 'unsigned'} 12 | | --- 13 | | ... 14 | format[3] = {'field3', 'unsigned', custom_field = 'custom_value'} 15 | | --- 16 | | ... 17 | s = box.schema.create_space('test', {format = format}) 18 | | --- 19 | | ... 20 | s:format()[3].custom_field 21 | | --- 22 | | - custom_value 23 | | ... 24 | s:drop() 25 | | --- 26 | | ... 27 | -------------------------------------------------------------------------------- /test/box/ddl_custom_fields_gh-2839.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-2839: allow to store custom fields in field definition. 3 | -- 4 | format = {} 5 | format[1] = {name = 'field1', type = 'unsigned'} 6 | format[2] = {'field2', 'unsigned'} 7 | format[3] = {'field3', 'unsigned', custom_field = 'custom_value'} 8 | s = box.schema.create_space('test', {format = format}) 9 | s:format()[3].custom_field 10 | s:drop() 11 | -------------------------------------------------------------------------------- /test/box/ddl_no_collation.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- Check that error is raised when collation doesn't exists. 3 | format = {} 4 | | --- 5 | | ... 6 | format[1] = {'field1', 'unsigend', collation = 'test_coll'} 7 | | --- 8 | | ... 9 | s = box.schema.create_space('test', {format = format}) 10 | | --- 11 | | - error: 'Illegal parameters, format[1]: collation was not found by name ''test_coll''' 12 | | ... 13 | -------------------------------------------------------------------------------- /test/box/ddl_no_collation.test.lua: -------------------------------------------------------------------------------- 1 | -- Check that error is raised when collation doesn't exists. 2 | format = {} 3 | format[1] = {'field1', 'unsigend', collation = 'test_coll'} 4 | s = box.schema.create_space('test', {format = format}) 5 | -------------------------------------------------------------------------------- /test/box/ddl_parallel.test.lua: -------------------------------------------------------------------------------- 1 | env = require('test_run') 2 | test_run = env.new() 3 | 4 | fiber = require'fiber' 5 | 6 | -- simple test for parallel ddl execution 7 | _ = box.schema.space.create('test'):create_index('pk') 8 | 9 | ch = fiber.channel(2) 10 | 11 | test_run:cmd("setopt delimiter ';'") 12 | 13 | function f1() 14 | box.space.test:create_index('sec', {parts = {2, 'num'}}) 15 | ch:put(true) 16 | end; 17 | 18 | function f2() 19 | box.space.test:create_index('third', {parts = {3, 'string'}}) 20 | ch:put(true) 21 | end; 22 | 23 | test_run:cmd("setopt delimiter ''"); 24 | 25 | _ = {fiber.create(f1), fiber.create(f2)} 26 | 27 | ch:get() 28 | ch:get() 29 | 30 | _ = box.space.test:drop() 31 | -------------------------------------------------------------------------------- /test/box/ddl_truncate-gh-928.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | fiber = require'fiber' 3 | | --- 4 | | ... 5 | ch = fiber.channel(2) 6 | | --- 7 | | ... 8 | 9 | --issue #928 10 | space = box.schema.space.create('test_trunc') 11 | | --- 12 | | ... 13 | _ = space:create_index('pk') 14 | | --- 15 | | ... 16 | _ = box.space.test_trunc:create_index('i1', {type = 'hash', parts = {2, 'STR'}}) 17 | | --- 18 | | ... 19 | _ = box.space.test_trunc:create_index('i2', {type = 'hash', parts = {2, 'STR'}}) 20 | | --- 21 | | ... 22 | 23 | function test_trunc() space:truncate() ch:put(true) end 24 | | --- 25 | | ... 26 | 27 | _ = {fiber.create(test_trunc), fiber.create(test_trunc)} 28 | | --- 29 | | ... 30 | _ = {ch:get(), ch:get()} 31 | | --- 32 | | ... 33 | space:drop() 34 | | --- 35 | | ... 36 | -------------------------------------------------------------------------------- /test/box/ddl_truncate-gh-928.test.lua: -------------------------------------------------------------------------------- 1 | fiber = require'fiber' 2 | ch = fiber.channel(2) 3 | 4 | --issue #928 5 | space = box.schema.space.create('test_trunc') 6 | _ = space:create_index('pk') 7 | _ = box.space.test_trunc:create_index('i1', {type = 'hash', parts = {2, 'STR'}}) 8 | _ = box.space.test_trunc:create_index('i2', {type = 'hash', parts = {2, 'STR'}}) 9 | 10 | function test_trunc() space:truncate() ch:put(true) end 11 | 12 | _ = {fiber.create(test_trunc), fiber.create(test_trunc)} 13 | _ = {ch:get(), ch:get()} 14 | space:drop() 15 | -------------------------------------------------------------------------------- /test/box/engine.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "gh-4513-netbox-self-and-connect-interchangeable.test.lua": { 3 | "remote": {"remote": "true"}, 4 | "local": {"remote": "false"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/box/gh-2971-symbol-visibility.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | ffi = require('ffi') 3 | | --- 4 | | ... 5 | 6 | -- 7 | -- gh-2971: Tarantool should not hide symbols. Even those which 8 | -- are not a part of the public API. 9 | -- 10 | 11 | -- This symbol is not public, but should be defined. 12 | ffi.cdef[[ \ 13 | bool \ 14 | box_is_configured(void); \ 15 | ]] 16 | | --- 17 | | ... 18 | 19 | ffi.C.box_is_configured() 20 | | --- 21 | | - true 22 | | ... 23 | -------------------------------------------------------------------------------- /test/box/gh-2971-symbol-visibility.test.lua: -------------------------------------------------------------------------------- 1 | ffi = require('ffi') 2 | 3 | -- 4 | -- gh-2971: Tarantool should not hide symbols. Even those which 5 | -- are not a part of the public API. 6 | -- 7 | 8 | -- This symbol is not public, but should be defined. 9 | ffi.cdef[[ \ 10 | bool \ 11 | box_is_configured(void); \ 12 | ]] 13 | 14 | ffi.C.box_is_configured() 15 | -------------------------------------------------------------------------------- /test/box/gh-4513-netbox-self-and-connect-interchangeable.test.lua: -------------------------------------------------------------------------------- 1 | netbox = require('net.box') 2 | test_run = require('test_run').new() 3 | remote = test_run:get_cfg('remote') == 'true' 4 | 5 | nb = nil 6 | if remote then \ 7 | box.schema.user.grant('guest','super') \ 8 | nb = netbox.connect(box.cfg.listen) \ 9 | else \ 10 | nb = netbox.self \ 11 | end 12 | 13 | -- 14 | -- netbox:self and netbox:connect should work interchangeably 15 | -- 16 | type(nb:eval('return box.tuple.new{1}')) -- table 17 | type(nb:eval('return box.error.new(1, "test error")')) -- string 18 | type(nb:eval('return box.NULL')) -- cdata 19 | 20 | if remote then \ 21 | box.schema.user.revoke('guest', 'super') \ 22 | nb:close() \ 23 | end 24 | -------------------------------------------------------------------------------- /test/box/gh-4703-on_shutdown-bug.test.lua: -------------------------------------------------------------------------------- 1 | env = require('test_run') 2 | fio = require("fio") 3 | test_run = env.new() 4 | 5 | -- 6 | -- gh-4703: Make sure that on_shutdown triggers are executed after 7 | -- EOF. 8 | -- 9 | file_name = "on_shutdown_triggered.txt" 10 | test_run:cmd("setopt delimiter ';'"); 11 | on_shutdown_cmd = "box.ctl.on_shutdown(function() local fio = require('fio') ".. 12 | "fio.open('"..file_name.."', ".. 13 | "{'O_CREAT', 'O_TRUNC', 'O_WRONLY'}, 777):close() end)"; 14 | test_run:cmd("setopt delimiter ''"); 15 | server = io.popen('tarantool -i', 'w') 16 | server:write(on_shutdown_cmd) 17 | server:close() 18 | fio.path.lexists(file_name) == true 19 | os.remove(file_name) 20 | -------------------------------------------------------------------------------- /test/box/gh-4770-broken-pairs-for-space-objects.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- 3 | -- gh-4770: Iteration through space with Lua builtin pairs routine 4 | -- 5 | s = box.schema.create_space('test') 6 | | --- 7 | | ... 8 | -- Check whether __pairs is set for the space object, since Lua Fun 9 | -- handles it manually underneath. 10 | getmetatable(s).__pairs == s.pairs 11 | | --- 12 | | - true 13 | | ... 14 | -- Check whether pairs builtin behaviour doesn't change when the 15 | -- __pairs is set. 16 | keys = {} 17 | | --- 18 | | ... 19 | for k, v in pairs(s) do keys[k] = true end 20 | | --- 21 | | ... 22 | keys.name, keys.id, keys.engine 23 | | --- 24 | | - true 25 | | - true 26 | | - true 27 | | ... 28 | s:drop() 29 | | --- 30 | | ... 31 | -------------------------------------------------------------------------------- /test/box/gh-4770-broken-pairs-for-space-objects.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-4770: Iteration through space with Lua builtin pairs routine 3 | -- 4 | s = box.schema.create_space('test') 5 | -- Check whether __pairs is set for the space object, since Lua Fun 6 | -- handles it manually underneath. 7 | getmetatable(s).__pairs == s.pairs 8 | -- Check whether pairs builtin behaviour doesn't change when the 9 | -- __pairs is set. 10 | keys = {} 11 | for k, v in pairs(s) do keys[k] = true end 12 | keys.name, keys.id, keys.engine 13 | s:drop() 14 | -------------------------------------------------------------------------------- /test/box/hash_32bit_insert.test.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | -- 32-bit hash insert fields tests 3 | ------------------------------------------------------------------------------- 4 | hash = box.schema.space.create('tweedledum') 5 | tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'unsigned'}, unique = true }) 6 | 7 | -- Insert valid fields 8 | hash:insert{0, 'value1 v1.0', 'value2 v1.0'} 9 | hash:insert{1, 'value1 v1.0', 'value2 v1.0'} 10 | hash:insert{2, 'value1 v1.0', 'value2 v1.0'} 11 | hash:insert{3, 'value1 v1.0', 'value2 v1.0'} 12 | 13 | -- Insert invalid fields 14 | hash:insert{'invalid key', 'value1 v1.0', 'value2 v1.0'} 15 | 16 | hash:drop() 17 | -------------------------------------------------------------------------------- /test/box/hash_gh-1467.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- gh-1467: invalid iterator type 3 | 4 | space = box.schema.space.create('test') 5 | | --- 6 | | ... 7 | index = space:create_index('primary', { type = 'hash' }) 8 | | --- 9 | | ... 10 | space:select({1}, {iterator = 'BITS_ALL_SET' } ) 11 | | --- 12 | | - error: Index 'primary' (HASH) of space 'test' (memtx) does not support requested 13 | | iterator type 14 | | ... 15 | space:drop() 16 | | --- 17 | | ... 18 | -------------------------------------------------------------------------------- /test/box/hash_gh-1467.test.lua: -------------------------------------------------------------------------------- 1 | -- gh-1467: invalid iterator type 2 | 3 | space = box.schema.space.create('test') 4 | index = space:create_index('primary', { type = 'hash' }) 5 | space:select({1}, {iterator = 'BITS_ALL_SET' } ) 6 | space:drop() 7 | -------------------------------------------------------------------------------- /test/box/hash_gh-3907.test.lua: -------------------------------------------------------------------------------- 1 | -- gh-3907: check that integer numbers stored as MP_FLOAT/MP_DOUBLE 2 | -- are hashed as MP_INT/MP_UINT. 3 | 4 | ffi = require('ffi') 5 | s = box.schema.space.create('test') 6 | _ = s:create_index('primary', {type = 'hash', parts = {1, 'number'}}) 7 | s:insert{ffi.new('double', 0)} 8 | s:insert{ffi.new('double', -1)} 9 | s:insert{ffi.new('double', 9007199254740992)} 10 | s:insert{ffi.new('double', -9007199254740994)} 11 | s:get(0LL) 12 | s:get(-1LL) 13 | s:get(9007199254740992LL) 14 | s:get(-9007199254740994LL) 15 | s:drop() 16 | -------------------------------------------------------------------------------- /test/box/hash_gh-616.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- 3 | -- gh-616 "1-based indexing and 0-based error message 4 | -- 5 | _ = box.schema.create_space('test') 6 | | --- 7 | | ... 8 | _ = box.space.test:create_index('i',{parts={1,'string'}}) 9 | | --- 10 | | ... 11 | box.space.test:insert{1} 12 | | --- 13 | | - error: 'Tuple field 1 type does not match one required by operation: expected string' 14 | | ... 15 | box.space.test:drop() 16 | | --- 17 | | ... 18 | -------------------------------------------------------------------------------- /test/box/hash_gh-616.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-616 "1-based indexing and 0-based error message 3 | -- 4 | _ = box.schema.create_space('test') 5 | _ = box.space.test:create_index('i',{parts={1,'string'}}) 6 | box.space.test:insert{1} 7 | box.space.test:drop() 8 | -------------------------------------------------------------------------------- /test/box/hash_iterate.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | hash = box.schema.space.create('tweedledum') 3 | | --- 4 | | ... 5 | hi = hash:create_index('primary', { type = 'hash', parts = {1, 'unsigned'}, unique = true }) 6 | | --- 7 | | ... 8 | hash:insert{0} 9 | | --- 10 | | - [0] 11 | | ... 12 | hash:insert{16} 13 | | --- 14 | | - [16] 15 | | ... 16 | for _, tuple in hi:pairs(nil, {iterator = box.index.ALL}) do hash:delete{tuple[1]} end 17 | | --- 18 | | ... 19 | hash:drop() 20 | | --- 21 | | ... 22 | -------------------------------------------------------------------------------- /test/box/hash_iterate.test.lua: -------------------------------------------------------------------------------- 1 | hash = box.schema.space.create('tweedledum') 2 | hi = hash:create_index('primary', { type = 'hash', parts = {1, 'unsigned'}, unique = true }) 3 | hash:insert{0} 4 | hash:insert{16} 5 | for _, tuple in hi:pairs(nil, {iterator = box.index.ALL}) do hash:delete{tuple[1]} end 6 | hash:drop() 7 | -------------------------------------------------------------------------------- /test/box/hash_not_a_multikey.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- Hash index cannot be multikey. 3 | 4 | s = box.schema.space.create('test') 5 | | --- 6 | | ... 7 | _ = s:create_index('primary') 8 | | --- 9 | | ... 10 | _ = s:create_index('hash', {type = 'hash', parts = {{'[2][*]', 'unsigned'}}}) 11 | | --- 12 | | - error: 'Can''t create or modify index ''hash'' in space ''test'': HASH index cannot 13 | | be multikey' 14 | | ... 15 | s:drop() 16 | | --- 17 | | ... 18 | -------------------------------------------------------------------------------- /test/box/hash_not_a_multikey.test.lua: -------------------------------------------------------------------------------- 1 | -- Hash index cannot be multikey. 2 | 3 | s = box.schema.space.create('test') 4 | _ = s:create_index('primary') 5 | _ = s:create_index('hash', {type = 'hash', parts = {{'[2][*]', 'unsigned'}}}) 6 | s:drop() 7 | -------------------------------------------------------------------------------- /test/box/hash_string_insert.test.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | -- String hash inset fields tests 3 | ------------------------------------------------------------------------------- 4 | hash = box.schema.space.create('tweedledum') 5 | tmp = hash:create_index('primary', { type = 'hash', parts = {1, 'string'}, unique = true }) 6 | 7 | -- Insert valid fields 8 | hash:insert{'key 0', 'value1 v1.0', 'value2 v1.0'} 9 | hash:insert{'key 1', 'value1 v1.0', 'value2 v1.0'} 10 | hash:insert{'key 2', 'value1 v1.0', 'value2 v1.0'} 11 | hash:insert{'key 3', 'value1 v1.0', 'value2 v1.0'} 12 | 13 | hash:drop() 14 | -------------------------------------------------------------------------------- /test/box/hash_with_function.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- Hash index can not use function. 3 | 4 | s = box.schema.space.create('withdata') 5 | | --- 6 | | ... 7 | lua_code = [[function(tuple) return tuple[1] + tuple[2] end]] 8 | | --- 9 | | ... 10 | box.schema.func.create('s', {body = lua_code, is_deterministic = true, is_sandboxed = true}) 11 | | --- 12 | | ... 13 | _ = s:create_index('pk') 14 | | --- 15 | | ... 16 | _ = s:create_index('idx', {type = 'hash', func = box.func.s.id, parts = {{1, 'unsigned'}}}) 17 | | --- 18 | | - error: 'Can''t create or modify index ''idx'' in space ''withdata'': HASH index 19 | | can not use a function' 20 | | ... 21 | s:drop() 22 | | --- 23 | | ... 24 | box.schema.func.drop('s') 25 | | --- 26 | | ... 27 | -------------------------------------------------------------------------------- /test/box/hash_with_function.test.lua: -------------------------------------------------------------------------------- 1 | -- Hash index can not use function. 2 | 3 | s = box.schema.space.create('withdata') 4 | lua_code = [[function(tuple) return tuple[1] + tuple[2] end]] 5 | box.schema.func.create('s', {body = lua_code, is_deterministic = true, is_sandboxed = true}) 6 | _ = s:create_index('pk') 7 | _ = s:create_index('idx', {type = 'hash', func = box.func.s.id, parts = {{1, 'unsigned'}}}) 8 | s:drop() 9 | box.schema.func.drop('s') 10 | -------------------------------------------------------------------------------- /test/box/leak.test.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- gh-853 - memory leak on start if replace in xlog 3 | -- 4 | env = require('test_run') 5 | test_run = env.new() 6 | test_run:cmd("create server tiny with script='box/tiny.lua'") 7 | test_run:cmd("start server tiny") 8 | test_run:cmd("switch tiny") 9 | _ = box.schema.space.create('test') 10 | _ = box.space.test:create_index('pk') 11 | test_run:cmd("setopt delimiter ';'") 12 | for i=1, 500 do 13 | box.space.test:replace{1, string.rep('a', 50000)} 14 | -- or we run out of memory too soon 15 | collectgarbage('collect') 16 | end; 17 | test_run:cmd("setopt delimiter ''"); 18 | test_run:cmd('restart server tiny') 19 | box.space.test:len() 20 | box.space.test:drop() 21 | test_run:cmd("switch default") 22 | test_run:cmd("stop server tiny") 23 | test_run:cmd("cleanup server tiny") 24 | 25 | -------------------------------------------------------------------------------- /test/box/lua/cfg_bad_vinyl_dir.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | vinyl_dir = 'path/to/nowhere' 7 | } 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/box/lua/cfg_memory.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local LIMIT = tonumber(arg[1]) 4 | 5 | box.cfg{ 6 | wal_mode = 'none', 7 | memtx_memory = LIMIT, 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/box/lua/cfg_rtree.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | box.error.injection.set("ERRINJ_INDEX_RESERVE", true) 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | } 7 | require('console').listen(os.getenv('ADMIN')) 8 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 9 | -------------------------------------------------------------------------------- /test/box/lua/cfg_test1.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | } 7 | 8 | require('console').listen(os.getenv('ADMIN')) 9 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 10 | -------------------------------------------------------------------------------- /test/box/lua/cfg_test2.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 214748364, 7 | } 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 11 | -------------------------------------------------------------------------------- /test/box/lua/cfg_test3.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 214748364, 7 | vinyl_write_threads = 10, 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 12 | -------------------------------------------------------------------------------- /test/box/lua/cfg_test4.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | slab_alloc_factor = 3.14, 7 | vinyl_memory = 1024 * 1024, 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 12 | -------------------------------------------------------------------------------- /test/box/lua/cfg_test5.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | vinyl_memory = 1024 * 1024 * 1024 7 | } 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | box.schema.user.grant('guest', 'read,write,execute', 'universe') -------------------------------------------------------------------------------- /test/box/lua/cfg_test6.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | replication = "admin:test-cluster-cookie@" .. os.getenv("LISTEN"), 7 | replication_connect_timeout = 0.1, 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/box/lua/push.lua: -------------------------------------------------------------------------------- 1 | 2 | function push_collection(space, size, cid, ...) 3 | local append = { ... } 4 | local tuple = space:get{cid} 5 | if tuple == nil then 6 | return space:insert{cid, unpack(append)} 7 | end 8 | if #append == 0 then 9 | return tuple 10 | end 11 | tuple = tuple:transform( #tuple + 1, 0, unpack( append ) ) 12 | if #tuple - 1 > tonumber(size) then 13 | tuple = tuple:transform( 2, #tuple - 1 - tonumber(size) ) 14 | end 15 | return space:replace{tuple:unpack()} 16 | end 17 | -------------------------------------------------------------------------------- /test/box/lua/require_init.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | box.load_cfg() 3 | mod = require("require_mod") 4 | package_path = package.path 5 | package_cpath = package.cpath 6 | -------------------------------------------------------------------------------- /test/box/lua/require_mod.lua: -------------------------------------------------------------------------------- 1 | exports = {} 2 | 3 | function exports.test(a, b) 4 | return a+b 5 | end 6 | 7 | return exports 8 | -------------------------------------------------------------------------------- /test/box/net.box_bad_argument_gh-594.test.lua: -------------------------------------------------------------------------------- 1 | remote = require 'net.box' 2 | fiber = require 'fiber' 3 | test_run = require('test_run').new() 4 | 5 | -- #594: bad argument #1 to 'setmetatable' (table expected, got number) 6 | box.schema.func.create('dostring') 7 | box.schema.user.grant('guest', 'execute', 'function', 'dostring') 8 | test_run:cmd("setopt delimiter ';'") 9 | function gh594() 10 | local cn = remote.connect(box.cfg.listen) 11 | local ping = fiber.create(function() cn:ping() end) 12 | cn:call('dostring', {'return 2 + 2'}) 13 | cn:close() 14 | end; 15 | test_run:cmd("setopt delimiter ''"); 16 | gh594() 17 | box.schema.func.drop('dostring') 18 | -------------------------------------------------------------------------------- /test/box/net.box_get_connection_object.result: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | --- 3 | ... 4 | -- 5 | -- Check that it's possible to get connection object form net.box space 6 | -- 7 | space = box.schema.space.create('test', {format={{name="id", type="unsigned"}}}) 8 | --- 9 | ... 10 | space ~= nil 11 | --- 12 | - true 13 | ... 14 | _ = box.space.test:create_index('primary') 15 | --- 16 | ... 17 | box.schema.user.grant('guest','read,write,execute','space', 'test') 18 | --- 19 | ... 20 | c = net.connect(box.cfg.listen) 21 | --- 22 | ... 23 | c:ping() 24 | --- 25 | - true 26 | ... 27 | c.space.test ~= nil 28 | --- 29 | - true 30 | ... 31 | c.space.test.connection == c 32 | --- 33 | - true 34 | ... 35 | box.schema.user.revoke('guest','read,write,execute','space', 'test') 36 | --- 37 | ... 38 | c:close() 39 | --- 40 | ... 41 | -------------------------------------------------------------------------------- /test/box/net.box_get_connection_object.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | -- 4 | -- Check that it's possible to get connection object form net.box space 5 | -- 6 | 7 | space = box.schema.space.create('test', {format={{name="id", type="unsigned"}}}) 8 | space ~= nil 9 | _ = box.space.test:create_index('primary') 10 | box.schema.user.grant('guest','read,write,execute','space', 'test') 11 | 12 | c = net.connect(box.cfg.listen) 13 | 14 | c:ping() 15 | c.space.test ~= nil 16 | 17 | c.space.test.connection == c 18 | box.schema.user.revoke('guest','read,write,execute','space', 'test') 19 | c:close() 20 | -------------------------------------------------------------------------------- /test/box/net.box_gibberish_gh-3900.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | LISTEN = require('uri').parse(box.cfg.listen) 3 | 4 | -- 5 | -- gh-3900: tarantool can be crashed by sending gibberish to a 6 | -- binary socket 7 | -- 8 | socket = require("socket") 9 | sock = socket.tcp_connect(LISTEN.host, LISTEN.service) 10 | data = string.fromhex("6783000000000000000000000000000000000000000000800000C8000000000000000000000000000000000000000000FFFF210100373208000000FFFF000055AAEB66486472530D02000000000010A0350001008000001000000000000000000000000000D05700") 11 | sock:write(data) 12 | test_run:wait_log('default', 'ER_INVALID_MSGPACK: Invalid MsgPack %- packet body', nil, 10) 13 | sock:close() 14 | -------------------------------------------------------------------------------- /test/box/net.box_index_unique_flag_gh-4091.result: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | --- 3 | ... 4 | space = box.schema.space.create('test', {format={{name="id", type="unsigned"}}}) 5 | --- 6 | ... 7 | _ = box.space.test:create_index('primary') 8 | --- 9 | ... 10 | box.schema.user.grant('guest', 'read', 'space', 'test') 11 | --- 12 | ... 13 | c = net.connect(box.cfg.listen) 14 | --- 15 | ... 16 | -- 17 | -- gh-4091: index unique flag is always false. 18 | -- 19 | c.space.test.index.primary.unique 20 | --- 21 | - true 22 | ... 23 | c:close() 24 | --- 25 | ... 26 | space:drop() 27 | --- 28 | ... 29 | -------------------------------------------------------------------------------- /test/box/net.box_index_unique_flag_gh-4091.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | space = box.schema.space.create('test', {format={{name="id", type="unsigned"}}}) 4 | _ = box.space.test:create_index('primary') 5 | box.schema.user.grant('guest', 'read', 'space', 'test') 6 | 7 | c = net.connect(box.cfg.listen) 8 | 9 | -- 10 | -- gh-4091: index unique flag is always false. 11 | -- 12 | c.space.test.index.primary.unique 13 | 14 | c:close() 15 | space:drop() 16 | -------------------------------------------------------------------------------- /test/box/net.box_iproto_hangs_gh-3464.result: -------------------------------------------------------------------------------- 1 | msgpack = require 'msgpack' 2 | --- 3 | ... 4 | test_run = require('test_run').new() 5 | --- 6 | ... 7 | net = require('net.box') 8 | --- 9 | ... 10 | -- 11 | -- gh-3464: iproto hangs in 100% CPU when too big packet size 12 | -- is received due to size_t overflow. 13 | -- 14 | c = net:connect(box.cfg.listen) 15 | --- 16 | ... 17 | data = msgpack.encode(18400000000000000000)..'aaaaaaa' 18 | --- 19 | ... 20 | c._transport.perform_request(nil, nil, false, 'inject', nil, nil, nil, data) 21 | --- 22 | - null 23 | - Peer closed 24 | ... 25 | c:close() 26 | --- 27 | ... 28 | test_run:grep_log('default', 'too big packet size in the header') ~= nil 29 | --- 30 | - true 31 | ... 32 | -------------------------------------------------------------------------------- /test/box/net.box_iproto_hangs_gh-3464.test.lua: -------------------------------------------------------------------------------- 1 | msgpack = require 'msgpack' 2 | test_run = require('test_run').new() 3 | net = require('net.box') 4 | 5 | -- 6 | -- gh-3464: iproto hangs in 100% CPU when too big packet size 7 | -- is received due to size_t overflow. 8 | -- 9 | c = net:connect(box.cfg.listen) 10 | data = msgpack.encode(18400000000000000000)..'aaaaaaa' 11 | c._transport.perform_request(nil, nil, false, 'inject', nil, nil, nil, data) 12 | c:close() 13 | test_run:grep_log('default', 'too big packet size in the header') ~= nil 14 | -------------------------------------------------------------------------------- /test/box/net.box_leaks_gh-3629.test.lua: -------------------------------------------------------------------------------- 1 | fiber = require 'fiber' 2 | net = require('net.box') 3 | 4 | -- 5 | -- gh-3629: netbox leaks when a connection is closed deliberately 6 | -- and it has non-finished requests. 7 | -- 8 | ready = false 9 | ok = nil 10 | err = nil 11 | c = net:connect(box.cfg.listen) 12 | function do_long() while not ready do fiber.sleep(0.01) end end 13 | box.schema.func.create('do_long') 14 | box.schema.user.grant('guest', 'execute', 'function', 'do_long') 15 | f = fiber.create(function() ok, err = pcall(c.call, c, 'do_long') end) 16 | while f:status() ~= 'suspended' do fiber.sleep(0.01) end 17 | c:close() 18 | ready = true 19 | while not err do fiber.sleep(0.01) end 20 | ok, err 21 | -------------------------------------------------------------------------------- /test/box/net.box_password_gh-1545.result: -------------------------------------------------------------------------------- 1 | remote = require 'net.box' 2 | --- 3 | ... 4 | LISTEN = require('uri').parse(box.cfg.listen) 5 | --- 6 | ... 7 | -- #1545 empty password 8 | cn = remote.connect(LISTEN.host, LISTEN.service, { user = 'test' }) 9 | --- 10 | ... 11 | cn ~= nil 12 | --- 13 | - true 14 | ... 15 | cn:close() 16 | --- 17 | ... 18 | cn = remote.connect(LISTEN.host, LISTEN.service, { password = 'test' }) 19 | --- 20 | - error: 'net.box: user is not defined' 21 | ... 22 | cn ~= nil 23 | --- 24 | - true 25 | ... 26 | cn:close() 27 | --- 28 | ... 29 | -------------------------------------------------------------------------------- /test/box/net.box_password_gh-1545.test.lua: -------------------------------------------------------------------------------- 1 | remote = require 'net.box' 2 | LISTEN = require('uri').parse(box.cfg.listen) 3 | 4 | -- #1545 empty password 5 | cn = remote.connect(LISTEN.host, LISTEN.service, { user = 'test' }) 6 | cn ~= nil 7 | cn:close() 8 | cn = remote.connect(LISTEN.host, LISTEN.service, { password = 'test' }) 9 | cn ~= nil 10 | cn:close() 11 | -------------------------------------------------------------------------------- /test/box/net.box_pseudo_objects_gh-2401.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | net = require('net.box') 3 | 4 | test_run:cmd('create server connecter with script = "box/proxy.lua"') 5 | 6 | -- 7 | -- gh-2401 update pseudo objects not replace them 8 | -- 9 | space = box.schema.space.create('test') 10 | box.schema.user.grant('guest', 'read', 'space', 'test') 11 | c = net.connect(box.cfg.listen) 12 | cspace = c.space.test 13 | space.index.test_index == nil 14 | cspace.index.test_index == nil 15 | _ = space:create_index("test_index", {parts={1, 'string'}}) 16 | c:reload_schema() 17 | space.index.test_index ~= nil 18 | cspace.index.test_index ~= nil 19 | c.space.test.index.test_index ~= nil 20 | 21 | -- cleanup 22 | 23 | space:drop() 24 | -------------------------------------------------------------------------------- /test/box/net.box_reconnect_after.result: -------------------------------------------------------------------------------- 1 | fiber = require 'fiber' 2 | --- 3 | ... 4 | net = require('net.box') 5 | --- 6 | ... 7 | box.schema.user.grant('guest', 'execute', 'universe') 8 | --- 9 | ... 10 | -- 11 | -- Test a case, when netbox can not connect first time, but 12 | -- reconnect_after is set. 13 | -- 14 | c = net.connect('localhost:33333', {reconnect_after = 0.1, wait_connected = false}) 15 | --- 16 | ... 17 | while c.state ~= 'error_reconnect' do fiber.sleep(0.01) end 18 | --- 19 | ... 20 | c:close() 21 | --- 22 | ... 23 | box.schema.user.revoke('guest', 'execute', 'universe') 24 | --- 25 | ... 26 | c.state 27 | --- 28 | - closed 29 | ... 30 | c = nil 31 | --- 32 | ... 33 | -------------------------------------------------------------------------------- /test/box/net.box_reconnect_after.test.lua: -------------------------------------------------------------------------------- 1 | fiber = require 'fiber' 2 | net = require('net.box') 3 | 4 | box.schema.user.grant('guest', 'execute', 'universe') 5 | 6 | -- 7 | -- Test a case, when netbox can not connect first time, but 8 | -- reconnect_after is set. 9 | -- 10 | c = net.connect('localhost:33333', {reconnect_after = 0.1, wait_connected = false}) 11 | while c.state ~= 'error_reconnect' do fiber.sleep(0.01) end 12 | c:close() 13 | 14 | box.schema.user.revoke('guest', 'execute', 'universe') 15 | c.state 16 | c = nil 17 | -------------------------------------------------------------------------------- /test/box/net.box_remote_method_gh-544.test.lua: -------------------------------------------------------------------------------- 1 | remote = require 'net.box' 2 | 3 | LISTEN = require('uri').parse(box.cfg.listen) 4 | box.schema.user.create('netbox', { password = 'test' }) 5 | 6 | -- #544 usage for remote[point]method 7 | cn = remote.connect(LISTEN.host, LISTEN.service) 8 | 9 | box.schema.user.grant('guest', 'execute', 'universe') 10 | cn:close() 11 | cn = remote.connect(LISTEN.host, LISTEN.service) 12 | cn:eval('return true') 13 | cn.eval('return true') 14 | 15 | cn.ping() 16 | 17 | cn:close() 18 | 19 | remote.self:eval('return true') 20 | remote.self.eval('return true') 21 | box.schema.user.revoke('guest', 'execute', 'universe') 22 | box.schema.user.drop('netbox') 23 | -------------------------------------------------------------------------------- /test/box/net.box_session_type_gh-2642.result: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | --- 3 | ... 4 | -- 5 | -- gh-2642: box.session.type() 6 | -- 7 | box.schema.user.grant('guest','execute','universe') 8 | --- 9 | ... 10 | c = net.connect(box.cfg.listen) 11 | --- 12 | ... 13 | c:call("box.session.type") 14 | --- 15 | - binary 16 | ... 17 | c:close() 18 | --- 19 | ... 20 | box.schema.user.revoke('guest', 'execute', 'universe') 21 | --- 22 | ... 23 | -------------------------------------------------------------------------------- /test/box/net.box_session_type_gh-2642.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | -- 4 | -- gh-2642: box.session.type() 5 | -- 6 | 7 | box.schema.user.grant('guest','execute','universe') 8 | c = net.connect(box.cfg.listen) 9 | c:call("box.session.type") 10 | c:close() 11 | box.schema.user.revoke('guest', 'execute', 'universe') 12 | -------------------------------------------------------------------------------- /test/box/net.box_space_format_gh-2402.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | -- 4 | -- gh-2402 net.box doesn't support space:format() 5 | -- 6 | 7 | space = box.schema.space.create('test', {format={{name="id", type="unsigned"}}}) 8 | space ~= nil 9 | _ = box.space.test:create_index('primary') 10 | box.schema.user.grant('guest', 'read', 'space', 'test') 11 | 12 | c = net.connect(box.cfg.listen) 13 | 14 | c:ping() 15 | c.space.test ~= nil 16 | 17 | format = c.space.test:format() 18 | 19 | format[1] ~= nil 20 | format[1].name == "id" 21 | format[1].type == "unsigned" 22 | 23 | c.space.test:format({}) 24 | -------------------------------------------------------------------------------- /test/box/net.box_timeout_gh-1533.result: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | --- 3 | ... 4 | -- Tarantool < 1.7.1 compatibility (gh-1533) 5 | c = net.new(box.cfg.listen) 6 | --- 7 | ... 8 | c:ping() 9 | --- 10 | - true 11 | ... 12 | c:close() 13 | --- 14 | ... 15 | -------------------------------------------------------------------------------- /test/box/net.box_timeout_gh-1533.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | -- Tarantool < 1.7.1 compatibility (gh-1533) 4 | c = net.new(box.cfg.listen) 5 | c:ping() 6 | c:close() 7 | -------------------------------------------------------------------------------- /test/box/net.box_upsert_gh-970.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | -- gh-970 gh-971 UPSERT over network 4 | _ = box.schema.space.create('test') 5 | _ = box.space.test:create_index('primary', {type = 'TREE', parts = {1,'unsigned'}}) 6 | _ = box.space.test:create_index('covering', {type = 'TREE', parts = {1,'unsigned',3,'string',2,'unsigned'}}) 7 | _ = box.space.test:insert{1, 2, "string"} 8 | box.schema.user.grant('guest', 'read,write', 'space', 'test') 9 | c = net:connect(box.cfg.listen) 10 | c.space.test:select{} 11 | c.space.test:upsert({1, 2, 'nothing'}, {{'+', 2, 1}}) -- common update 12 | c.space.test:select{} 13 | c.space.test:upsert({2, 4, 'something'}, {{'+', 2, 1}}) -- insert 14 | c.space.test:select{} 15 | c.space.test:upsert({2, 4, 'nothing'}, {{'+', 3, 100500}}) -- wrong operation 16 | c.space.test:select{} 17 | -------------------------------------------------------------------------------- /test/box/net.box_uri_first_arg_gh-398.test.lua: -------------------------------------------------------------------------------- 1 | remote = require 'net.box' 2 | 3 | LISTEN = require('uri').parse(box.cfg.listen) 4 | box.schema.user.create('netbox', { password = 'test' }) 5 | 6 | -- uri as the first argument 7 | uri = string.format('%s:%s@%s:%s', 'netbox', 'test', LISTEN.host, LISTEN.service) 8 | 9 | cn = remote.new(uri) 10 | cn:ping() 11 | cn:close() 12 | 13 | uri = string.format('%s@%s:%s', 'netbox', LISTEN.host, LISTEN.service) 14 | cn = remote.new(uri) 15 | cn ~= nil, cn.state, cn.error 16 | cn:close() 17 | -- don't merge creds from uri & opts 18 | remote.new(uri, { password = 'test' }) 19 | cn = remote.new(uri, { user = 'netbox', password = 'test' }) 20 | cn:ping() 21 | cn:close() 22 | 23 | box.schema.user.drop('netbox') 24 | -------------------------------------------------------------------------------- /test/box/net.box_wait_connected_gh-3856.result: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | --- 3 | ... 4 | -- 5 | -- gh-3856: wait_connected = false is ignored. 6 | -- 7 | do \ 8 | local c = net.connect('8.8.8.8:1234', {wait_connected = false}) \ 9 | local res = c.state \ 10 | c:close() \ 11 | return res \ 12 | end 13 | --- 14 | - initial 15 | ... 16 | -------------------------------------------------------------------------------- /test/box/net.box_wait_connected_gh-3856.test.lua: -------------------------------------------------------------------------------- 1 | net = require('net.box') 2 | 3 | -- 4 | -- gh-3856: wait_connected = false is ignored. 5 | -- 6 | do \ 7 | local c = net.connect('8.8.8.8:1234', {wait_connected = false}) \ 8 | local res = c.state \ 9 | c:close() \ 10 | return res \ 11 | end 12 | -------------------------------------------------------------------------------- /test/box/net_msg_max.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # Disabled on FreeBSD due to flaky fail #4271. 8 | if platform.system() == 'FreeBSD': 9 | self.skip = 1 10 | 11 | # vim: set ft=python: 12 | -------------------------------------------------------------------------------- /test/box/on_shutdown.skipcond: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # Disabled at ASAN build due to issue #4360. 4 | if os.getenv("ASAN") == 'ON': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/box/proxy.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 107374182, 7 | pid_file = "tarantool.pid", 8 | wal_max_size = 2500 9 | } 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/box/rtree_errinj.test.lua: -------------------------------------------------------------------------------- 1 | errinj = require('box.error.injection') 2 | 3 | s = box.schema.space.create('spatial') 4 | 5 | s:create_index('primary') 6 | s:create_index('spatial', { type = 'rtree', unique = false, parts = {2, 'array'}}) 7 | 8 | errinj.set("ERRINJ_INDEX_ALLOC", true) 9 | s:insert{1,{0,0}} 10 | s:insert{2,{0,10}} 11 | s:insert{3,{0,50}} 12 | s:insert{4,{10,0}} 13 | s:insert{5,{50,0}} 14 | s:insert{6,{10,10}} 15 | s:insert{7,{10,50}} 16 | s:insert{8,{50,10}} 17 | s:insert{9,{50,50}} 18 | errinj.set("ERRINJ_INDEX_ALLOC", false) 19 | 20 | s:drop() 21 | -------------------------------------------------------------------------------- /test/box/rtree_point.test.lua: -------------------------------------------------------------------------------- 1 | s = box.schema.space.create('spatial') 2 | _ = s:create_index('primary') 3 | _ = s:create_index('spatial', { type = 'rtree', unique = false, parts = {2, 'array'}}) 4 | 5 | s:insert{1,{0,0}} 6 | s:insert{2,{0,10}} 7 | s:insert{3,{0,50}} 8 | s:insert{4,{10,0}} 9 | s:insert{5,{50,0}} 10 | s:insert{6,{10,10}} 11 | s:insert{7,{10,50}} 12 | s:insert{8,{50,10}} 13 | s:insert{9,{50,50}} 14 | 15 | -- select all records 16 | s.index.spatial:select({}, {iterator = 'ALL'}) 17 | -- select records belonging to rectangle (0,0,10,10) 18 | s.index.spatial:select({0,0,10,10}, {iterator = 'LE'}) 19 | -- select records with coordinates (10,10) 20 | s.index.spatial:select({10,10}, {iterator = 'EQ'}) 21 | -- select neighbors of point (5,5) 22 | s.index.spatial:select({5,5}, {iterator = 'NEIGHBOR'}) 23 | 24 | s:drop() 25 | -------------------------------------------------------------------------------- /test/box/schema_reload.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/box/sql-update-with-nested-select.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | 3 | -- box.cfg() 4 | 5 | -- create space 6 | box.execute("CREATE TABLE t1(a integer primary key, b int UNIQUE, e int);"); 7 | 8 | -- Seed entries 9 | box.execute("INSERT INTO t1 VALUES(1,4,6);"); 10 | box.execute("INSERT INTO t1 VALUES(2,5,7);"); 11 | 12 | -- Both entries must be updated 13 | box.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);"); 14 | 15 | -- Check 16 | box.execute("SELECT e FROM t1"); 17 | 18 | -- Cleanup 19 | box.execute("DROP TABLE t1;"); 20 | 21 | -- Debug 22 | -- require("console").start() 23 | -------------------------------------------------------------------------------- /test/box/tiny.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 50 * 1024 * 1024, 7 | pid_file = "tarantool.pid", 8 | force_recovery = false, 9 | slab_alloc_factor = 1.1, 10 | } 11 | 12 | require('console').listen(os.getenv('ADMIN')) 13 | box.once('init', function() 14 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 15 | end) 16 | -------------------------------------------------------------------------------- /test/box/tuple.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/box/upsert_errinj.result: -------------------------------------------------------------------------------- 1 | env = require('test_run') 2 | --- 3 | ... 4 | test_run = env.new() 5 | --- 6 | ... 7 | s = box.schema.create_space('tweedledum') 8 | --- 9 | ... 10 | index = s:create_index('pk') 11 | --- 12 | ... 13 | errinj = box.error.injection 14 | --- 15 | ... 16 | errinj.set("ERRINJ_TUPLE_ALLOC", true) 17 | --- 18 | - ok 19 | ... 20 | s:upsert({111, '111', 222, '222'}, {{'!', 5, '!'}}) 21 | --- 22 | - error: Failed to allocate 26 bytes in slab allocator for memtx_tuple 23 | ... 24 | errinj.set("ERRINJ_TUPLE_ALLOC", false) 25 | --- 26 | - ok 27 | ... 28 | s:select{111} 29 | --- 30 | - [] 31 | ... 32 | s:drop() 33 | --- 34 | ... 35 | -------------------------------------------------------------------------------- /test/box/upsert_errinj.test.lua: -------------------------------------------------------------------------------- 1 | env = require('test_run') 2 | test_run = env.new() 3 | s = box.schema.create_space('tweedledum') 4 | index = s:create_index('pk') 5 | 6 | errinj = box.error.injection 7 | errinj.set("ERRINJ_TUPLE_ALLOC", true) 8 | s:upsert({111, '111', 222, '222'}, {{'!', 5, '!'}}) 9 | errinj.set("ERRINJ_TUPLE_ALLOC", false) 10 | s:select{111} 11 | 12 | s:drop() 13 | -------------------------------------------------------------------------------- /test/engine/box.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | local vinyl = { 5 | threads = 3, 6 | range_size=1024*64, 7 | page_size=1024, 8 | } 9 | 10 | box.cfg{ 11 | listen = os.getenv("LISTEN"), 12 | memtx_memory = 107374182, 13 | pid_file = "tarantool.pid", 14 | wal_max_size = 2500, 15 | vinyl_read_threads = 2, 16 | vinyl_write_threads = 3, 17 | vinyl_range_size = 64 * 1024, 18 | vinyl_page_size = 1024, 19 | memtx_max_tuple_size = 1024 * 1024 * 100, 20 | vinyl_max_tuple_size = 1024 * 1024 * 100, 21 | } 22 | 23 | require('console').listen(os.getenv('ADMIN')) 24 | -------------------------------------------------------------------------------- /test/engine/conflict.lua: -------------------------------------------------------------------------------- 1 | 2 | function test_conflict() 3 | local test_run = require('test_run') 4 | local inspector = test_run.new() 5 | local engine = inspector:get_cfg('engine') 6 | 7 | local s = box.schema.space.create('tester', {engine=engine}); 8 | local i = s:create_index('test_index', {type = 'tree', parts = {1, 'string'}}); 9 | 10 | local commits = 0 11 | local function conflict() 12 | box.begin() 13 | s:replace({'test'}) 14 | box.commit() 15 | commits = commits + 1 16 | end; 17 | 18 | local fiber = require('fiber'); 19 | local f0 = fiber.create(conflict); 20 | local f1 = fiber.create(conflict); -- conflict 21 | fiber.sleep(0); 22 | 23 | s:drop(); 24 | return commits 25 | end 26 | -------------------------------------------------------------------------------- /test/engine/conflict.result: -------------------------------------------------------------------------------- 1 | dofile('conflict.lua') 2 | --- 3 | ... 4 | test_conflict() 5 | --- 6 | - 2 7 | ... 8 | -------------------------------------------------------------------------------- /test/engine/conflict.test.lua: -------------------------------------------------------------------------------- 1 | 2 | dofile('conflict.lua') 3 | 4 | test_conflict() 5 | -------------------------------------------------------------------------------- /test/engine/engine.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "*": { 3 | "memtx": {"engine": "memtx"}, 4 | "vinyl": {"engine": "vinyl"} 5 | }, 6 | "func_index.test.lua": { 7 | "memtx": {"engine": "memtx"} 8 | }, 9 | "gh-4973-concurrent-alter-fails.test.lua": { 10 | "memtx": {"engine": "memtx"} 11 | } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/engine/errinj.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run') 2 | inspector = test_run.new() 3 | engine = inspector:get_cfg('engine') 4 | errinj = box.error.injection 5 | 6 | -- truncation rollback should not crash 7 | s = box.schema.space.create('truncate_rollback', {engine = engine}) 8 | _ = s:create_index('pk') 9 | _ = s:create_index('sk', {parts = {1, 'int'}}) 10 | for i = 1, 10 do s:replace({i, i}) end 11 | errinj.set('ERRINJ_WAL_IO', true) 12 | s:truncate() 13 | errinj.set('ERRINJ_WAL_IO', false) 14 | s:select() 15 | s:drop() 16 | -------------------------------------------------------------------------------- /test/engine/params.result: -------------------------------------------------------------------------------- 1 | --init 2 | test_run = require('test_run') 3 | --- 4 | ... 5 | inspector = test_run.new() 6 | --- 7 | ... 8 | engine = inspector:get_cfg('engine') 9 | --- 10 | ... 11 | s = box.schema.create_space('engine', {engine=engine}) 12 | --- 13 | ... 14 | i = s:create_index('primary') 15 | --- 16 | ... 17 | --test example for memtx and vinyl 18 | box.space.engine:insert{1,2,3} 19 | --- 20 | - [1, 2, 3] 21 | ... 22 | box.space.engine:select{} 23 | --- 24 | - - [1, 2, 3] 25 | ... 26 | -- cleanup 27 | box.space.engine:drop() 28 | --- 29 | ... 30 | -------------------------------------------------------------------------------- /test/engine/params.test.lua: -------------------------------------------------------------------------------- 1 | --init 2 | test_run = require('test_run') 3 | inspector = test_run.new() 4 | engine = inspector:get_cfg('engine') 5 | 6 | s = box.schema.create_space('engine', {engine=engine}) 7 | i = s:create_index('primary') 8 | 9 | --test example for memtx and vinyl 10 | box.space.engine:insert{1,2,3} 11 | box.space.engine:select{} 12 | 13 | 14 | -- cleanup 15 | box.space.engine:drop() 16 | -------------------------------------------------------------------------------- /test/engine/recover_drop.test.lua: -------------------------------------------------------------------------------- 1 | -- recover dropped spaces 2 | 3 | env = require('test_run') 4 | test_run = env.new() 5 | test_run:cmd('restart server default') 6 | engine = test_run:get_cfg('engine') 7 | 8 | space = box.schema.space.create('test', { engine = engine }) 9 | index = space:create_index('primary') 10 | for key = 1, 351 do space:insert({key}) end 11 | space:drop() 12 | 13 | space = box.schema.space.create('test', { engine = engine }) 14 | index = space:create_index('primary') 15 | for key = 500, 1000 do space:insert({key}) end 16 | 17 | test_run:cmd('restart server default') 18 | 19 | space = box.space['test'] 20 | index = space.index['primary'] 21 | index:select({}, {iterator = box.index.ALL}) 22 | space:drop() 23 | 24 | test_run:cmd('restart server default with cleanup=1') 25 | -------------------------------------------------------------------------------- /test/engine/recover_snapshot.test.lua: -------------------------------------------------------------------------------- 1 | 2 | -- write data recover from latest snapshot 3 | 4 | env = require('test_run') 5 | test_run = env.new() 6 | test_run:cmd('restart server default') 7 | engine = test_run:get_cfg('engine') 8 | 9 | space = box.schema.space.create('test', { engine = engine }) 10 | index = space:create_index('primary') 11 | 12 | space:insert({0}) 13 | box.snapshot() 14 | 15 | test_run:cmd('restart server default') 16 | 17 | space = box.space['test'] 18 | index = space.index['primary'] 19 | index:select({}, {iterator = box.index.ALL}) 20 | 21 | for key = 1, 351 do space:insert({key}) end 22 | box.snapshot() 23 | 24 | test_run:cmd('restart server default') 25 | 26 | space = box.space['test'] 27 | index = space.index['primary'] 28 | index:select({}, {iterator = box.index.ALL}) 29 | space:drop() 30 | -------------------------------------------------------------------------------- /test/engine/recover_wal.test.lua: -------------------------------------------------------------------------------- 1 | 2 | -- write data recover from logs only 3 | 4 | env = require('test_run') 5 | test_run = env.new() 6 | test_run:cmd('restart server default') 7 | 8 | engine = test_run:get_cfg('engine') 9 | space = box.schema.space.create('test', { engine = engine }) 10 | index = space:create_index('primary') 11 | 12 | space:insert({0}) 13 | 14 | test_run:cmd('restart server default') 15 | 16 | space = box.space['test'] 17 | index = space.index['primary'] 18 | index:select({}, {iterator = box.index.ALL}) 19 | 20 | for key = 1, 1000 do space:insert({key}) end 21 | 22 | test_run:cmd('restart server default') 23 | 24 | space = box.space['test'] 25 | index = space.index['primary'] 26 | index:select({}, {iterator = box.index.ALL}) 27 | space:drop() 28 | test_run:cmd('restart server default with cleanup=1') 29 | -------------------------------------------------------------------------------- /test/engine/replica_join.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OSX due to fail #4370. 4 | if platform.system() == 'Darwin': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/engine/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = tarantool multiengine tests 4 | script = box.lua 5 | use_unix_sockets = True 6 | use_unix_sockets_iproto = True 7 | release_disabled = errinj.test.lua errinj_ddl.test.lua 8 | config = engine.cfg 9 | #disabled = replica_join.test.lua 10 | lua_libs = conflict.lua ../box/lua/utils.lua ../box/lua/push.lua 11 | is_parallel = True 12 | pretest_clean = True 13 | fragile = recover_wal.test.lua ; gh-3767 14 | ddl.test.lua ; gh-4353 15 | -------------------------------------------------------------------------------- /test/engine/uuid.test.lua: -------------------------------------------------------------------------------- 1 | env = require('test_run') 2 | test_run = env.new() 3 | engine = test_run:get_cfg('engine') 4 | 5 | uuid = require('uuid') 6 | ffi = require('ffi') 7 | 8 | -- Check uuid indices (gh-4268). 9 | _ = box.schema.space.create('test', {engine=engine}) 10 | _ = box.space.test:create_index('pk', {parts={1,'uuid'}}) 11 | 12 | for i = 1,16 do\ 13 | box.space.test:insert{uuid.new()}\ 14 | end 15 | 16 | a = box.space.test:select{} 17 | err = nil 18 | for i = 1, #a - 1 do\ 19 | if tostring(a[i][1]) >= tostring(a[i+1][1]) then\ 20 | err = {a[i][1], a[i+1][1]}\ 21 | break\ 22 | end\ 23 | end 24 | 25 | err 26 | 27 | box.space.test:drop() 28 | -------------------------------------------------------------------------------- /test/engine_long/box.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | require('suite') 4 | 5 | os.execute("rm -rf vinyl_test") 6 | os.execute("mkdir -p vinyl_test") 7 | 8 | box.cfg { 9 | listen = os.getenv("LISTEN"), 10 | memtx_memory = 107374182, 11 | pid_file = "tarantool.pid", 12 | vinyl_dir = "./vinyl_test", 13 | vinyl_memory = 107374182, 14 | vinyl_read_threads = 3, 15 | vinyl_write_threads = 5, 16 | vinyl_range_size = 1024 * 1024, 17 | vinyl_page_size = 4 * 1024, 18 | } 19 | 20 | require('console').listen(os.getenv('ADMIN')) 21 | -------------------------------------------------------------------------------- /test/engine_long/delete_insert.result: -------------------------------------------------------------------------------- 1 | test_run = require('test_run') 2 | --- 3 | ... 4 | inspector = test_run.new() 5 | --- 6 | ... 7 | engine = inspector:get_cfg('engine') 8 | --- 9 | ... 10 | iterations = 100000 11 | --- 12 | ... 13 | math.randomseed(1) 14 | --- 15 | ... 16 | delete_insert(engine, iterations) 17 | --- 18 | - - 100000 19 | - IAKGPQANAOSLARIFIBKB 20 | ... 21 | -------------------------------------------------------------------------------- /test/engine_long/delete_insert.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run') 2 | inspector = test_run.new() 3 | engine = inspector:get_cfg('engine') 4 | iterations = 100000 5 | math.randomseed(1) 6 | delete_insert(engine, iterations) 7 | -------------------------------------------------------------------------------- /test/engine_long/delete_replace_update.test.lua: -------------------------------------------------------------------------------- 1 | engine_name = 'memtx' 2 | iterations = 100000 3 | 4 | math.randomseed(1) 5 | delete_replace_update(engine_name, iterations) 6 | 7 | math.randomseed(2) 8 | delete_replace_update(engine_name, iterations) 9 | 10 | math.randomseed(3) 11 | delete_replace_update(engine_name, iterations) 12 | 13 | math.randomseed(4) 14 | delete_replace_update(engine_name, iterations) 15 | 16 | math.randomseed(5) 17 | delete_replace_update(engine_name, iterations) 18 | -------------------------------------------------------------------------------- /test/engine_long/engine.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "*": { 3 | "memtx": {"engine": "memtx"}, 4 | "vinyl": {"engine": "vinyl"} 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/engine_long/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = tarantool engine stress tests 4 | script = box.lua 5 | long_run = delete_replace_update.test.lua delete_insert.test.lua 6 | lua_libs = suite.lua 7 | use_unix_sockets = True 8 | use_unix_sockets_iproto = True 9 | config = engine.cfg 10 | is_parallel = True 11 | pretest_clean = True 12 | -------------------------------------------------------------------------------- /test/long_run-py/box.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | require('suite') 4 | 5 | os.execute("rm -rf vinyl_test") 6 | os.execute("mkdir -p vinyl_test") 7 | 8 | box.cfg { 9 | listen = os.getenv("LISTEN"), 10 | memtx_memory = 107374182, 11 | pid_file = "tarantool.pid", 12 | vinyl_dir = "./vinyl_test", 13 | vinyl_read_threads = 3, 14 | vinyl_write_threads = 5, 15 | } 16 | 17 | require('console').listen(os.getenv('ADMIN')) 18 | -------------------------------------------------------------------------------- /test/long_run-py/finalizers.result: -------------------------------------------------------------------------------- 1 | Expected error: 2 | -------------------------------------------------------------------------------- /test/long_run-py/finalizers.test.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import re 4 | import yaml 5 | from lib.tarantool_server import TarantoolServer 6 | 7 | server = TarantoolServer(server.ini) 8 | server.script = 'long_run-py/lua/finalizers.lua' 9 | server.vardir = os.path.join(server.vardir, 'finalizers') 10 | server.crash_expected = True 11 | try: 12 | server.deploy() 13 | except: 14 | print "Expected error:", sys.exc_info()[0] 15 | else: 16 | print "Error! exception did not occur" 17 | -------------------------------------------------------------------------------- /test/long_run-py/lua/finalizers.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | function on_gc(t) 4 | end; 5 | 6 | function test_finalizers() 7 | local result = {} 8 | local i = 1 9 | local ffi = require('ffi') 10 | while true do 11 | result[i] = ffi.gc(ffi.cast('void *', 0), on_gc) 12 | i = i + 1 13 | end 14 | return "done" 15 | end; 16 | 17 | test_finalizers() 18 | test_finalizers() 19 | 20 | -------------------------------------------------------------------------------- /test/long_run-py/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = long running tests 4 | script = box.lua 5 | long_run = finalizers.test.py 6 | valgrind_disabled = 7 | release_disabled = 8 | lua_libs = suite.lua 9 | use_unix_sockets = True 10 | use_unix_sockets_iproto = True 11 | is_parallel = True 12 | -------------------------------------------------------------------------------- /test/replication-py/failed.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | memtx_memory = 107374182, 7 | }) 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/replication-py/master.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | memtx_memory = 107374182, 6 | replication_timeout = 0.1 7 | }) 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/replication-py/panic.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | memtx_memory = 107374182, 6 | force_recovery = true, 7 | }) 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/replication-py/replica.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | box_cfg_done = false 3 | 4 | require('console').listen(os.getenv('ADMIN')) 5 | 6 | box.cfg({ 7 | listen = os.getenv("LISTEN"), 8 | replication = os.getenv("MASTER"), 9 | memtx_memory = 107374182, 10 | replication_timeout = 0.1 11 | }) 12 | 13 | box_cfg_done = true 14 | -------------------------------------------------------------------------------- /test/replication-py/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | script = master.lua 4 | description = tarantool/box, replication 5 | is_parallel = True 6 | fragile = init_storage.test.py ; gh-4949 7 | conflict.test.py ; gh-4980 8 | -------------------------------------------------------------------------------- /test/replication-py/uuid_mismatch.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | replicaset_uuid = "12345678-abcd-abcd-abcd-123456789000", 7 | }) 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/replication/anon.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | memtx_memory = 107374182, 7 | replication_timeout = 0.1, 8 | replication_connect_timeout = 0.5, 9 | read_only=true, 10 | replication_anon=true, 11 | }) 12 | 13 | require('console').listen(os.getenv('ADMIN')) 14 | -------------------------------------------------------------------------------- /test/replication/anon1.lua: -------------------------------------------------------------------------------- 1 | anon.lua -------------------------------------------------------------------------------- /test/replication/anon2.lua: -------------------------------------------------------------------------------- 1 | anon.lua -------------------------------------------------------------------------------- /test/replication/autobootstrap1.lua: -------------------------------------------------------------------------------- 1 | autobootstrap.lua -------------------------------------------------------------------------------- /test/replication/autobootstrap2.lua: -------------------------------------------------------------------------------- 1 | autobootstrap.lua -------------------------------------------------------------------------------- /test/replication/autobootstrap3.lua: -------------------------------------------------------------------------------- 1 | autobootstrap.lua -------------------------------------------------------------------------------- /test/replication/autobootstrap_guest1.lua: -------------------------------------------------------------------------------- 1 | autobootstrap_guest.lua -------------------------------------------------------------------------------- /test/replication/autobootstrap_guest2.lua: -------------------------------------------------------------------------------- 1 | autobootstrap_guest.lua -------------------------------------------------------------------------------- /test/replication/autobootstrap_guest3.lua: -------------------------------------------------------------------------------- 1 | autobootstrap_guest.lua -------------------------------------------------------------------------------- /test/replication/box_set_replication_stress.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | test_run = require('test_run').new() 3 | | --- 4 | | ... 5 | SERVERS = {'master_quorum1', 'master_quorum2'} 6 | | --- 7 | | ... 8 | 9 | -- Deploy a cluster. 10 | test_run:create_cluster(SERVERS) 11 | | --- 12 | | ... 13 | test_run:wait_fullmesh(SERVERS) 14 | | --- 15 | | ... 16 | 17 | test_run:cmd("switch master_quorum1") 18 | | --- 19 | | - true 20 | | ... 21 | repl = box.cfg.replication 22 | | --- 23 | | ... 24 | for i = 1, 1000 do \ 25 | box.cfg{replication = ""} \ 26 | box.cfg{replication = repl} \ 27 | end 28 | | --- 29 | | ... 30 | test_run:cmd("switch default") 31 | | --- 32 | | - true 33 | | ... 34 | 35 | -- Cleanup. 36 | test_run:drop_cluster(SERVERS) 37 | | --- 38 | | ... 39 | -------------------------------------------------------------------------------- /test/replication/box_set_replication_stress.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | SERVERS = {'master_quorum1', 'master_quorum2'} 3 | 4 | -- Deploy a cluster. 5 | test_run:create_cluster(SERVERS) 6 | test_run:wait_fullmesh(SERVERS) 7 | 8 | test_run:cmd("switch master_quorum1") 9 | repl = box.cfg.replication 10 | for i = 1, 1000 do \ 11 | box.cfg{replication = ""} \ 12 | box.cfg{replication = repl} \ 13 | end 14 | test_run:cmd("switch default") 15 | 16 | -- Cleanup. 17 | test_run:drop_cluster(SERVERS) 18 | -------------------------------------------------------------------------------- /test/replication/ddl.result: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | --- 3 | ... 4 | SERVERS = { 'ddl1', 'ddl2', 'ddl3', 'ddl4' } 5 | --- 6 | ... 7 | -- Deploy a cluster. 8 | test_run:create_cluster(SERVERS, "replication", {args="0.1"}) 9 | --- 10 | ... 11 | test_run:wait_fullmesh(SERVERS) 12 | --- 13 | ... 14 | test_run:cmd("switch ddl1") 15 | --- 16 | - true 17 | ... 18 | test_run = require('test_run').new() 19 | --- 20 | ... 21 | fiber = require('fiber') 22 | --- 23 | ... 24 | for i = 0, 199 do box.space.test:replace({1, 2, 3, 4}) box.space.test:truncate() box.space.test:truncate() end 25 | --- 26 | ... 27 | fiber.sleep(0.001) 28 | --- 29 | ... 30 | test_run:cmd("switch default") 31 | --- 32 | - true 33 | ... 34 | test_run:drop_cluster(SERVERS) 35 | --- 36 | ... 37 | -------------------------------------------------------------------------------- /test/replication/ddl.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | 3 | SERVERS = { 'ddl1', 'ddl2', 'ddl3', 'ddl4' } 4 | 5 | -- Deploy a cluster. 6 | test_run:create_cluster(SERVERS, "replication", {args="0.1"}) 7 | test_run:wait_fullmesh(SERVERS) 8 | test_run:cmd("switch ddl1") 9 | test_run = require('test_run').new() 10 | fiber = require('fiber') 11 | 12 | for i = 0, 199 do box.space.test:replace({1, 2, 3, 4}) box.space.test:truncate() box.space.test:truncate() end 13 | 14 | fiber.sleep(0.001) 15 | 16 | test_run:cmd("switch default") 17 | test_run:drop_cluster(SERVERS) 18 | 19 | -------------------------------------------------------------------------------- /test/replication/ddl1.lua: -------------------------------------------------------------------------------- 1 | ddl.lua -------------------------------------------------------------------------------- /test/replication/ddl2.lua: -------------------------------------------------------------------------------- 1 | ddl.lua -------------------------------------------------------------------------------- /test/replication/ddl3.lua: -------------------------------------------------------------------------------- 1 | ddl.lua -------------------------------------------------------------------------------- /test/replication/ddl4.lua: -------------------------------------------------------------------------------- 1 | ddl.lua -------------------------------------------------------------------------------- /test/replication/er_load1.lua: -------------------------------------------------------------------------------- 1 | er_load.lua -------------------------------------------------------------------------------- /test/replication/er_load2.lua: -------------------------------------------------------------------------------- 1 | er_load.lua -------------------------------------------------------------------------------- /test/replication/hot_standby.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | require('console').listen(os.getenv('ADMIN')) 4 | box.cfg({ 5 | listen = os.getenv("MASTER"), 6 | memtx_memory = 107374182, 7 | custom_proc_title = "hot_standby", 8 | wal_dir = "master", 9 | memtx_dir = "master", 10 | vinyl_dir = "master", 11 | hot_standby = true, 12 | replication_timeout = 0.1, 13 | }) 14 | 15 | -------------------------------------------------------------------------------- /test/replication/lua/rlimit.lua: -------------------------------------------------------------------------------- 1 | 2 | ffi = require('ffi') 3 | pcall(ffi.cdef, [[ 4 | typedef long rlim_t; 5 | struct rlimit { 6 | rlim_t rlim_cur; /* Soft limit */ 7 | rlim_t rlim_max; /* Hard limit (ceiling for rlim_cur) */ 8 | }; 9 | int getrlimit(int resource, struct rlimit *rlim); 10 | int setrlimit(int resource, const struct rlimit *rlim); 11 | ]]) 12 | 13 | return { 14 | RLIMIT_NOFILE = jit.os == 'OSX' and 8 or 7, 15 | limit = function() 16 | return ffi.new('struct rlimit') 17 | end, 18 | getrlimit = function (id, limit) 19 | ffi.C.getrlimit(id, limit) 20 | end, 21 | setrlimit = function (id, limit) 22 | ffi.C.setrlimit(id, limit) 23 | end, 24 | } 25 | -------------------------------------------------------------------------------- /test/replication/master.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | memtx_memory = 107374182, 6 | replication_timeout = 0.1 7 | }) 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/replication/master1.lua: -------------------------------------------------------------------------------- 1 | master.lua -------------------------------------------------------------------------------- /test/replication/master_quorum1.lua: -------------------------------------------------------------------------------- 1 | master_quorum.lua -------------------------------------------------------------------------------- /test/replication/master_quorum2.lua: -------------------------------------------------------------------------------- 1 | master_quorum.lua -------------------------------------------------------------------------------- /test/replication/misc.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/replication/on_replace1.lua: -------------------------------------------------------------------------------- 1 | on_replace.lua -------------------------------------------------------------------------------- /test/replication/on_replace2.lua: -------------------------------------------------------------------------------- 1 | on_replace.lua -------------------------------------------------------------------------------- /test/replication/quorum1.lua: -------------------------------------------------------------------------------- 1 | quorum.lua -------------------------------------------------------------------------------- /test/replication/quorum2.lua: -------------------------------------------------------------------------------- 1 | quorum.lua -------------------------------------------------------------------------------- /test/replication/quorum3.lua: -------------------------------------------------------------------------------- 1 | quorum.lua -------------------------------------------------------------------------------- /test/replication/rebootstrap1.lua: -------------------------------------------------------------------------------- 1 | rebootstrap.lua -------------------------------------------------------------------------------- /test/replication/rebootstrap2.lua: -------------------------------------------------------------------------------- 1 | rebootstrap.lua -------------------------------------------------------------------------------- /test/replication/replica-applier-rollback.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- vim: ts=4 sw=4 et 3 | -- 4 | 5 | print('arg', arg) 6 | 7 | box.cfg({ 8 | replication = os.getenv("MASTER"), 9 | listen = os.getenv("LISTEN"), 10 | memtx_memory = 107374182, 11 | replication_timeout = 0.1, 12 | replication_connect_timeout = 0.5, 13 | read_only = true, 14 | }) 15 | 16 | require('console').listen(os.getenv('ADMIN')) 17 | -------------------------------------------------------------------------------- /test/replication/replica.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | repl_include_self = arg[1] and arg[1] == 'true' or false 4 | repl_list = nil 5 | 6 | if repl_include_self then 7 | repl_list = {os.getenv("MASTER"), os.getenv("LISTEN")} 8 | else 9 | repl_list = os.getenv("MASTER") 10 | end 11 | 12 | box.cfg({ 13 | listen = os.getenv("LISTEN"), 14 | replication = repl_list, 15 | memtx_memory = 107374182, 16 | replication_timeout = 0.1, 17 | }) 18 | 19 | require('console').listen(os.getenv('ADMIN')) 20 | -------------------------------------------------------------------------------- /test/replication/replica_auth.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local USER_PASS = arg[1] 4 | local TIMEOUT = arg[2] and tonumber(arg[2]) or 0.1 5 | 6 | require('console').listen(os.getenv('ADMIN')) 7 | 8 | box.cfg({ 9 | listen = os.getenv("LISTEN"), 10 | replication = USER_PASS .. "@" .. os.getenv("MASTER"), 11 | replication_timeout = TIMEOUT, 12 | }) 13 | -------------------------------------------------------------------------------- /test/replication/replica_no_quorum.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | memtx_memory = 107374182, 7 | replication_connect_quorum = 0, 8 | replication_timeout = 0.1, 9 | }) 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/replication/replica_on_schema_init.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | function trig_local(old, new) 4 | if new and new[3] == 'test_local' and new[6]['group_id'] ~= 1 then 5 | return new:update{{'=', 6, {group_id = 1}}} 6 | end 7 | end 8 | 9 | function trig_engine(old, new) 10 | if new and new[3] == 'test_engine' and new[4] ~= 'vinyl' then 11 | return new:update{{'=', 4, 'vinyl'}} 12 | end 13 | end 14 | 15 | box.ctl.on_schema_init(function() 16 | box.space._space:before_replace(trig_local) 17 | box.space._space:before_replace(trig_engine) 18 | end) 19 | 20 | box.cfg({ 21 | listen = os.getenv("LISTEN"), 22 | replication = os.getenv("MASTER"), 23 | }) 24 | 25 | require('console').listen(os.getenv('ADMIN')) 26 | -------------------------------------------------------------------------------- /test/replication/replica_quorum.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local SOCKET_DIR = require('fio').cwd() 4 | 5 | local QUORUM = tonumber(arg[1]) 6 | local TIMEOUT = arg[2] and tonumber(arg[2]) or 0.1 7 | INSTANCE_URI = SOCKET_DIR .. '/replica_quorum.sock' 8 | 9 | function nonexistent_uri(id) 10 | return SOCKET_DIR .. '/replica_quorum' .. (1000 + id) .. '.sock' 11 | end 12 | 13 | require('console').listen(os.getenv('ADMIN')) 14 | 15 | box.cfg{ 16 | listen = INSTANCE_URI, 17 | replication_timeout = TIMEOUT, 18 | replication_connect_quorum = QUORUM, 19 | replication = {INSTANCE_URI, 20 | nonexistent_uri(1), 21 | nonexistent_uri(2)} 22 | } 23 | -------------------------------------------------------------------------------- /test/replication/replica_timeout.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local TIMEOUT = tonumber(arg[1]) 4 | 5 | box.cfg({ 6 | listen = os.getenv("LISTEN"), 7 | replication = os.getenv("MASTER"), 8 | memtx_memory = 107374182, 9 | replication_timeout = TIMEOUT, 10 | }) 11 | 12 | require('console').listen(os.getenv('ADMIN')) 13 | -------------------------------------------------------------------------------- /test/replication/replica_uuid.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | instance_uuid = arg[1], 5 | listen = os.getenv("LISTEN"), 6 | replication = os.getenv("MASTER"), 7 | memtx_memory = 107374182, 8 | replication_timeout = 0.1, 9 | }) 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | 13 | -------------------------------------------------------------------------------- /test/replication/replica_uuid_ro1.lua: -------------------------------------------------------------------------------- 1 | replica_uuid_ro.lua -------------------------------------------------------------------------------- /test/replication/replica_uuid_ro2.lua: -------------------------------------------------------------------------------- 1 | replica_uuid_ro.lua -------------------------------------------------------------------------------- /test/replication/replica_uuid_ro3.lua: -------------------------------------------------------------------------------- 1 | replica_uuid_ro.lua -------------------------------------------------------------------------------- /test/replication/replica_uuid_rw1.lua: -------------------------------------------------------------------------------- 1 | replica_uuid_rw.lua -------------------------------------------------------------------------------- /test/replication/replica_uuid_rw2.lua: -------------------------------------------------------------------------------- 1 | replica_uuid_rw.lua -------------------------------------------------------------------------------- /test/replication/replica_uuid_rw3.lua: -------------------------------------------------------------------------------- 1 | replica_uuid_rw.lua -------------------------------------------------------------------------------- /test/replication/skip_conflict_row.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/replication/sync.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on OpenBSD due to fail #XXXX. 4 | if platform.system() == 'OpenBSD': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/replication/wal_off.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | memtx_memory = 107374182, 7 | wal_mode = 'none', 8 | replication_timeout = 0.1, 9 | }) 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/sql-tap/engine.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "analyze9.test.lua": { 3 | "memtx": {"engine": "memtx"} 4 | }, 5 | "collation_unicode.test.lua": { 6 | "memtx": {"engine": "memtx"} 7 | }, 8 | "in2.test.lua": { 9 | "memtx": {"engine": "memtx"} 10 | }, 11 | "delete3.test.lua": { 12 | "memtx": {"engine": "memtx"} 13 | }, 14 | "sort.test.lua": { 15 | "memtx": {"engine": "memtx"} 16 | }, 17 | "gh-3083-ephemeral-unref-tuples.test.lua": { 18 | "memtx": {"engine": "memtx"} 19 | }, 20 | "gh-3332-tuple-format-leak.test.lua": { 21 | "memtx": {"engine": "memtx"} 22 | }, 23 | "gh-4077-iproto-execute-no-bind.test.lua": {}, 24 | "*": { 25 | "memtx": {"engine": "memtx"}, 26 | "vinyl": {"engine": "vinyl"} 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/sql-tap/gh-2884-forbid-rowid-syntax.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | test = require("sqltester") 3 | test:plan(1) 4 | 5 | local ok = pcall(test.execsql, test, [[ 6 | DROP TABLE IF EXISTS t1; 7 | CREATE TABLE t1(a INT, b INT, c INT, d TEXT, PRIMARY KEY (c, d)) WITHOUT ROWID; 8 | ]]) 9 | 10 | test:ok(not ok, 'rowid syntax must be forbidden') 11 | 12 | test:finish_test() 13 | -------------------------------------------------------------------------------- /test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | test = require("sqltester") 4 | test:plan(1) 5 | 6 | test:do_test( 7 | "unref_before_delete-1.1", 8 | function() 9 | test:execsql "CREATE TABLE test(id integer, k integer, primary key (id))" 10 | 11 | for i = 1, 1000 do 12 | box.execute("insert into test(id, k) values(" .. i .. "," .. i .. ")") 13 | end 14 | 15 | for i = 1, 10000 do 16 | box.execute("SELECT id, k FROM test WHERE k IN (5849, 4986, 4997, 5020, 5044, 4990, 5013, 4983)") 17 | end 18 | end, { 19 | -- 20 | -- 21 | }) 22 | 23 | test:finish_test() 24 | 25 | -------------------------------------------------------------------------------- /test/sql-tap/gh-3297-ephemeral-rowid.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | test = require("sqltester") 3 | test:plan(1) 4 | 5 | -- Check that OP_NextIdEphemeral generates unique ids. 6 | -- 7 | test:execsql [[ 8 | CREATE TABLE T1(A INT PRIMARY KEY); 9 | CREATE TABLE T2(A INT PRIMARY KEY, B INT); 10 | INSERT INTO T1 VALUES(12); 11 | INSERT INTO T2 VALUES(1, 5); 12 | INSERT INTO T2 VALUES(2, 2); 13 | INSERT INTO T2 VALUES(3, 2); 14 | INSERT INTO T2 VALUES(4, 2); 15 | ]] 16 | 17 | test:do_execsql_test( 18 | "gh-3297-1", 19 | [[ 20 | SELECT * FROM ( SELECT A FROM T1 LIMIT 1), (SELECT B FROM T2 LIMIT 10); 21 | ]], 22 | { 23 | 12, 2, 24 | 12, 2, 25 | 12, 2, 26 | 12, 5 27 | } 28 | ) 29 | 30 | test:finish_test() 31 | -------------------------------------------------------------------------------- /test/sql/app.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | listen = os.getenv("LISTEN"), 5 | pid_file = "tarantool.pid", 6 | memtx_max_tuple_size = 5 * 1024 * 1024, 7 | vinyl_max_tuple_size = 5 * 1024 * 1024, 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/sql/check-clear-ephemeral.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | engine = test_run:get_cfg('engine') 3 | _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}}) 4 | -- box.cfg() 5 | 6 | -- create space 7 | box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));") 8 | 9 | -- Seed entries 10 | box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;") 11 | 12 | -- Ephemeral table is not belong to Tarantool, so must be cleared sql-way. 13 | box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;"); 14 | 15 | -- Cleanup 16 | box.execute("DROP TABLE t1") 17 | 18 | -- Debug 19 | -- require("console").start() 20 | -------------------------------------------------------------------------------- /test/sql/engine.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "vinyl-opts.test.lua" : { 3 | "vinyl": {"engine": "vinyl"} 4 | }, 5 | "bind.test.lua": { 6 | "remote": {"remote": "true"}, 7 | "local": {"remote": "false"} 8 | }, 9 | "full_metadata.test.lua": { 10 | "remote": {"remote": "true"} 11 | }, 12 | "prepared.test.lua": { 13 | "remote": {"remote": "true"}, 14 | "local": {"remote": "false"} 15 | }, 16 | "*": { 17 | "memtx": {"engine": "memtx"}, 18 | "vinyl": {"engine": "vinyl"} 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/sql/gh-3613-idx-alter-update-2.result: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | --- 3 | ... 4 | engine = test_run:get_cfg('engine') 5 | --- 6 | ... 7 | _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}}) 8 | --- 9 | ... 10 | box.execute('CREATE TABLE t (s1 INT PRIMARY KEY)') 11 | --- 12 | - row_count: 1 13 | ... 14 | box.execute('CREATE INDEX i ON t (s1)') 15 | --- 16 | - row_count: 1 17 | ... 18 | box.execute('ALTER TABLE t RENAME TO j3') 19 | --- 20 | - row_count: 0 21 | ... 22 | -- After gh-3613 fix, bug in cmp_def was discovered. 23 | -- Comparison didn't take .opts.sql into account. 24 | test_run:cmd('restart server default') 25 | box.execute('DROP INDEX i ON j3') 26 | --- 27 | - row_count: 1 28 | ... 29 | -- Cleanup 30 | box.execute('DROP TABLE j3') 31 | --- 32 | - row_count: 1 33 | ... 34 | -------------------------------------------------------------------------------- /test/sql/gh-3613-idx-alter-update-2.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | engine = test_run:get_cfg('engine') 3 | _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}}) 4 | 5 | box.execute('CREATE TABLE t (s1 INT PRIMARY KEY)') 6 | box.execute('CREATE INDEX i ON t (s1)') 7 | box.execute('ALTER TABLE t RENAME TO j3') 8 | 9 | -- After gh-3613 fix, bug in cmp_def was discovered. 10 | -- Comparison didn't take .opts.sql into account. 11 | test_run:cmd('restart server default') 12 | 13 | box.execute('DROP INDEX i ON j3') 14 | 15 | -- Cleanup 16 | box.execute('DROP TABLE j3') 17 | -------------------------------------------------------------------------------- /test/sql/gh-4111-format-in-sysview.result: -------------------------------------------------------------------------------- 1 | -- Make sure, that it is possible to create a VIEW which 2 | -- refers to "_v" space, i.e. to sysview engine. 3 | -- Before gh-4111 was fixed, attempt to create such a view 4 | -- failed due to lack of format in a space with sysview 5 | -- engine. 6 | test_run = require('test_run').new() 7 | --- 8 | ... 9 | box.space._vspace.index[1]:count(1) > 0 10 | --- 11 | - true 12 | ... 13 | box.execute([[CREATE VIEW t AS SELECT "name" FROM "_vspace" y]]) 14 | --- 15 | - row_count: 1 16 | ... 17 | box.execute([[SELECT * from t WHERE "name" = 'T']]) 18 | --- 19 | - metadata: 20 | - name: name 21 | type: string 22 | rows: 23 | - ['T'] 24 | ... 25 | box.execute([[DROP VIEW t]]) 26 | --- 27 | - row_count: 1 28 | ... 29 | -------------------------------------------------------------------------------- /test/sql/gh-4111-format-in-sysview.test.lua: -------------------------------------------------------------------------------- 1 | -- Make sure, that it is possible to create a VIEW which 2 | -- refers to "_v" space, i.e. to sysview engine. 3 | -- Before gh-4111 was fixed, attempt to create such a view 4 | -- failed due to lack of format in a space with sysview 5 | -- engine. 6 | 7 | test_run = require('test_run').new() 8 | 9 | box.space._vspace.index[1]:count(1) > 0 10 | 11 | box.execute([[CREATE VIEW t AS SELECT "name" FROM "_vspace" y]]) 12 | box.execute([[SELECT * from t WHERE "name" = 'T']]) 13 | box.execute([[DROP VIEW t]]) 14 | -------------------------------------------------------------------------------- /test/sql/gh-4256-do-not-change-order-during-insertion.test.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Make sure that when inserting, values are inserted in the given 3 | -- order when ephemeral space is used. 4 | -- 5 | CREATE TABLE t (i INT PRIMARY KEY AUTOINCREMENT); 6 | -- 7 | -- In order for this INSERT to use the ephemeral space, we created 8 | -- this trigger. 9 | -- 10 | CREATE TRIGGER r AFTER INSERT ON t FOR EACH ROW BEGIN SELECT 1; END 11 | INSERT INTO t VALUES (1), (NULL), (10), (NULL), (NULL), (3), (NULL); 12 | SELECT * FROM t; 13 | DROP TABLE t; 14 | -------------------------------------------------------------------------------- /test/sql/gh-4546-sql-drop-grants.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | engine = test_run:get_cfg('engine') 3 | 4 | -- 5 | -- gh-4546: DROP TABLE must delete all privileges given on that 6 | -- table to any user. 7 | -- 8 | 9 | box.schema.user.create('test_user1') 10 | box.schema.user.create('test_user2') 11 | test_space = box.schema.create_space('T', { \ 12 | engine = engine, \ 13 | format = {{'i', 'integer'}} \ 14 | }) 15 | box.schema.user.grant('test_user1', 'read', 'space', 'T') 16 | box.schema.user.grant('test_user2', 'write', 'space', 'T') 17 | box.execute([[DROP TABLE T;]]) 18 | box.schema.user.drop('test_user1') 19 | box.schema.user.drop('test_user2') 20 | -------------------------------------------------------------------------------- /test/sql/gh-4697-scalar-bool-sort-cmp.test.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE test (s1 INTEGER PRIMARY KEY, s2 SCALAR UNIQUE, s3 SCALAR); 2 | INSERT INTO test VALUES (0, 1, 1); 3 | INSERT INTO test VALUES (1, 1.1, 1.1); 4 | INSERT INTO test VALUES (2, true, true); 5 | INSERT INTO test VALUES (3, NULL, NULL); 6 | 7 | -- 8 | -- gh-4679: Make sure that boolean precedes any number within 9 | -- scalar. Result with order by indexed (using index) and 10 | -- non-indexed (using no index) must be the same. 11 | -- 12 | SELECT s2, typeof(s2) FROM test ORDER BY s2; 13 | SELECT s3, typeof(s3) FROM test ORDER BY s3; 14 | -------------------------------------------------------------------------------- /test/sql/gh-4745-table-info-assertion.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | test_run = require('test_run').new() 3 | | --- 4 | | ... 5 | engine = test_run:get_cfg('engine') 6 | | --- 7 | | ... 8 | -- 9 | -- Make sure that 'pragma table_info()' correctly handles tables 10 | -- without primary key. 11 | -- 12 | T = box.schema.create_space('T', { \ 13 | engine = engine, \ 14 | format = {{'i', 'integer'}} \ 15 | }) 16 | | --- 17 | | ... 18 | _ = box.execute('pragma table_info(T)') 19 | | --- 20 | | ... 21 | T:drop() 22 | | --- 23 | | ... 24 | -------------------------------------------------------------------------------- /test/sql/gh-4745-table-info-assertion.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | engine = test_run:get_cfg('engine') 3 | -- 4 | -- Make sure that 'pragma table_info()' correctly handles tables 5 | -- without primary key. 6 | -- 7 | T = box.schema.create_space('T', { \ 8 | engine = engine, \ 9 | format = {{'i', 'integer'}} \ 10 | }) 11 | _ = box.execute('pragma table_info(T)') 12 | T:drop() 13 | -------------------------------------------------------------------------------- /test/sql/gh-4755-scalar-collation-metadata.test.lua: -------------------------------------------------------------------------------- 1 | env = require('test_run') 2 | test_run = env.new() 3 | 4 | -- 5 | -- gh-4755: collation in metadata must be displayed for both 6 | -- string and scalar field types. 7 | -- 8 | test_run:cmd("setopt delimiter ';'"); 9 | box.execute([[SET SESSION "sql_full_metadata" = true;]]); 10 | box.execute([[CREATE TABLE test (a SCALAR COLLATE "unicode_ci" PRIMARY KEY, 11 | b STRING COLLATE "unicode_ci");]]); 12 | box.execute("SELECT * FROM test;"); 13 | 14 | -- 15 | -- Cleanup. 16 | -- 17 | box.execute([[SET SESSION "sql_full_metadata" = false;]]); 18 | box.execute("DROP TABLE test;"); 19 | -------------------------------------------------------------------------------- /test/sql/select-null.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | engine = test_run:get_cfg('engine') 3 | _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}}) 4 | 5 | -- box.cfg() 6 | 7 | -- create space 8 | box.execute("CREATE TABLE t3(id INT, a text, b TEXT, PRIMARY KEY(id))") 9 | 10 | -- Seed entries 11 | box.execute("INSERT INTO t3 VALUES(1, 'abc',NULL)"); 12 | box.execute("INSERT INTO t3 VALUES(2, NULL,'xyz')"); 13 | 14 | -- Select must return properly decoded `NULL` 15 | box.execute("SELECT * FROM t3") 16 | 17 | -- Cleanup 18 | box.execute("DROP TABLE t3") 19 | 20 | -- Debug 21 | -- require("console").start() 22 | -------------------------------------------------------------------------------- /test/sql/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = sql tests 4 | script = app.lua 5 | use_unix_sockets = True 6 | use_unix_sockets_iproto = True 7 | config = engine.cfg 8 | is_parallel = True 9 | lua_libs = lua/sql_tokenizer.lua 10 | release_disabled = errinj.test.lua view_delayed_wal.test.lua 11 | disabled = sql-statN-index-drop.test.lua 12 | pretest_clean = True 13 | fragile = dll.test.lua ; gh-4427 14 | func-recreate.test.lua ; gh-4384 15 | -------------------------------------------------------------------------------- /test/sql/update-with-nested-select.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | engine = test_run:get_cfg('engine') 3 | _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}}) 4 | 5 | -- box.cfg() 6 | 7 | -- create space 8 | box.execute("CREATE TABLE t1(a integer primary key, b INT UNIQUE, e INT);"); 9 | 10 | -- Seed entries 11 | box.execute("INSERT INTO t1 VALUES(1,4,6);"); 12 | box.execute("INSERT INTO t1 VALUES(2,5,7);"); 13 | 14 | -- Both entries must be updated 15 | box.execute("UPDATE t1 SET e=e+1 WHERE b IN (SELECT b FROM t1);"); 16 | 17 | -- Check 18 | box.execute("SELECT e FROM t1"); 19 | 20 | -- Cleanup 21 | box.execute("DROP TABLE t1;"); 22 | 23 | -- Debug 24 | -- require("console").start() 25 | -------------------------------------------------------------------------------- /test/sql/upgrade/1.10/00000000000000000003.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/sql/upgrade/1.10/00000000000000000003.snap -------------------------------------------------------------------------------- /test/sql/upgrade/2.1.0/00000000000000000003.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/sql/upgrade/2.1.0/00000000000000000003.snap -------------------------------------------------------------------------------- /test/sql/upgrade/upgrade.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | listen = os.getenv("LISTEN"), 5 | } 6 | 7 | require('console').listen(os.getenv('ADMIN')) 8 | -------------------------------------------------------------------------------- /test/sql/vinyl-opts-cfg.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | -- Set of custom vinyl params, which are used in the test 4 | -- of the same name (vinyl-opts.test.lua). 5 | -- 6 | box.cfg { 7 | vinyl_bloom_fpr = 0.1, 8 | vinyl_page_size = 32 * 1024, 9 | vinyl_range_size = 512 * 1024 * 1024, 10 | vinyl_run_size_ratio = 5, 11 | vinyl_run_count_per_level = 3 12 | } 13 | 14 | require('console').listen(os.getenv('ADMIN')) 15 | -------------------------------------------------------------------------------- /test/sql/vinyl-opts.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | test_run:cmd("create server test with script='sql/vinyl-opts-cfg.lua'") 3 | test_run:cmd("start server test") 4 | test_run:cmd("switch test") 5 | 6 | box.space._session_settings:update('sql_default_engine', {{'=', 2, 'vinyl'}}) 7 | box.execute('CREATE TABLE v1 (id INT PRIMARY KEY, b INT);') 8 | box.space.V1.index[0].options 9 | 10 | box.execute('CREATE INDEX i1 ON v1(b);') 11 | box.space.V1.index[1].options 12 | 13 | box.space.V1:drop() 14 | 15 | test_run:cmd('switch default') 16 | test_run:cmd("stop server test") 17 | test_run:cmd("cleanup server test") 18 | -------------------------------------------------------------------------------- /test/swim/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = SWIM tests 4 | script = box.lua 5 | release_disabled = errinj.test.lua 6 | is_parallel = True 7 | -------------------------------------------------------------------------------- /test/test-run.py: -------------------------------------------------------------------------------- 1 | ../test-run/test-run.py -------------------------------------------------------------------------------- /test/unit/bitset_basic.result: -------------------------------------------------------------------------------- 1 | *** test_cardinality *** 2 | *** test_cardinality: done *** 3 | *** test_get_set *** 4 | Generating test set... ok 5 | Settings bits... ok 6 | Checking bits... ok 7 | Unsetting random bits... ok 8 | Checking set bits... ok 9 | Checking all bits... ok 10 | Unsetting all bits... ok 11 | Checking all bits... ok 12 | *** test_get_set: done *** 13 | -------------------------------------------------------------------------------- /test/unit/bitset_index.result: -------------------------------------------------------------------------------- 1 | *** test_size_and_count *** 2 | *** test_size_and_count: done *** 3 | *** test_resize *** 4 | *** test_resize: done *** 5 | *** test_insert_remove *** 6 | Generating test set... ok 7 | Inserting pairs... ok 8 | Checking keys... ok 9 | Removing random pairs... ok 10 | Checking keys... ok 11 | *** test_insert_remove: done *** 12 | *** test_empty_simple *** 13 | *** test_empty_simple: done *** 14 | *** test_all_simple *** 15 | *** test_all_simple: done *** 16 | *** test_all_set_simple *** 17 | *** test_all_set_simple: done *** 18 | *** test_any_set_simple *** 19 | *** test_any_set_simple: done *** 20 | *** test_equals_simple *** 21 | *** test_equals_simple: done *** 22 | -------------------------------------------------------------------------------- /test/unit/bitset_iterator.result: -------------------------------------------------------------------------------- 1 | *** test_empty_expr *** 2 | *** test_empty_expr: done *** 3 | *** test_empty_expr_conj1 *** 4 | *** test_empty_expr_conj1: done *** 5 | *** test_empty_expr_conj2 *** 6 | *** test_empty_expr_conj2: done *** 7 | *** test_empty_result *** 8 | *** test_empty_result: done *** 9 | *** test_first_result *** 10 | *** test_first_result: done *** 11 | *** test_simple *** 12 | *** test_simple: done *** 13 | *** test_big *** 14 | Setting bits... ok 15 | Iterating... ok 16 | *** test_big: done *** 17 | *** test_not_empty *** 18 | *** test_not_empty: done *** 19 | *** test_not_last *** 20 | *** test_not_last: done *** 21 | *** test_disjunction *** 22 | *** test_disjunction: done *** 23 | -------------------------------------------------------------------------------- /test/unit/bloom.result: -------------------------------------------------------------------------------- 1 | *** simple_test *** 2 | error_count = 0 3 | fp_rate_too_big = 0 4 | *** store_load_test *** 5 | error_count = 0 6 | fp_rate_too_big = 0 7 | -------------------------------------------------------------------------------- /test/unit/cbus.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..6 3 | start main fiber 4 | start main loop 5 | start worker 6 | 7 | *** Test single message *** 8 | flush event, counter = 1 9 | ok 1 - 1 flush after test_single_msg 10 | 11 | *** Test several messages *** 12 | ok 2 - no flush during loop 13 | ok 3 - no flush during loop 14 | ok 4 - no flush during loop 15 | flush event, counter = 1 16 | ok 5 - 1 flush after test_several_messages 17 | 18 | *** Test forced flush *** 19 | flush event, counter = 1 20 | break main fiber and finish test 21 | ok 6 - flushed_cnt at the end of the test 22 | finish worker 23 | finish main loop 24 | *** main: done *** 25 | -------------------------------------------------------------------------------- /test/unit/cbus_hang.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..1 3 | ok 1 - The hang worker has been joined 4 | *** main: done *** 5 | -------------------------------------------------------------------------------- /test/unit/cbus_stress.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | *** main: done *** 3 | -------------------------------------------------------------------------------- /test/unit/coio.result: -------------------------------------------------------------------------------- 1 | *** stat_timeout_test *** 2 | *** stat_timeout_test: done *** 3 | *** stat_notify_test *** 4 | # filename: 1.out 5 | *** stat_notify_test: done *** 6 | *** test_call_f *** 7 | # call done with res 0 8 | *** test_call_f: done *** 9 | *** test_getaddrinfo *** 10 | 1..1 11 | ok 1 - getaddrinfo 12 | *** test_getaddrinfo: done *** 13 | -------------------------------------------------------------------------------- /test/unit/crc32.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..1 3 | *** test_alignment *** 4 | 1..4 5 | ok 1 - aligned crc32 buffer without a tail 6 | ok 2 - aligned crc32 buffer with a tail 7 | ok 3 - not aligned crc32 buffer with a tail 8 | ok 4 - not aligned buffer less than a word 9 | ok 1 - subtests 10 | *** test_alignment: done *** 11 | *** main: done *** 12 | -------------------------------------------------------------------------------- /test/unit/fiber_channel.result: -------------------------------------------------------------------------------- 1 | *** fiber_channel_basic *** 2 | 1..10 3 | ok 1 - fiber_channel_new() 4 | ok 2 - fiber_channel_size() 5 | ok 3 - fiber_channel_count() 6 | ok 4 - fiber_channel_is_full() 7 | ok 5 - fiber_channel_is_empty() 8 | ok 6 - fiber_channel_size(1) 9 | ok 7 - fiber_channel_count(1) 10 | ok 8 - fiber_channel_is_full(1) 11 | ok 9 - fiber_channel_is_empty(1) 12 | ok 10 - fiber_channel_get() 13 | *** fiber_channel_basic: done *** 14 | *** fiber_channel_get *** 15 | 1..7 16 | ok 1 - fiber_channel_put(0) 17 | ok 2 - fiber_channel_put_timeout(0) 18 | ok 3 - fiber_channel_get(0) 19 | ok 4 - fiber_channel_put_timeout(1) 20 | ok 5 - fiber_channel_get(1) 21 | ok 6 - fiber_channel_put(closed) 22 | ok 7 - fiber_channel_get(closed) 23 | *** fiber_channel_get: done *** 24 | -------------------------------------------------------------------------------- /test/unit/fiber_channel_stress.result: -------------------------------------------------------------------------------- 1 | *** main_f *** 2 | *** main_f: done *** 3 | -------------------------------------------------------------------------------- /test/unit/fiber_cond.result: -------------------------------------------------------------------------------- 1 | 1..7 2 | ok 1 - timeout 3 | ok 2 - timeout 4 | ok 3 - signal 5 | ok 4 - signal 6 | ok 5 - order 7 | ok 6 - broadcast 8 | ok 7 - broadcast 9 | -------------------------------------------------------------------------------- /test/unit/fiber_stack.result: -------------------------------------------------------------------------------- 1 | SystemError fiber mprotect failed: Cannot allocate memory 2 | fiber: Can't put guard page to slab. Leak 57344 bytes: Cannot allocate memory 3 | *** main_f *** 4 | 1..6 5 | ok 1 - mprotect: failed to setup fiber guard page 6 | ok 2 - mprotect: diag is armed after error 7 | ok 3 - madvise: non critical error on madvise hint 8 | ok 4 - madvise: diag is armed after error 9 | ok 5 - fiber with custom stack 10 | ok 6 - expected leak detected 11 | *** main_f: done *** 12 | -------------------------------------------------------------------------------- /test/unit/fiber_stress.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/unit/fiber_stress.result -------------------------------------------------------------------------------- /test/unit/find_path.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "unit.h" 6 | 7 | extern const char * 8 | find_path(const char *); 9 | 10 | int 11 | main(int argc, char *argv[]) 12 | { 13 | header(); 14 | fail_unless(open(find_path(argv[0]), O_RDONLY) >= 0); 15 | footer(); 16 | } 17 | -------------------------------------------------------------------------------- /test/unit/find_path.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | *** main: done *** 3 | -------------------------------------------------------------------------------- /test/unit/guard.result: -------------------------------------------------------------------------------- 1 | # signal handler called 2 | -------------------------------------------------------------------------------- /test/unit/guard.skipcond: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # Disabled at ASAN build due to issue #4360. 4 | if os.getenv("ASAN") == 'ON': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/unit/guava.result: -------------------------------------------------------------------------------- 1 | *** correctness_check *** 2 | *** correctness_check: done *** 3 | *** lcg_compat_check *** 4 | *** lcg_compat_check: done *** 5 | *** sameresult_check *** 6 | *** sameresult_check: done *** 7 | -------------------------------------------------------------------------------- /test/unit/heap_iterator.result: -------------------------------------------------------------------------------- 1 | *** test_iterator_create *** 2 | *** test_iterator_create: done *** 3 | *** test_iterator_empty *** 4 | *** test_iterator_empty: done *** 5 | *** test_iterator_small *** 6 | *** test_iterator_small: done *** 7 | *** test_iterator_large *** 8 | *** test_iterator_large: done *** 9 | -------------------------------------------------------------------------------- /test/unit/histogram.result: -------------------------------------------------------------------------------- 1 | *** test_counts *** 2 | *** test_counts: done *** 3 | *** test_discard *** 4 | *** test_discard: done *** 5 | *** test_percentile *** 6 | *** test_percentile: done *** 7 | -------------------------------------------------------------------------------- /test/unit/int96.result: -------------------------------------------------------------------------------- 1 | *** test *** 2 | *** test: done *** 3 | -------------------------------------------------------------------------------- /test/unit/json.result: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/unit/json.result -------------------------------------------------------------------------------- /test/unit/light.result: -------------------------------------------------------------------------------- 1 | *** simple_test *** 2 | *** simple_test: done *** 3 | *** collision_test *** 4 | *** collision_test: done *** 5 | *** iterator_test *** 6 | *** iterator_test: done *** 7 | *** iterator_freeze_check *** 8 | *** iterator_freeze_check: done *** 9 | -------------------------------------------------------------------------------- /test/unit/mhash.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..3 3 | *** mhash_int32_id_test *** 4 | 1..0 5 | *** mhash_int32_id_test: done *** 6 | ok 1 - subtests 7 | *** mhash_int32_collision_test *** 8 | 1..0 9 | *** mhash_int32_collision_test: done *** 10 | ok 2 - subtests 11 | *** mhash_random_test *** 12 | 1..3 13 | ok 1 - empty random is always 'end' 14 | ok 2 - one element is always found 15 | ok 3 - incremental random from mutable hash 16 | ok 3 - subtests 17 | *** mhash_random_test: done *** 18 | *** main: done *** 19 | -------------------------------------------------------------------------------- /test/unit/mhash_bytemap.c: -------------------------------------------------------------------------------- 1 | #define bytemap 1 2 | #include "mhash.c" 3 | -------------------------------------------------------------------------------- /test/unit/mhash_bytemap.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..3 3 | *** mhash_int32_id_test *** 4 | 1..0 5 | *** mhash_int32_id_test: done *** 6 | ok 1 - subtests 7 | *** mhash_int32_collision_test *** 8 | 1..0 9 | *** mhash_int32_collision_test: done *** 10 | ok 2 - subtests 11 | *** mhash_random_test *** 12 | 1..3 13 | ok 1 - empty random is always 'end' 14 | ok 2 - one element is always found 15 | ok 3 - incremental random from mutable hash 16 | ok 3 - subtests 17 | *** mhash_random_test: done *** 18 | *** main: done *** 19 | -------------------------------------------------------------------------------- /test/unit/msgpack.skipcond: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # Disabled at ASAN build due to issue #4360. 4 | if os.getenv("ASAN") == 'ON': 5 | self.skip = 1 6 | 7 | # vim: set ft=python: 8 | -------------------------------------------------------------------------------- /test/unit/popen.result: -------------------------------------------------------------------------------- 1 | 1..3 2 | *** main_f *** 3 | 1..6 4 | *** popen_write_exit *** 5 | ok 1 - popen_new 6 | ok 2 - state alive 7 | ok 3 - write flag check 8 | ok 4 - write to pipe 9 | ok 5 - child exited 10 | ok 6 - popen_delete 11 | *** popen_write_exit: done *** 12 | ok 1 - subtests 13 | 1..5 14 | *** popen_read_exit *** 15 | ok 1 - popen_new 16 | ok 2 - child exited 17 | ok 3 - read flag check 18 | ok 4 - read from pipe 19 | ok 5 - popen_delete 20 | *** popen_read_exit: done *** 21 | ok 2 - subtests 22 | 1..4 23 | *** popen_kill *** 24 | ok 1 - popen_new 25 | ok 2 - popen_send_signal 26 | ok 3 - child terminated 27 | ok 4 - popen_delete 28 | *** popen_kill: done *** 29 | ok 3 - subtests 30 | *** main_f: done *** 31 | -------------------------------------------------------------------------------- /test/unit/queue.result: -------------------------------------------------------------------------------- 1 | *** test0 *** 2 | Initialized: 3 | STAILQ_INIT: 4 | STAILQ_REVERSE: 5 | *** test0: done *** 6 | *** test1 *** 7 | STAILQ_INIT: 1 8 | STAILQ_REVERSE: 1 9 | *** test1: done *** 10 | *** test2 *** 11 | STAILQ_INIT: 1 2 12 | STAILQ_REVERSE: 2 1 13 | *** test2: done *** 14 | *** test3 *** 15 | STAILQ_INIT: 1 2 3 16 | STAILQ_REVERSE: 3 2 1 17 | *** test3: done *** 18 | *** test_splice *** 19 | q1: 20 | q2: 21 | q1: 22 | q2: 23 | STAILQ_INIT: 1 2 3 24 | q1: 25 | q2: 1 2 3 26 | q1: 1 2 3 27 | q2: 28 | q1: 1 29 | q2: 2 3 30 | q1: 1 3 31 | q2: 2 32 | q1: 1 3 2 33 | q2: 34 | *** test_splice: done *** 35 | -------------------------------------------------------------------------------- /test/unit/ratelimit.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..10 3 | ok 1 - emitted 10 expected 10 4 | ok 2 - suppressed 0 expected 0 5 | ok 3 - emitted 0 expected 0 6 | ok 4 - suppressed 0 expected 0 7 | ok 5 - emitted 1 expected 1 8 | ok 6 - suppressed 10 expected 10 9 | ok 7 - emitted 1 expected 1 10 | ok 8 - suppressed 0 expected 0 11 | ok 9 - emitted 1000 expected 1000 12 | ok 10 - suppressed 3000 expected 3000 13 | *** main: done *** 14 | -------------------------------------------------------------------------------- /test/unit/reflection_c.result: -------------------------------------------------------------------------------- 1 | 1..4 2 | ok 1 - assignable 3 | ok 2 - assignable 4 | ok 3 - assignable 5 | ok 4 - assignable 6 | -------------------------------------------------------------------------------- /test/unit/rmean.result: -------------------------------------------------------------------------------- 1 | Stat. 2 names, timer simulation 2 | *** test_100rps *** 3 | Send 100 requests every second for 10 seconds 4 | Calc rps at third and last second 5 | EV1: rps 60, total 300 EV2: rps 0, total 0 6 | EV1: rps 100, total 1000 EV2: rps 0, total 0 7 | *** test_100rps: done *** 8 | *** test_mean15rps *** 9 | Send 15 rps on the average, and 3 rps to EV2 10 | EV1: rps 15, total 1150 EV2: rps 3, total 30 11 | *** test_mean15rps: done *** 12 | -------------------------------------------------------------------------------- /test/unit/rope_stress.result: -------------------------------------------------------------------------------- 1 | *** test_rope_stress_small *** 2 | *** test_rope_stress_small: done *** 3 | *** test_rope_stress_large *** 4 | *** test_rope_stress_large: done *** 5 | -------------------------------------------------------------------------------- /test/unit/rtree.result: -------------------------------------------------------------------------------- 1 | *** simple_check *** 2 | Insert 1..X, remove 1..X 3 | Insert 1..X, remove X..1 4 | Insert X..1, remove 1..X 5 | Insert X..1, remove X..1 6 | *** simple_check: done *** 7 | *** neighbor_test *** 8 | *** neighbor_test: done *** 9 | -------------------------------------------------------------------------------- /test/unit/rtree_iterator.result: -------------------------------------------------------------------------------- 1 | *** iterator_check *** 2 | Test tree size: 50000 3 | --> 0x1 0x2 0x3 0x4 0x5 0x6 0x7 4 | <-- 0xc34c 0xc34d 0xc34e 0xc34f 0xc350 0xc34b 0xc34a 5 | *** iterator_check: done *** 6 | *** iterator_invalidate_check *** 7 | *** iterator_invalidate_check: done *** 8 | -------------------------------------------------------------------------------- /test/unit/rtree_multidim.result: -------------------------------------------------------------------------------- 1 | *** rand_test *** 2 | DIMENSION: 1, page size: 512, max fill good: 1 3 | *** rand_test: done *** 4 | *** rand_test *** 5 | DIMENSION: 2, page size: 1024, max fill good: 1 6 | *** rand_test: done *** 7 | *** rand_test *** 8 | DIMENSION: 3, page size: 1024, max fill good: 1 9 | *** rand_test: done *** 10 | *** rand_test *** 11 | DIMENSION: 8, page size: 4096, max fill good: 1 12 | *** rand_test: done *** 13 | *** rand_test *** 14 | DIMENSION: 16, page size: 8192, max fill good: 1 15 | *** rand_test: done *** 16 | -------------------------------------------------------------------------------- /test/unit/scramble.result: -------------------------------------------------------------------------------- 1 | 0 2 | 0 3 | 1 4 | 1 5 | -------------------------------------------------------------------------------- /test/unit/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = unittest 3 | description = unit tests 4 | release_disabled = fiber_stack.test swim_errinj.test 5 | is_parallel = True 6 | -------------------------------------------------------------------------------- /test/unit/swim_errinj.result: -------------------------------------------------------------------------------- 1 | *** main_f *** 2 | 1..1 3 | *** swim_test_payload_refutation *** 4 | 1..11 5 | ok 1 - S2 sees new version of S1 6 | ok 2 - S3 does the same 7 | ok 3 - but S2 does not known the new payload 8 | ok 4 - as well as S3 9 | ok 5 - S2 learned S1's payload via anti-entropy 10 | ok 6 - version still is the same 11 | ok 7 - S3 was blocked and does not know anything 12 | ok 8 - version still is the same 13 | ok 9 - S2 keeps the same new S1's payload, S3 did not rewrite it 14 | ok 10 - S3 still does not know anything 15 | ok 11 - S3 learns S1's payload from S2 16 | ok 1 - subtests 17 | *** swim_test_payload_refutation: done *** 18 | *** main_f: done *** 19 | -------------------------------------------------------------------------------- /test/unit/tuple_bigref.result: -------------------------------------------------------------------------------- 1 | *** main *** 2 | 1..2 3 | *** test_bigrefs_overall *** 4 | 1..3 5 | ok 1 - All tuples have refs == 1. 6 | ok 2 - All tuples have bigrefs. 7 | ok 3 - All tuples were deleted. 8 | *** test_bigrefs_overall: done *** 9 | ok 1 - subtests 10 | *** test_bigrefs_non_consistent *** 11 | 1..3 12 | ok 1 - All tuples have bigrefs. 13 | ok 2 - 11 tuples don't have bigrefs and all other tuples have 14 | ok 3 - All tuples have bigrefs and their indexes are in right order. 15 | *** test_bigrefs_non_consistent: done *** 16 | ok 2 - subtests 17 | *** main: done *** 18 | -------------------------------------------------------------------------------- /test/unit/uuid.result: -------------------------------------------------------------------------------- 1 | 1..4 2 | ok 1 - 6611265b-8852-4832-af8b-4164d52c62eb > 186ebbf7-cf97-4e2e-8b1b-76154f6f3949 3 | ok 2 - 075b4148-8fb0-2e7f-af50-4164d52c62eb < 1fbc929f-5da8-28c5-8b36-76154f6f3949 4 | 1..4 5 | ok 1 - mp_sizeof_uuid() == encoded length 6 | ok 2 - mp_decode_uuid() return code 7 | ok 3 - mp_sizeof_uuid() == decoded length 8 | ok 4 - mp_decode_uuid(mp_encode_uuid(uu)) == uu 9 | ok 3 - subtests 10 | 1..5 11 | *** mp_print_test *** 12 | ok 1 - correct mp_snprint size with empty buffer 13 | ok 2 - correct mp_snprint size 14 | ok 3 - correct mp_snprint result 15 | ok 4 - correct mp_fprint size 16 | ok 5 - correct mp_fprint result 17 | *** mp_print_test: done *** 18 | ok 4 - subtests 19 | -------------------------------------------------------------------------------- /test/unit/vy_cache.result: -------------------------------------------------------------------------------- 1 | *** test_basic *** 2 | 1..6 3 | ok 1 - cache is filled with 6 statements 4 | ok 2 - cache is filled with 12 statements 5 | ok 3 - cache is filled with 18 statements 6 | ok 4 - next_key * 4 7 | ok 5 - restore 8 | ok 6 - restore on position after last 9 | *** test_basic: done *** 10 | -------------------------------------------------------------------------------- /test/unit/vy_mem.result: -------------------------------------------------------------------------------- 1 | # Looks like you planned 12 tests but ran 9. 2 | *** test_basic *** 3 | 1..12 4 | ok 1 - mem->dump_lsn on empty mem 5 | ok 2 - mem->dump_lsn after prepare 6 | ok 3 - mem->dump_lsn after commit 7 | ok 4 - vy_mem_older_lsn 1 8 | ok 5 - vy_mem_older_lsn 2 9 | ok 6 - vy_mem_rollback 1 10 | ok 7 - vy_mem_rollback 2 11 | ok 8 - vy_mem->version 12 | ok 9 - vy_mem->version 13 | *** test_basic: done *** 14 | *** test_iterator_restore_after_insertion *** 15 | 1..1 16 | ok 1 - check wrong_output 0 17 | *** test_iterator_restore_after_insertion: done *** 18 | -------------------------------------------------------------------------------- /test/unit/vy_point_lookup.result: -------------------------------------------------------------------------------- 1 | 1..1 2 | *** test_basic *** 3 | 1..15 4 | ok 1 - vy_lsm_env_create 5 | ok 2 - key_def is not NULL 6 | ok 3 - tuple_format_new is not NULL 7 | ok 4 - lsm is not NULL 8 | ok 5 - range is not NULL 9 | ok 6 - temp dir name is not NULL 10 | ok 7 - temp dir create (2) 11 | ok 8 - temp dir create (3) 12 | ok 9 - vy_lsm_rotate_mem 13 | ok 10 - vy_run_new 14 | ok 11 - vy_run_write 15 | ok 12 - vy_run_new 16 | ok 13 - vy_run_write 17 | ok 14 - select results 18 | ok 15 - no errors happened 19 | ok 1 - subtests 20 | *** test_basic: done *** 21 | -------------------------------------------------------------------------------- /test/vinyl/bad_run_indexes.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.error.injection.set('ERRINJ_VYRUN_INDEX_GARBAGE', true) 4 | 5 | box.cfg { 6 | listen = os.getenv("LISTEN"), 7 | vinyl_memory = 128 * 1024 * 1024, 8 | force_recovery = true, 9 | } 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/vinyl/errinj_recovery.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.error.injection.set('ERRINJ_VY_RUN_OPEN', 2) 4 | assert(box.error.injection.get('ERRINJ_VY_RUN_OPEN')) 5 | 6 | box.cfg { 7 | listen = os.getenv("LISTEN"), 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/vinyl/force_recovery.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg { 4 | listen = os.getenv("LISTEN"), 5 | vinyl_memory = 128 * 1024 * 1024, 6 | force_recovery = true, 7 | } 8 | 9 | require('console').listen(os.getenv('ADMIN')) 10 | -------------------------------------------------------------------------------- /test/vinyl/gh-4821-ddl-during-throttled-dump.test.lua: -------------------------------------------------------------------------------- 1 | errinj = box.error.injection 2 | fiber = require('fiber') 3 | 4 | -- During this test we verify that if dump process is throttled 5 | -- due to error, DDL operations in window between dumps won't 6 | -- break anything. 7 | -- 8 | s = box.schema.space.create('test', {engine = 'vinyl'}) 9 | _ = s:create_index('pk') 10 | 11 | errinj.set('ERRINJ_VY_RUN_WRITE', true) 12 | errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0.01) 13 | s:replace{2} 14 | box.snapshot() 15 | errinj.set('ERRINJ_VY_RUN_WRITE', false) 16 | s:drop() 17 | 18 | s = box.schema.space.create('test1', {engine = 'vinyl'}) 19 | i = s:create_index('pk1') 20 | s:replace{1} 21 | -- Unthrottle scheduler. 22 | errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0) 23 | fiber.sleep(0.1) 24 | s:drop() 25 | -------------------------------------------------------------------------------- /test/vinyl/gh-5005-upsert-affecting-pk.result: -------------------------------------------------------------------------------- 1 | -- test-run result file version 2 2 | -- Make sure that applying invalid upsert (which modifies PK) 3 | -- after read (so that key populates tuple cache) does not result 4 | -- in crash. 5 | -- 6 | s = box.schema.create_space('test', {engine = 'vinyl'}) 7 | | --- 8 | | ... 9 | pk = s:create_index('pk') 10 | | --- 11 | | ... 12 | s:insert{1, 1} 13 | | --- 14 | | - [1, 1] 15 | | ... 16 | s:select() 17 | | --- 18 | | - - [1, 1] 19 | | ... 20 | s:upsert({1}, {{'+', 1, 1}}) 21 | | --- 22 | | ... 23 | s:select() 24 | | --- 25 | | - - [1, 1] 26 | | ... 27 | 28 | s:drop() 29 | | --- 30 | | ... 31 | -------------------------------------------------------------------------------- /test/vinyl/gh-5005-upsert-affecting-pk.test.lua: -------------------------------------------------------------------------------- 1 | -- Make sure that applying invalid upsert (which modifies PK) 2 | -- after read (so that key populates tuple cache) does not result 3 | -- in crash. 4 | -- 5 | s = box.schema.create_space('test', {engine = 'vinyl'}) 6 | pk = s:create_index('pk') 7 | s:insert{1, 1} 8 | s:select() 9 | s:upsert({1}, {{'+', 1, 1}}) 10 | s:select() 11 | 12 | s:drop() 13 | -------------------------------------------------------------------------------- /test/vinyl/large.result: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | --- 3 | ... 4 | test_run = require('test_run').new() 5 | --- 6 | ... 7 | large = require('large') 8 | --- 9 | ... 10 | large.prepare() 11 | --- 12 | ... 13 | large.large(500) 14 | --- 15 | ... 16 | test_run:cmd('restart server default') 17 | large = require('large') 18 | --- 19 | ... 20 | large.check() 21 | --- 22 | ... 23 | large.teardown() 24 | --- 25 | ... 26 | -------------------------------------------------------------------------------- /test/vinyl/large.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | test_run = require('test_run').new() 4 | large = require('large') 5 | 6 | large.prepare() 7 | large.large(500) 8 | 9 | test_run:cmd('restart server default') 10 | 11 | large = require('large') 12 | large.check() 13 | large.teardown() 14 | -------------------------------------------------------------------------------- /test/vinyl/low_quota.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local LIMIT = tonumber(arg[1]) 4 | 5 | box.cfg{ 6 | vinyl_memory = LIMIT, 7 | vinyl_max_tuple_size = 2 * LIMIT, 8 | } 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/vinyl/options.result: -------------------------------------------------------------------------------- 1 | utils = require('utils') 2 | --- 3 | ... 4 | test_run = require('test_run').new() 5 | --- 6 | ... 7 | index_options = test_run:get_cfg('index_options') 8 | --- 9 | ... 10 | index_options.type = 'TREE' 11 | --- 12 | ... 13 | index_options.parts = {1, 'unsigned'} 14 | --- 15 | ... 16 | space = box.schema.space.create('test', { engine = 'vinyl' }) 17 | --- 18 | ... 19 | _ = space:create_index('primary', index_options) 20 | --- 21 | ... 22 | utils.check_space(space, 1024) 23 | --- 24 | - [] 25 | ... 26 | space:drop() 27 | --- 28 | ... 29 | test_run = nil 30 | --- 31 | ... 32 | utils = nil 33 | --- 34 | ... 35 | -------------------------------------------------------------------------------- /test/vinyl/options.test.lua: -------------------------------------------------------------------------------- 1 | utils = require('utils') 2 | test_run = require('test_run').new() 3 | 4 | index_options = test_run:get_cfg('index_options') 5 | index_options.type = 'TREE' 6 | index_options.parts = {1, 'unsigned'} 7 | 8 | space = box.schema.space.create('test', { engine = 'vinyl' }) 9 | _ = space:create_index('primary', index_options) 10 | utils.check_space(space, 1024) 11 | space:drop() 12 | 13 | test_run = nil 14 | utils = nil 15 | -------------------------------------------------------------------------------- /test/vinyl/replica_quota.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | vinyl_memory = 1024 * 1024, 7 | vinyl_timeout = 0.001, 8 | }) 9 | 10 | require('console').listen(os.getenv('ADMIN')) 11 | -------------------------------------------------------------------------------- /test/vinyl/replica_rejoin.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | local replication = os.getenv("MASTER") 4 | if arg[1] == 'disable_replication' then 5 | replication = nil 6 | end 7 | 8 | box.cfg({ 9 | replication = replication, 10 | vinyl_memory = 1024 * 1024, 11 | }) 12 | 13 | require('console').listen(os.getenv('ADMIN')) 14 | -------------------------------------------------------------------------------- /test/vinyl/stat.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | vinyl_cache = 15 * 1024, -- 15K to test cache eviction 5 | } 6 | 7 | require('console').listen(os.getenv('ADMIN')) 8 | -------------------------------------------------------------------------------- /test/vinyl/stress.result: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | --- 3 | ... 4 | test_run = require('test_run').new() 5 | --- 6 | ... 7 | require('stress').stress(10) 8 | --- 9 | ... 10 | test_run:cmd('restart server default') 11 | require('stress').stress(10) 12 | --- 13 | ... 14 | test_run:cmd('restart server default') 15 | -------------------------------------------------------------------------------- /test/vinyl/stress.test.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | test_run = require('test_run').new() 4 | 5 | require('stress').stress(10) 6 | 7 | test_run:cmd('restart server default') 8 | 9 | require('stress').stress(10) 10 | 11 | test_run:cmd('restart server default') 12 | -------------------------------------------------------------------------------- /test/vinyl/suite.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "options.test.lua": { 3 | "edge": {"index_options": {"range_size": 1, "page_size": 1}} 4 | }, 5 | "upgrade.test.lua": { 6 | "1.7.7": {"version": "1.7.7"} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/vinyl/upgrade.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | listen = os.getenv("LISTEN"), 5 | } 6 | 7 | require('console').listen(os.getenv('ADMIN')) 8 | -------------------------------------------------------------------------------- /test/vinyl/upgrade.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | 3 | version = test_run:get_cfg('version') 4 | work_dir = 'vinyl/upgrade/' .. version 5 | 6 | test_run:cmd('create server upgrade with script="vinyl/upgrade.lua", workdir="' .. work_dir .. '"') 7 | test_run:cmd('start server upgrade') 8 | test_run:switch('upgrade') 9 | 10 | box.space.test.index.i1:select() 11 | box.space.test.index.i2:select() 12 | box.space.test_truncate.index.i1:select() 13 | box.space.test_truncate.index.i2:select() 14 | box.space.test_split:select() 15 | box.space.test_split:select() 16 | box.space.test_drop == nil 17 | 18 | test_run:switch('default') 19 | test_run:cmd('stop server upgrade') 20 | test_run:cmd('cleanup server upgrade') 21 | -------------------------------------------------------------------------------- /test/wal_off/snapshot_stress.skipcond: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | # Disabled on FreeBSD due to flaky fail #4271. 4 | if platform.system() == 'FreeBSD': 5 | self.skip = 1 6 | 7 | # Disabled on OpenBSD due to fail #XXXX. 8 | if platform.system() == 'OpenBSD': 9 | self.skip = 1 10 | 11 | # vim: set ft=python: 12 | -------------------------------------------------------------------------------- /test/wal_off/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | script = wal.lua 4 | description = tarantool/box, wal_mode = none 5 | use_unix_sockets = True 6 | use_unix_sockets_iproto = True 7 | is_parallel = True 8 | pretest_clean = True 9 | disabled = iterator_lt_gt.test.lua 10 | fragile = iterator_lt_gt.test.lua ; gh-3925 11 | -------------------------------------------------------------------------------- /test/wal_off/wal.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg{ 4 | listen = os.getenv("LISTEN"), 5 | memtx_memory = 157374182, 6 | pid_file = "tarantool.pid", 7 | wal_mode = "none", 8 | checkpoint_count = 100 9 | } 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/wal_off/wal_mode.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | 3 | box.cfg.wal_mode 4 | space = box.schema.space.create('tweedledum') 5 | index = space:create_index('primary', { type = 'hash' }) 6 | space:insert{1} 7 | space:insert{2} 8 | space:insert{3} 9 | space.index['primary']:get(1) 10 | space.index['primary']:get(2) 11 | space.index['primary']:get(3) 12 | space.index['primary']:get(4) 13 | box.snapshot() 14 | _, e = pcall(box.snapshot) 15 | e.type, e.errno 16 | e.errno 17 | _, e = pcall(box.snapshot) 18 | e.type, e.errno 19 | e.errno 20 | space:drop() 21 | 22 | test_run:cmd("clear filter") 23 | -------------------------------------------------------------------------------- /test/xlog-py/big_lsn.result: -------------------------------------------------------------------------------- 1 | box.info.lsn 2 | --- 3 | - 0 4 | ... 5 | box.space._schema:delete('dummy') 6 | --- 7 | ... 8 | box.info.lsn 9 | --- 10 | - 123456789123 11 | ... 12 | box.space._schema:delete('dummy') 13 | --- 14 | ... 15 | box.snapshot() 16 | --- 17 | - ok 18 | ... 19 | box.info.lsn 20 | --- 21 | - 123456789124 22 | ... 23 | box.space._schema:delete('dummy') 24 | --- 25 | ... 26 | box.snapshot() 27 | --- 28 | - ok 29 | ... 30 | -------------------------------------------------------------------------------- /test/xlog-py/box.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 107374182, 7 | pid_file = "tarantool.pid", 8 | force_recovery = true, 9 | } 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/xlog-py/empty.result: -------------------------------------------------------------------------------- 1 | .xlog exists 2 | _ = box.schema.space.create('test') 3 | --- 4 | ... 5 | _ = box.schema.space.create('test') 6 | --- 7 | - error: Space 'test' already exists 8 | ... 9 | box.space.test:drop() 10 | --- 11 | ... 12 | -------------------------------------------------------------------------------- /test/xlog-py/lsn_gap.result: -------------------------------------------------------------------------------- 1 | space = box.schema.space.create('test') 2 | --- 3 | ... 4 | index = box.space.test:create_index('primary') 5 | --- 6 | ... 7 | box.space.test:insert{1, 'first tuple'} 8 | --- 9 | - [1, 'first tuple'] 10 | ... 11 | box.space.test:insert{2, 'second tuple'} 12 | --- 13 | - [2, 'second tuple'] 14 | ... 15 | box.space.test:insert{3, 'third tuple'} 16 | --- 17 | - [3, 'third tuple'] 18 | ... 19 | box.space.test:insert{4, 'fourth tuple'} 20 | --- 21 | - [4, 'fourth tuple'] 22 | ... 23 | check log line for 'ignoring a gap in LSN' 24 | 25 | 'ignoring a gap in LSN' exists in server log 26 | 27 | box.space.test:select{} 28 | --- 29 | - - [1, 'first tuple'] 30 | - [2, 'second tuple'] 31 | - [4, 'fourth tuple'] 32 | ... 33 | -------------------------------------------------------------------------------- /test/xlog-py/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = legacy python tests 4 | script = box.lua 5 | lua_libs = lua/fiber.lua lua/fifo.lua 6 | use_unix_sockets = True 7 | use_unix_sockets_iproto = True 8 | is_parallel = True 9 | -------------------------------------------------------------------------------- /test/xlog/big_tx.result: -------------------------------------------------------------------------------- 1 | env = require('test_run').new() 2 | --- 3 | ... 4 | digest = require('digest') 5 | --- 6 | ... 7 | _ = box.schema.space.create('big_tx'):create_index('pk') 8 | --- 9 | ... 10 | t = box.space.big_tx:insert({1, digest.urandom(512 * 1024)}) 11 | --- 12 | ... 13 | env:cmd('restart server default') 14 | #box.space.big_tx:select() 15 | --- 16 | - 1 17 | ... 18 | box.space.big_tx:drop() 19 | --- 20 | ... 21 | -------------------------------------------------------------------------------- /test/xlog/big_tx.test.lua: -------------------------------------------------------------------------------- 1 | env = require('test_run').new() 2 | digest = require('digest') 3 | 4 | _ = box.schema.space.create('big_tx'):create_index('pk') 5 | t = box.space.big_tx:insert({1, digest.urandom(512 * 1024)}) 6 | env:cmd('restart server default') 7 | 8 | #box.space.big_tx:select() 9 | 10 | box.space.big_tx:drop() 11 | 12 | -------------------------------------------------------------------------------- /test/xlog/force_recovery.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg { 4 | listen = os.getenv("LISTEN"), 5 | force_recovery = true 6 | } 7 | 8 | require('console').listen(os.getenv('ADMIN')) 9 | -------------------------------------------------------------------------------- /test/xlog/gh-4771-upgrade.test.lua: -------------------------------------------------------------------------------- 1 | test_run = require('test_run').new() 2 | 3 | test_run:cmd('create server upgrade with script="xlog/upgrade.lua", '.. \ 4 | 'workdir="xlog/upgrade/2.1.3/gh-4771-upgrade-sequence"') 5 | test_run:cmd('start server upgrade') 6 | test_run:switch('upgrade') 7 | 8 | box.schema.upgrade() 9 | 10 | s = box.space.test1 11 | box.space._sequence:select{} 12 | box.space._sequence_data:select{} 13 | box.space._space_sequence:select{} 14 | s:select{} 15 | _ = s:replace{box.NULL} 16 | s:select{} 17 | 18 | box.space.test2:select{} 19 | 20 | box.sequence.seq3:next() 21 | 22 | test_run:switch('default') 23 | test_run:cmd('stop server upgrade') 24 | test_run:cmd('delete server upgrade') 25 | -------------------------------------------------------------------------------- /test/xlog/gh1433.result: -------------------------------------------------------------------------------- 1 | fio = require('fio') 2 | --- 3 | ... 4 | box.space._schema:insert({'gh1433'}) 5 | --- 6 | - ['gh1433'] 7 | ... 8 | box.space._schema:delete({'gh1433'}) 9 | --- 10 | - ['gh1433'] 11 | ... 12 | glob = fio.pathjoin(box.cfg.memtx_dir, '*.snap') 13 | --- 14 | ... 15 | for _, file in pairs(fio.glob(glob)) do fio.unlink(file) end 16 | --- 17 | ... 18 | box.snapshot() 19 | --- 20 | - ok 21 | ... 22 | -------------------------------------------------------------------------------- /test/xlog/gh1433.test.lua: -------------------------------------------------------------------------------- 1 | fio = require('fio') 2 | box.space._schema:insert({'gh1433'}) 3 | box.space._schema:delete({'gh1433'}) 4 | glob = fio.pathjoin(box.cfg.memtx_dir, '*.snap') 5 | for _, file in pairs(fio.glob(glob)) do fio.unlink(file) end 6 | box.snapshot() 7 | -------------------------------------------------------------------------------- /test/xlog/panic.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 107374182, 7 | pid_file = "tarantool.pid", 8 | force_recovery = false, 9 | } 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/xlog/reader/crc.bad.xlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/crc.bad.xlog -------------------------------------------------------------------------------- /test/xlog/reader/eof.bad.xlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/eof.bad.xlog -------------------------------------------------------------------------------- /test/xlog/reader/format.bad.xlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/format.bad.xlog -------------------------------------------------------------------------------- /test/xlog/reader/v12/00000000000000000000.ok.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/v12/00000000000000000000.ok.snap -------------------------------------------------------------------------------- /test/xlog/reader/v12/00000000000000000000.ok.xlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/v12/00000000000000000000.ok.xlog -------------------------------------------------------------------------------- /test/xlog/reader/v13/00000000000000000000.ok.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/v13/00000000000000000000.ok.snap -------------------------------------------------------------------------------- /test/xlog/reader/v13/00000000000000000000.ok.xlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/v13/00000000000000000000.ok.xlog -------------------------------------------------------------------------------- /test/xlog/reader/version.bad.xlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/reader/version.bad.xlog -------------------------------------------------------------------------------- /test/xlog/replica.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg({ 4 | listen = os.getenv("LISTEN"), 5 | replication = os.getenv("MASTER"), 6 | memtx_memory = 107374182, 7 | -- pid_file = "tarantool.pid", 8 | -- logger = "tarantool.log", 9 | }) 10 | 11 | require('console').listen(os.getenv('ADMIN')) 12 | -------------------------------------------------------------------------------- /test/xlog/snap_io_rate.result: -------------------------------------------------------------------------------- 1 | digest = require'digest' 2 | --- 3 | ... 4 | fiber = require'fiber' 5 | --- 6 | ... 7 | _ = box.schema.space.create('snap'):create_index('pk') 8 | --- 9 | ... 10 | -- write > 64 mb snapshot 11 | for i = 0, 127 do box.space.snap:replace({i, digest.urandom(512 * 1024)}) end 12 | --- 13 | ... 14 | t1 = fiber.time() 15 | --- 16 | ... 17 | box.snapshot() 18 | --- 19 | - ok 20 | ... 21 | t2 = fiber.time() 22 | --- 23 | ... 24 | t2 - t1 > 64 / box.cfg.snap_io_rate_limit * 0.95 25 | --- 26 | - true 27 | ... 28 | box.space.snap:drop() 29 | --- 30 | ... 31 | -------------------------------------------------------------------------------- /test/xlog/snap_io_rate.test.lua: -------------------------------------------------------------------------------- 1 | digest = require'digest' 2 | fiber = require'fiber' 3 | 4 | _ = box.schema.space.create('snap'):create_index('pk') 5 | 6 | -- write > 64 mb snapshot 7 | for i = 0, 127 do box.space.snap:replace({i, digest.urandom(512 * 1024)}) end 8 | 9 | t1 = fiber.time() 10 | box.snapshot() 11 | t2 = fiber.time() 12 | t2 - t1 > 64 / box.cfg.snap_io_rate_limit * 0.95 13 | 14 | box.space.snap:drop() 15 | -------------------------------------------------------------------------------- /test/xlog/suite.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | core = tarantool 3 | description = tarantool write ahead log tests 4 | script = xlog.lua 5 | disabled = snap_io_rate.test.lua 6 | valgrind_disabled = 7 | release_disabled = errinj.test.lua panic_on_lsn_gap.test.lua panic_on_broken_lsn.test.lua checkpoint_threshold.test.lua 8 | use_unix_sockets = True 9 | use_unix_sockets_iproto = True 10 | long_run = snap_io_rate.test.lua 11 | is_parallel = True 12 | pretest_clean = True 13 | fragile = checkpoint_daemon.test.lua ; gh-4952 14 | panic_on_broken_lsn.test.lua ; gh-4991 15 | -------------------------------------------------------------------------------- /test/xlog/upgrade.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | 3 | box.cfg { 4 | listen = os.getenv("LISTEN"), 5 | memtx_memory = 107374182 6 | } 7 | 8 | require('console').listen(os.getenv('ADMIN')) 9 | -------------------------------------------------------------------------------- /test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/00000000000000000014.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/00000000000000000014.snap -------------------------------------------------------------------------------- /test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua: -------------------------------------------------------------------------------- 1 | box.cfg{} 2 | s1 = box.schema.create_space('test1') 3 | pk = s1:create_index('pk', {sequence = true}) 4 | s1:replace{box.NULL} 5 | 6 | seq2 = box.schema.sequence.create('seq2') 7 | s2 = box.schema.create_space('test2') 8 | pk = s2:create_index('pk', {sequence = 'seq2'}) 9 | s2:replace{box.NULL} 10 | 11 | seq3 = box.schema.sequence.create('seq3') 12 | seq3:next() 13 | 14 | box.snapshot() 15 | -------------------------------------------------------------------------------- /test/xlog/xlog.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tarantool 2 | os = require('os') 3 | 4 | box.cfg{ 5 | listen = os.getenv("LISTEN"), 6 | memtx_memory = 107374182, 7 | pid_file = "tarantool.pid", 8 | force_recovery = true, 9 | wal_max_size = 500, 10 | snap_io_rate_limit = 16 11 | } 12 | 13 | require('console').listen(os.getenv('ADMIN')) 14 | -------------------------------------------------------------------------------- /third_party/coro/README: -------------------------------------------------------------------------------- 1 | Configuration, documentation etc. is provided in the coro.h file. Please 2 | note that the file conftest.c in this distribution is under the GPL. It is 3 | not needed for proper operation of this library though, for that, coro.h 4 | and coro.c suffice. 5 | 6 | Marc Lehmann 7 | -------------------------------------------------------------------------------- /third_party/crc32.h: -------------------------------------------------------------------------------- 1 | #ifndef __BSD_CRC32_H_ 2 | #define __BSD_CRC32_H_ 3 | 4 | #include 5 | 6 | #define crc32 tnt_crc32 7 | uint32_t tnt_crc32(const void *buf, size_t size); 8 | #define crc32c tnt_crc32c 9 | uint32_t tnt_crc32c(uint32_t crc32c, const char *buffer, unsigned int length); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /third_party/libeio/CVS/Entries: -------------------------------------------------------------------------------- 1 | /Changes/1.54/Sun Oct 4 10:44:32 2015// 2 | /LICENSE/1.1/Mon Aug 17 17:43:15 2015// 3 | /Makefile.am/1.4/Mon Aug 17 17:43:15 2015// 4 | /autogen.sh/1.4/Mon Aug 17 17:43:15 2015// 5 | /configure.ac/1.10/Mon Aug 17 17:43:15 2015// 6 | /demo.c/1.4/Mon Aug 17 17:43:15 2015// 7 | /ecb.h/1.26/Sun Oct 4 10:44:32 2015// 8 | /eio.3/1.1/Mon Aug 17 17:43:15 2015// 9 | /eio.c/1.139/Sun Oct 4 10:44:32 2015// 10 | /eio.h/1.56/Sun Oct 4 10:44:32 2015// 11 | /eio.pod/1.35/Mon Aug 17 17:43:15 2015// 12 | /etp.c/1.10/Sun Oct 4 10:44:32 2015// 13 | /libeio.m4/1.23/Sun Oct 4 10:44:32 2015// 14 | /xthread.h/1.18/Sun Oct 4 10:44:32 2015// 15 | D 16 | -------------------------------------------------------------------------------- /third_party/libeio/CVS/Repository: -------------------------------------------------------------------------------- 1 | libeio 2 | -------------------------------------------------------------------------------- /third_party/libeio/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.schmorp.de/schmorpforge 2 | -------------------------------------------------------------------------------- /third_party/libeio/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign no-dependencies 2 | 3 | VERSION_INFO = 1:0 4 | 5 | EXTRA_DIST = LICENSE Changes autogen.sh etp.c 6 | 7 | #man_MANS = ev.3 8 | 9 | include_HEADERS = eio.h 10 | 11 | lib_LTLIBRARIES = libeio.la 12 | 13 | libeio_la_SOURCES = eio.c ecb.h xthread.h config.h 14 | libeio_la_LDFLAGS = -version-info $(VERSION_INFO) 15 | 16 | -------------------------------------------------------------------------------- /third_party/libeio/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf --install --symlink --force 4 | -------------------------------------------------------------------------------- /third_party/libeio/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.59) 2 | AC_INIT 3 | AC_CONFIG_SRCDIR([eio.h]) 4 | AC_CONFIG_HEADERS([config.h]) 5 | 6 | AM_INIT_AUTOMAKE(libeio,1.0) 7 | AM_MAINTAINER_MODE 8 | 9 | AC_GNU_SOURCE 10 | 11 | AC_PROG_LIBTOOL 12 | 13 | AC_PROG_CC 14 | 15 | if test "x$GCC" = xyes ; then 16 | CFLAGS="-O3 $CFLAGS" 17 | fi 18 | 19 | m4_include([libeio.m4]) 20 | 21 | AC_CONFIG_FILES([Makefile]) 22 | AC_OUTPUT 23 | -------------------------------------------------------------------------------- /third_party/libev/CVS/Repository: -------------------------------------------------------------------------------- 1 | libev 2 | -------------------------------------------------------------------------------- /third_party/libev/CVS/Root: -------------------------------------------------------------------------------- 1 | :pserver:anonymous@cvs.schmorp.de/schmorpforge 2 | -------------------------------------------------------------------------------- /third_party/libev/Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = foreign 2 | 3 | VERSION_INFO = 4:0:0 4 | 5 | EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ 6 | ev_vars.h ev_wrap.h \ 7 | ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ 8 | ev.3 ev.pod Symbols.ev Symbols.event 9 | 10 | man_MANS = ev.3 11 | 12 | include_HEADERS = ev.h ev++.h event.h 13 | 14 | lib_LTLIBRARIES = libev.la 15 | 16 | libev_la_SOURCES = ev.c event.c 17 | libev_la_LDFLAGS = -version-info $(VERSION_INFO) 18 | 19 | ev.3: ev.pod 20 | pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@ 21 | -------------------------------------------------------------------------------- /third_party/libev/README.embed: -------------------------------------------------------------------------------- 1 | This file is now included in the main libev documentation, see 2 | 3 | http://cvs.schmorp.de/libev/ev.html 4 | -------------------------------------------------------------------------------- /third_party/libev/Symbols.event: -------------------------------------------------------------------------------- 1 | event_active 2 | event_add 3 | event_base_dispatch 4 | event_base_free 5 | event_base_get_method 6 | event_base_loop 7 | event_base_loopexit 8 | event_base_new 9 | event_base_once 10 | event_base_priority_init 11 | event_base_set 12 | event_del 13 | event_dispatch 14 | event_get_callback 15 | event_get_method 16 | event_get_version 17 | event_init 18 | event_loop 19 | event_loopexit 20 | event_once 21 | event_pending 22 | event_priority_init 23 | event_priority_set 24 | event_set 25 | -------------------------------------------------------------------------------- /third_party/libev/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf --install --symlink --force 4 | -------------------------------------------------------------------------------- /third_party/libev/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT 2 | 3 | orig_CFLAGS="$CFLAGS" 4 | 5 | AC_CONFIG_SRCDIR([ev_epoll.c]) 6 | 7 | dnl also update ev.h! 8 | AM_INIT_AUTOMAKE(libev,4.24) 9 | AC_CONFIG_HEADERS([config.h]) 10 | AM_MAINTAINER_MODE 11 | 12 | AC_PROG_CC 13 | 14 | dnl Supply default CFLAGS, if not specified 15 | if test -z "$orig_CFLAGS"; then 16 | if test x$GCC = xyes; then 17 | CFLAGS="-g -O3" 18 | fi 19 | fi 20 | 21 | AC_PROG_INSTALL 22 | AC_PROG_LIBTOOL 23 | 24 | m4_include([libev.m4]) 25 | 26 | AC_CONFIG_FILES([Makefile]) 27 | AC_OUTPUT 28 | -------------------------------------------------------------------------------- /third_party/libev/update_ev_c: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | ( 4 | sed -ne '1,\%/\* ECB.H BEGIN \*/%p' ev.c 5 | cat ~/src/libecb/ecb.h 6 | sed -ne '\%/\* ECB.H END \*/%,$p' ev.c 7 | ) >ev.c~ && mv ev.c~ ev.c 8 | 9 | -------------------------------------------------------------------------------- /third_party/libev/update_ev_wrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ( 4 | echo '#define VAR(name,decl) name' 5 | echo '#define EV_GENWRAP 1' 6 | cat ev_vars.h 7 | ) | cc -E -o - - | perl -ne ' 8 | while (<>) { 9 | push @syms, $1 if /(^\w+)/; 10 | } 11 | print "/* DO NOT EDIT, automatically generated by update_ev_wrap */\n", 12 | "#ifndef EV_WRAP_H\n", 13 | "#define EV_WRAP_H\n", 14 | (map "#define $_ ((loop)->$_)\n", sort @syms), 15 | "#else\n", 16 | "#undef EV_WRAP_H\n", 17 | (map "#undef $_\n", sort @syms), 18 | "#endif\n"; 19 | ' >ev_wrap.h 20 | -------------------------------------------------------------------------------- /third_party/libev/update_symbols: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | make ev.o event.o || exit 4 | 5 | nm ev.o | perl -ne 'print "$1\n" if /\S+ [A-Z] (\S+)/' > Symbols.ev 6 | nm event.o | perl -ne 'print "$1\n" if /\S+ [A-Z] (\S+)/' > Symbols.event 7 | 8 | -------------------------------------------------------------------------------- /third_party/libutil_freebsd/libutil.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBUTIL_FREEBSD_H_INCLUDED 2 | #define LIBUTIL_FREEBSD_H_INCLUDED 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | int 11 | flopen(const char *path, int flags, ...); 12 | 13 | struct pidfh; 14 | 15 | struct pidfh * 16 | pidfile_open(const char *path, mode_t mode, pid_t *pidptr); 17 | 18 | int 19 | pidfile_write(struct pidfh *pfh); 20 | 21 | int 22 | pidfile_close(struct pidfh *pfh); 23 | 24 | int 25 | pidfile_remove(struct pidfh *pfh); 26 | 27 | int 28 | pidfile_fileno(const struct pidfh *pfh); 29 | 30 | #ifdef __cplusplus 31 | } /* extern "C" { */ 32 | #endif 33 | 34 | #endif /* LIBUTIL_FREEBSD_H_INCLUDED */ 35 | -------------------------------------------------------------------------------- /third_party/lua-cjson/lua_cjson.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_CJSON_H 2 | #define LUA_CJSON_H 1 3 | 4 | #if defined(__cplusplus) 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | LUALIB_API int 11 | luaopen_json(lua_State *L); 12 | 13 | #if defined(__cplusplus) 14 | } /* extern "C" */ 15 | #endif 16 | 17 | #endif /* LUA_CJSON_H */ 18 | -------------------------------------------------------------------------------- /third_party/lua-yaml/HISTORY: -------------------------------------------------------------------------------- 1 | 0.1: May 12 2009 2 | * initial release 3 | 4 | 0.2: November 23 2009 5 | * updated libyaml to version 0.1.3 6 | * now properly dumps and loads strings containing binary data using base64 7 | * dumped strings are quoted when they could be loaded as numbers 8 | * nulls are loaded as yaml.null, a function that returns itself and can 9 | be used to test for equality 10 | * load now also recognizes 'yes' as a boolean truth value 11 | * zero length scalars are not converted to nil 12 | -------------------------------------------------------------------------------- /third_party/lua-yaml/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kostja/tarantool/bb1e7d39e7911e52f3d89b4b79b485727b6584f4/third_party/lua-yaml/README -------------------------------------------------------------------------------- /third_party/lua-yaml/TODO: -------------------------------------------------------------------------------- 1 | * allow creating dump/load objects with internal configuration settings 2 | * better error checking when using LibYAML dump functions 3 | * potentially support additional Lua types (functions?) 4 | -------------------------------------------------------------------------------- /third_party/lua-yaml/b64.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int frombase64(lua_State *, const unsigned char *, unsigned int); 4 | int tobase64(lua_State *, int); 5 | -------------------------------------------------------------------------------- /third_party/qsort_arg.h: -------------------------------------------------------------------------------- 1 | #ifndef QSORT_ARG_H 2 | #define QSORT_ARG_H 3 | 4 | #include 5 | #include 6 | 7 | #if defined(__cplusplus) 8 | extern "C" { 9 | #endif /* defined(__cplusplus) */ 10 | 11 | /** 12 | * General version of qsort that calls single-threaded of multi-threaded 13 | * qsort depending on open MP availability and given array size. 14 | */ 15 | void qsort_arg(void *a, size_t n, size_t es, 16 | int (*cmp)(const void *a, const void *b, void *arg), void *arg); 17 | 18 | #if defined(__cplusplus) 19 | } 20 | #endif /* defined(__cplusplus) */ 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /third_party/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef TS_SHA1_H_INCLUDED 2 | #define TS_SHA1_H_INCLUDED 3 | 4 | #include 5 | 6 | /* ================ sha1.h ================ */ 7 | /* 8 | SHA-1 in C 9 | By Steve Reid 10 | 100% Public Domain 11 | */ 12 | 13 | typedef struct { 14 | uint32_t state[5]; 15 | uint32_t count[2]; 16 | unsigned char buffer[64]; 17 | } SHA1_CTX; 18 | 19 | void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); 20 | void SHA1Init(SHA1_CTX* context); 21 | void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len); 22 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context); 23 | 24 | #endif 25 | --------------------------------------------------------------------------------