Skip to content
Snippets Groups Projects
Commit 2ba3e801 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Merge remote-tracking branch 'origin/master' into gh-578-join-thread-3

parents 5e83740a 2231e3da
No related branches found
No related tags found
No related merge requests found
...@@ -205,20 +205,16 @@ SophiaFactory::keydefCheck(struct key_def *key_def) ...@@ -205,20 +205,16 @@ SophiaFactory::keydefCheck(struct key_def *key_def)
void void
SophiaFactory::txnFinish(struct txn *txn) SophiaFactory::txnFinish(struct txn *txn)
{ {
/** /* @todo: multi-statement transactions */
* @todo: support multi-statement transactions
* here when sophia supports them. /* single-stmt case */
*/ if (txn->n_stmts == 1) {
struct txn_stmt *stmt = txn_stmt(txn);
/* single-stmt case: if (stmt->new_tuple) {
* /* 2 refs: iproto case */
* no need to unref tuple here, since it will be done by /* 3 refs: lua case */
* TupleGuard in execute_replace(). assert(stmt->new_tuple->refs >= 2);
*/ tuple_unref(stmt->new_tuple);
(void)txn; }
#if 0 }
struct txn_stmt *stmt = txn_stmt(txn);
if (stmt->new_tuple)
tuple_unref(stmt->new_tuple);
#endif
} }
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
void void
lbox_trigger_destroy(struct trigger *trigger) lbox_trigger_destroy(struct trigger *trigger)
{ {
luaL_unref(tarantool_L, LUA_REGISTRYINDEX, (intptr_t) trigger->data); if (tarantool_L)
luaL_unref(tarantool_L,
LUA_REGISTRYINDEX, (intptr_t) trigger->data);
free(trigger); free(trigger);
} }
......
#!/usr/bin/env tarantool
-- vim: set ft=lua :
-- see https://github.com/tarantool/tarantool/issues/583
tap = require 'tap'
fio = require 'fio'
log = require 'log'
tempdir = fio.tempdir()
box.cfg {
wal_dir = tempdir,
snap_dir = tempdir,
sophia_dir = tempdir,
logger = fio.pathjoin(tempdir, 'tarantool.log')
}
local function test_replace(old_tuple, new_tuple)
end
box.schema.create_space('abc')
box.space.abc:create_index('pk', { type = 'tree' })
box.space.abc:on_replace(test_replace)
cleanup_list = fio.glob(fio.pathjoin(tempdir), '*')
for _, file in pairs(cleanup_list) do
fio.unlink(file)
end
fio.rmdir(tempdir)
os.exit(0)
# vim: set ft=python :
import re
import os.path
import socket
import os
test_path = '/tmp/tarantool-test-socket'
if os.path.exists(test_path):
os.remove(test_path)
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
try:
s.bind(test_path)
except:
self.skip = 1
s.close()
if os.path.exists(test_path):
os.remove(test_path)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment