diff --git a/src/box/engine.h b/src/box/engine.h index 34a2d78b901a51b9bafdc41658a61856d8771805..0498e40e276f268267857e59d0e8cf26455c5a60 100644 --- a/src/box/engine.h +++ b/src/box/engine.h @@ -34,9 +34,8 @@ struct space; struct tuple; enum engine_flags { - ENGINE_TRANSACTIONAL = 1, - ENGINE_NO_YIELD = 2, - ENGINE_CAN_BE_TEMPORARY = 4, + ENGINE_NO_YIELD = 1, + ENGINE_CAN_BE_TEMPORARY = 2, /** * Identifies that engine can handle changes * of primary key during update. @@ -48,7 +47,7 @@ enum engine_flags { * If the flag is not set, the server will verify * that the primary key is not changed. */ - ENGINE_AUTO_CHECK_UPDATE = 8, + ENGINE_AUTO_CHECK_UPDATE = 4, }; extern uint32_t engine_flags[BOX_ENGINE_MAX]; @@ -204,12 +203,6 @@ Engine *engine_find(const char *name); /** Shutdown all engine factories. */ void engine_shutdown(); -static inline bool -engine_transactional(uint32_t flags) -{ - return flags & ENGINE_TRANSACTIONAL; -} - static inline bool engine_no_yield(uint32_t flags) { diff --git a/src/box/memtx_engine.cc b/src/box/memtx_engine.cc index bb7135c45184d70a3dcf6fb0ef4516c1c9affd21..b64baafd6575abf3795d911028968bd82a5ee853 100644 --- a/src/box/memtx_engine.cc +++ b/src/box/memtx_engine.cc @@ -93,8 +93,7 @@ MemtxEngine::MemtxEngine() m_snapshot_lsn(-1), m_snapshot_pid(0) { - flags = ENGINE_TRANSACTIONAL | - ENGINE_NO_YIELD | + flags = ENGINE_NO_YIELD | ENGINE_CAN_BE_TEMPORARY | ENGINE_AUTO_CHECK_UPDATE; memtx_recovery_prepare(&recovery); diff --git a/src/box/sophia_engine.cc b/src/box/sophia_engine.cc index dbbff9fd8318d85eb9019a73c22252ff622989e8..4be24222f0d4cb950cd43cc6246af0b3b919914a 100644 --- a/src/box/sophia_engine.cc +++ b/src/box/sophia_engine.cc @@ -111,7 +111,7 @@ SophiaEngine::SophiaEngine() ,m_prev_checkpoint_lsn(-1) ,m_checkpoint_lsn(-1) { - flags = ENGINE_TRANSACTIONAL; + flags = 0; env = NULL; recovery.state = READY_NO_KEYS; recovery.recover = sophia_recovery_begin_snapshot; diff --git a/src/box/txn.cc b/src/box/txn.cc index 14119838f130bc1655b6ea1bf7e9122666aef45d..6d23a89b08c7c58f9264a65a6050b070dc5f4248 100644 --- a/src/box/txn.cc +++ b/src/box/txn.cc @@ -163,11 +163,6 @@ txn_engine_begin_stmt(struct txn *txn, struct space *space) if (txn->n_stmts == 1) { /* First statement. */ txn->engine = engine; - if (txn->autocommit == false) { - if (! engine_transactional(engine->flags)) - tnt_raise(ClientError, ER_UNSUPPORTED, - space->def.engine_name, "transactions"); - } } else { if (txn->engine->id != engine_id(space->handler)) tnt_raise(ClientError, ER_CROSS_ENGINE_TRANSACTION);