summaryrefslogtreecommitdiff
path: root/innobase/include/trx0trx.h
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include/trx0trx.h')
-rw-r--r--innobase/include/trx0trx.h39
1 files changed, 36 insertions, 3 deletions
diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h
index 261f33d3dc3..e1f65e9da0f 100644
--- a/innobase/include/trx0trx.h
+++ b/innobase/include/trx0trx.h
@@ -117,6 +117,13 @@ void
trx_start_if_not_started(
/*=====================*/
trx_t* trx); /* in: transaction */
+/*****************************************************************
+Starts the transaction if it is not yet started. */
+
+void
+trx_start_if_not_started_noninline(
+/*===============================*/
+ trx_t* trx); /* in: transaction */
/********************************************************************
Commits a transaction. */
@@ -124,6 +131,15 @@ void
trx_commit_off_kernel(
/*==================*/
trx_t* trx); /* in: transaction */
+/********************************************************************
+Cleans up a transaction at database startup. The cleanup is needed if
+the transaction already got to the middle of a commit when the database
+crashed, andf we cannot roll it back. */
+
+void
+trx_cleanup_at_db_startup(
+/*======================*/
+ trx_t* trx); /* in: transaction */
/**************************************************************************
Does the transaction commit for MySQL. */
@@ -252,7 +268,9 @@ own the kernel mutex. */
void
trx_print(
/*======*/
- trx_t* trx); /* in: transaction */
+ char* buf, /* in/out: buffer where to print, must be at least
+ 800 bytes */
+ trx_t* trx); /* in: transaction */
/* Signal to a transaction */
@@ -298,6 +316,9 @@ struct trx_struct{
of view of concurrency control:
TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY,
... */
+ time_t start_time; /* time the trx object was created
+ or the state last time became
+ TRX_ACTIVE */
ibool check_foreigns; /* normally TRUE, but if the user
wants to suppress foreign key checks,
(in table imports, for example) we
@@ -322,13 +343,24 @@ struct trx_struct{
void* mysql_thd; /* MySQL thread handle corresponding
to this trx, or NULL */
char* mysql_log_file_name;
- /* If MySQL binlog is used, this field
+ /* if MySQL binlog is used, this field
contains a pointer to the latest file
name; this is NULL if binlog is not
used */
- ib_longlong mysql_log_offset;/* If MySQL binlog is used, this field
+ ib_longlong mysql_log_offset;/* if MySQL binlog is used, this field
contains the end offset of the binlog
entry */
+ char* mysql_master_log_file_name;
+ /* if the database server is a MySQL
+ replication slave, we have here the
+ master binlog name up to which
+ replication has processed; otherwise
+ this is a pointer to a null character */
+ ib_longlong mysql_master_log_pos;
+ /* if the database server is a MySQL
+ replication slave, this is the
+ position in the log file up to which
+ replication has processed */
os_thread_id_t mysql_thread_id;/* id of the MySQL thread associated
with this transaction object */
/*------------------------------*/
@@ -446,6 +478,7 @@ struct trx_struct{
TRX_QUE_LOCK_WAIT, this points to
the lock request, otherwise this is
NULL */
+ time_t wait_started; /* lock wait started at this time */
UT_LIST_BASE_NODE_T(que_thr_t)
wait_thrs; /* query threads belonging to this
trx that are in the QUE_THR_LOCK_WAIT