NCBI C++ ToolKit
Macros | Functions | Variables
transaction2.c File Reference
#include "common.h"
#include <common/test_assert.h>
+ Include dependency graph for transaction2.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define SWAP(t, a, b)   do { t xyz = a; a = b; b = xyz; } while(0)
 
#define SWAP_CONN()   do { SWAP(HENV,env,odbc_env); SWAP(HDBC,dbc,odbc_conn); SWAP(HSTMT,stmt,odbc_stmt);} while(0)
 

Functions

static void ReadErrorConn (void)
 
static void AutoCommit (int onoff)
 
static void EndTransaction (SQLSMALLINT type)
 
static int CheckDirtyRead (void)
 
static int CheckNonrepeatableRead (void)
 
static int CheckPhantom (void)
 
static void my_attrs (void)
 
static void ConnectWithTxn (int txn)
 
static int Test (int txn, const char *expected)
 
int main (int argc, char *argv[])
 

Variables

static HENV env = SQL_NULL_HENV
 
static HDBC dbc = SQL_NULL_HDBC
 
static HSTMT stmt = SQL_NULL_HSTMT
 
static int test_with_connect = 0
 
static int global_txn
 
static int hide_error
 

Macro Definition Documentation

◆ SWAP

#define SWAP (   t,
  a,
  b 
)    do { t xyz = a; a = b; b = xyz; } while(0)

Definition at line 35 of file transaction2.c.

◆ SWAP_CONN

#define SWAP_CONN ( )    do { SWAP(HENV,env,odbc_env); SWAP(HDBC,dbc,odbc_conn); SWAP(HSTMT,stmt,odbc_stmt);} while(0)

Definition at line 36 of file transaction2.c.

Function Documentation

◆ AutoCommit()

static void AutoCommit ( int  onoff)
static

Definition at line 24 of file transaction2.c.

References CHKSetConnectAttr, int2ptr, and SQL_ATTR_AUTOCOMMIT.

Referenced by main(), and my_attrs().

◆ CheckDirtyRead()

static int CheckDirtyRead ( void  )
static

◆ CheckNonrepeatableRead()

static int CheckNonrepeatableRead ( void  )
static

◆ CheckPhantom()

static int CheckPhantom ( void  )
static

◆ ConnectWithTxn()

static void ConnectWithTxn ( int  txn)
static

Definition at line 159 of file transaction2.c.

References global_txn, my_attrs(), NULL, odbc_connect(), and odbc_set_conn_attr.

Referenced by Test().

◆ EndTransaction()

static void EndTransaction ( SQLSMALLINT  type)
static

Definition at line 30 of file transaction2.c.

References CHKEndTran, odbc_conn, and SQL_HANDLE_DBC.

Referenced by CheckDirtyRead(), CheckNonrepeatableRead(), CheckPhantom(), and main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ my_attrs()

static void my_attrs ( void  )
static

◆ ReadErrorConn()

static void ReadErrorConn ( void  )
static

Definition at line 8 of file transaction2.c.

References C, CHKGetDiagRec, NULL, odbc_conn, odbc_err, ODBC_FREE, ODBC_GET, odbc_sqlstate, and SQL_HANDLE_DBC.

Referenced by main().

◆ Test()

static int Test ( int  txn,
const char *  expected 
)
static

Variable Documentation

◆ dbc

HDBC dbc = SQL_NULL_HDBC
static

◆ env

HENV env = SQL_NULL_HENV
static

Definition at line 38 of file transaction2.c.

