20
20
#include "config.h"
21
#include <drizzled/ha_trx_info.h>
22
#include <drizzled/plugin/storage_engine.h>
23
#include <drizzled/session.h>
25
using namespace drizzled;
27
void Ha_trx_info::register_ha(Session_TRANS *trans,
28
plugin::StorageEngine *engine_arg)
21
#include "drizzled/resource_context.h"
31
assert(m_engine == NULL);
32
assert(m_next == NULL);
35
m_flags= (int) TRX_READ_ONLY; /* Assume read-only at start. */
37
m_next= trans->ha_list;
42
30
/** Clear, prepare for reuse. */
43
void Ha_trx_info::reset()
50
void Ha_trx_info::set_trx_read_write()
53
m_flags|= (int) TRX_READ_WRITE;
57
bool Ha_trx_info::is_trx_read_write() const
60
return m_flags & (int) TRX_READ_WRITE;
64
bool Ha_trx_info::is_started() const
66
return m_engine != NULL;
31
void ResourceContext::reset()
37
void ResourceContext::set_trx_read_write()
44
bool ResourceContext::is_trx_read_write() const
51
bool ResourceContext::is_started() const
53
return resource != NULL;
70
56
/** Mark this transaction read-write if the argument is read-write. */
71
void Ha_trx_info::coalesce_trx_with(const Ha_trx_info *stmt_trx)
57
void ResourceContext::coalesce_trx_with(const ResourceContext *stmt_trx)
74
60
Must be called only after the transaction has been started.