1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Added isolation levels

Added SELECT .. FOR UPDATE and SELECT .. IN SHARE MODE
This commit is contained in:
monty@tik.mysql.fi
2001-03-21 01:02:22 +02:00
parent ef75476c67
commit 6f9a73a1ba
22 changed files with 381 additions and 142 deletions

View File

@@ -108,7 +108,7 @@ enum db_type { DB_TYPE_UNKNOWN=0,DB_TYPE_DIAB_ISAM=1,
DB_TYPE_HASH,DB_TYPE_MISAM,DB_TYPE_PISAM,
DB_TYPE_RMS_ISAM, DB_TYPE_HEAP, DB_TYPE_ISAM,
DB_TYPE_MRG_ISAM, DB_TYPE_MYISAM, DB_TYPE_MRG_MYISAM,
DB_TYPE_BERKELEY_DB, DB_TYPE_INNOBASE,
DB_TYPE_BERKELEY_DB, DB_TYPE_INNOBASE, DB_TYPE_GEMINI,
DB_TYPE_DEFAULT };
enum row_type { ROW_TYPE_DEFAULT, ROW_TYPE_FIXED, ROW_TYPE_DYNAMIC,
@@ -127,6 +127,9 @@ typedef struct st_thd_trans {
void *gemini_tid;
} THD_TRANS;
enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED,
ISO_REPEATABLE_READ, ISO_SERIALIZABLE};
typedef struct st_ha_create_information
{
ulong table_options;
@@ -310,7 +313,7 @@ public:
/* Some extern variables used with handlers */
extern const char *ha_row_type[];
extern TYPELIB ha_table_typelib;
extern TYPELIB ha_table_typelib, tx_isolation_typelib;
/* Wrapper functions */
#define ha_commit_stmt(thd) (ha_commit_trans((thd), &((thd)->transaction.stmt)))
@@ -332,5 +335,6 @@ void ha_key_cache(void);
int ha_commit_trans(THD *thd, THD_TRANS *trans);
int ha_rollback_trans(THD *thd, THD_TRANS *trans);
int ha_autocommit_or_rollback(THD *thd, int error);
void ha_set_spin_retries(uint retries);
bool ha_flush_logs(void);