Referenced by _SQLAllocConnect(), _SQLAllocEnv(), _SQLFreeEnv(), _SQLGetDiagField(), AddFunc_Arg(), AddIn_Arg(), CNcbiTestApplication::AdjustTestTimeout(), CDirectCGIExec::Ask(), BDB_CreateEnv(), BDB_ParseQuery(), CMSAToolJob::BeforeRun(), CGRPCServerCallbacks::BeginRequest(), BisonSaveStageResult(), BOOST_AUTO_TEST_CASE(), CAutoEnvironmentVariable::CAutoEnvironmentVariable(), CBDB_FileCursor::CBDB_FileCursor(), CCgiRequest::CCgiRequest(), CDBInterfacesFileConnParams::CDBInterfacesFileConnParams(), CJavaLogHandler::CJavaLogHandler(), CMagicBlast::CMagicBlast(), CNcbiApplogApp::Cmd_Generate(), CGridCommandLineInterfaceApp::Cmd_Replay(), CCgiApplication::CreateContext(), CCgiApplication::CreateContextWithFlags(), CCgi2RCgiApp::CreateContextWithFlags(), CCgiApplication::CreateContextWithFlags_Default(), CJniUtil::CreateCStyleArgs(), CJniUtil::DescribeJavaException(), CRemoteCgiJob::Do(), CSimpleEnvRegMapper::EnvToReg(), CNcbiEnvRegMapper::EnvToReg(), CRemoteAppLauncher::ExecRemoteApp(), CGenericSearchArgs::ExtractAlgorithmOptions(), CIgBlastArgs::ExtractAlgorithmOptions(), CSeqDBAtlas::GenerateSearchPath(), CJniUtil::GetArgsFromNcbiApp(), CSeqDBLMDB::GetDBTaxIds(), CAppEnvHolder::GetEnv(), CJniUtil::GetEnv(), CWinMaskerFileStorage::GetEnvPath(), CJavaLogHandler::GetLevel(), CSeqDBLMDB::GetOid(), CSeqDBLMDB::GetOids(), CSeqDBLMDB::GetOidsForTaxIds(), GetSybaseClientVersion(), CSeqDBLMDB::GetVolumesInfo(), HINFO_Create(), CTaxon3::Init(), CBlastLMDBManager::CBlastEnv::InitDbi(), CNcbiTestApplication::InitTestFramework(), SRemoteCgi::Input(), CMsvcSite::IsProvided(), Java_org_ncbi_toolkit_NcbiToolkit_init0(), Java_org_ncbi_toolkit_NcbiToolkit_testLog(), CJniUtil::JavaFatalError(), LBSMD_GetHostParameter(), CBDB_SplitTest::LoadTestSet(), CCgiApplication::LogRequest(), main(), mdb_assert_fail(), mdb_branch_size(), mdb_cursor_put(), mdb_dbi_close(), mdb_dbis_update(), mdb_dlist_free(), mdb_dpage_free(), mdb_env_close(), mdb_env_close1(), mdb_env_copy(), mdb_env_copy2(), mdb_env_copyfd(), mdb_env_copyfd0(), mdb_env_copyfd1(), mdb_env_copyfd2(), mdb_env_create(), mdb_env_excl_lock(), mdb_env_get_fd(), mdb_env_get_flags(), mdb_env_get_maxkeysize(), mdb_env_get_maxreaders(), mdb_env_get_path(), mdb_env_get_userctx(), mdb_env_info(), mdb_env_init_meta(), mdb_env_init_meta0(), mdb_env_map(), mdb_env_open(), mdb_env_open2(), mdb_env_pick_meta(), mdb_env_read_header(), mdb_env_set_assert(), mdb_env_set_flags(), mdb_env_set_mapsize(), mdb_env_set_maxdbs(), mdb_env_set_maxreaders(), mdb_env_set_userctx(), mdb_env_setup_locks(), mdb_env_share_locks(), mdb_env_stat(), mdb_env_sync(), mdb_env_write_meta(), mdb_fopen(), mdb_freelist_save(), mdb_leaf_size(), mdb_ovpage_free(), mdb_page_alloc(), mdb_page_flush(), mdb_page_free(), mdb_page_get(), mdb_page_malloc(), mdb_page_split(), mdb_page_unspill(), mdb_reader_check(), mdb_reader_check0(), mdb_reader_list(), mdb_reader_pid(), mdb_stat0(), mdb_txn_begin(), mdb_txn_commit(), mdb_txn_end(), mdb_txn_renew0(), ncbi_q_parse(), NCBITEST_AUTO_INIT(), NCBITEST_INIT_TREE(), odbc_connect(), CPipeHandle::Open(), CQueryParseTree::Parse(), CJavaLogHandler::Post(), CHttpRequest::PrintLogFields(), CDiagContext::PrintStart(), CCgiSampleApplication::ProcessPrintEnvironment(), CCgi2RCgiApp::ProcessRequest(), QTreeAddNode(), CSoapMessage::Read(), ReadEnvironment(), impl::CDriverContext::ResetEnvSybase(), CExec::ResolvePath(), CMagicBlastApp::Run(), CBDBEnvKeeperApp::Run(), CRunTestApplication::Run(), CPackString::s_GetEnvFlag(), s_GetNextInfo(), s_GetNumDbsPerChunk(), s_init_NewTaxVal(), s_init_UseGeoLocNameForCountry(), s_Match(), CCgiRequest::Serialize(), CBDB_BlobDictStore< Key, Dictionary, Store >::SetEnv(), CBDB_ExtBlobStore< TBV >::SetEnv(), CBDB_RawFile::SetEnv(), CBDB_BlobSplitStore< BV, CBDB_BlobDeMuxPersistent, CFastMutex >::SetEnv(), sx_InitFillNewMemoryMode(), tds_save_env(), CJniUtil::ThrowJavaException(), CSoapMessage::Write(), CDllResolver::x_AddExtraDllPath(), CSoapMessage::x_Check(), CCgiResponse::x_ClientSupportsChunkedTransfer(), CBDB_CacheReaderCF::x_CreateInstance(), CTrackingEnvHolder::x_Destroy(), CRemoteBlast::x_GetSearchResultsHTTP(), CWriteDB_TaxID::x_IncreaseEnvMapSize(), CWriteDB_LMDB::x_IncreaseEnvMapSize(), CCgiRequest::x_Init(), CDisplaySeqalign::x_InitDefLinesHeader(), CRemoteBlast::x_InitDiskCache(), CRequestContext::x_LoadEnvContextProperties(), CDiagContext::x_LogEnvironment(), CNcbiApplicationAPI::x_LogOptions(), CDisplaySeqalign::x_MapDefLine(), x_mdb_txn_begin(), CDisplaySeqalign::x_PrintDefLine(), CFastCgiApplicationMT::x_ProcessThreadedRequest(), CRemoteBlast::x_SetAlgoOpts(), CNcbiTestApplication::x_SetupBoostReporters(), and x_SetupHttpProxy().

◆ global_txn

int global_txn
static

Definition at line 147 of file transaction2.c.

Referenced by ConnectWithTxn(), and my_attrs().

◆ hide_error

int hide_error
static

Definition at line 149 of file transaction2.c.

Referenced by main(), and Test().

◆ stmt

HSTMT stmt = SQL_NULL_HSTMT
static

Definition at line 40 of file transaction2.c.

◆ test_with_connect

int test_with_connect = 0
static

Definition at line 145 of file transaction2.c.

Referenced by main(), and Test().

Modified on Tue May 28 05:52:09 2024 by modify_doxy.py rev. 669887