InnoDB事务结构体代码变量列表
事務(wù)結(jié)構(gòu) struct trx_t
寫(xiě)在前面
InnoDB是MySQL的一個(gè)存儲(chǔ)引擎,支持事務(wù),支持非堵塞的一致性讀,物理存儲(chǔ)結(jié)構(gòu)是Page,每個(gè)事務(wù)都有回滾日志,重做日志,事務(wù)還會(huì)有死鎖檢測(cè),各種各樣不同的鎖等等等等
翻看innodb的源碼,發(fā)現(xiàn)數(shù)下來(lái)開(kāi)啟一個(gè)事務(wù)的時(shí)候,InnoDB需要處理63個(gè)變量,變量類(lèi)型紛繁復(fù)雜,結(jié)構(gòu)體,自定義的數(shù)據(jù)類(lèi)型等等。
這次整理,我翻看了不少同行們寫(xiě)的博客,包括InnoDB官方博客,有一個(gè)心得是不同人的翻譯不一樣,盡管是官方寫(xiě)的博客,也會(huì)因?yàn)橐恍┢鶈?wèn)題,減掉了一些細(xì)節(jié)的介紹。這次的整理,我特意保留了原來(lái)的英文備注,然后加上自己的理解進(jìn)去。
MySQL的源碼文件很多,InnoDB也不少,不過(guò)我覺(jué)得事務(wù)的結(jié)構(gòu)體代碼還是要理解透的,透了才能理解透事務(wù)的實(shí)現(xiàn)細(xì)節(jié),更加深入認(rèn)識(shí)數(shù)據(jù)庫(kù)系統(tǒng)為了保證數(shù)據(jù)的一致性,做了多少事情....
文件地址
文件地址
storage/innobase/include/trx0trx.h
變量1 magic_n
變量類(lèi)型 ulint #define ulint unsigned long
變量2 mutex
變量類(lèi)型 ib_mutex_t
mutex的代碼備注
Mutex protecting the fields state and lock (except some fields of lock, which are protected by lock_sys->mutex) Mutex保護(hù)字段的狀態(tài)和鎖定(除了某些鎖定字段,由lock_sys-> mutex保護(hù))
ib_mutex_t對(duì)應(yīng)的結(jié)構(gòu)體
/** InnoDB mutex */ struct ib_mutex_t {os_event_t event; /*!< Used by sync0arr.cc for the wait queue */volatile lock_word_t lock_word; /*!< lock_word is the targetof the atomic test-and-set instruction whenatomic operations are enabled. */這里面又有另外一個(gè)結(jié)構(gòu)體 os_event_t
/** An asynchronous signal sent between threads */ struct os_event { #ifdef __WIN__HANDLE handle; /*!< kernel event object, slow,used on older Windows */ #endifos_fast_mutex_t os_mutex; /*!< this mutex protects the nextfields */ibool is_set; /*!< this is TRUE when the event isin the signaled state, i.e., a threaddoes not stop if it tries to wait forthis event */ib_int64_t signal_count; /*!< this is incremented each timethe event becomes signaled */os_cond_t cond_var; /*!< condition variable is used inwaiting for the event */UT_LIST_NODE_T(os_event_t) os_event_list;/*!< list of all created events */ };變量3 state
變量類(lèi)型 trx_state_t 變量備注
事務(wù)狀態(tài)TRX_STATE_NOT_STARTED TRX_STATE_ACTIVE TRX_STATE_PREPARED TRX_STATE_COMMITTED_IN_MEMORY (alias below COMMITTED)
結(jié)構(gòu)體trx_state_t的源碼
/** Transaction states (trx_t::state) */ enum trx_state_t {TRX_STATE_NOT_STARTED,TRX_STATE_ACTIVE,TRX_STATE_PREPARED, /* Support for 2PC/XA */TRX_STATE_COMMITTED_IN_MEMORY };變量4 lock
變量類(lèi)型 trx_lock_t
變量備注
Information about the transaction locks and state. Protected by trx->mutex or lock_sys->mutex or both 事務(wù)鎖和狀態(tài)有關(guān)的信息。 受trx-> mutex或lock_sys-> mutex或兩者保護(hù)
trx_lock_t的結(jié)構(gòu)體定義
struct trx_lock_t {ulint n_active_thrs; /*!< number of active query threads */trx_que_t que_state; /*!< valid when trx->state== TRX_STATE_ACTIVE: TRX_QUE_RUNNING,TRX_QUE_LOCK_WAIT, ... */lock_t* wait_lock; /*!< if trx execution state isTRX_QUE_LOCK_WAIT, this points tothe lock request, otherwise this isNULL; set to non-NULL when holdingboth trx->mutex and lock_sys->mutex;set to NULL when holdinglock_sys->mutex; readers shouldhold lock_sys->mutex, except whenthey are holding trx->mutex andwait_lock==NULL */ib_uint64_t deadlock_mark; /*!< A mark field that is initializedto and checked against lock_mark_counterby lock_deadlock_recursive(). */ibool was_chosen_as_deadlock_victim;/*!< when the transaction decides towait for a lock, it sets this to FALSE;if another transaction chooses thistransaction as a victim in deadlockresolution, it sets this to TRUE.Protected by trx->mutex. */time_t wait_started; /*!< lock wait started at this time,protected only by lock_sys->mutex */que_thr_t* wait_thr; /*!< query thread belonging to thistrx that is in QUE_THR_LOCK_WAITstate. For threads suspended in alock wait, this is protected bylock_sys->mutex. Otherwise, this mayonly be modified by the thread that isserving the running transaction. */mem_heap_t* lock_heap; /*!< memory heap for trx_locks;protected by lock_sys->mutex */UT_LIST_BASE_NODE_T(lock_t)trx_locks; /*!< locks requestedby the transaction;insertions are protected by trx->mutexand lock_sys->mutex; removals areprotected by lock_sys->mutex */ib_vector_t* table_locks; /*!< All table locks requested by thistransaction, including AUTOINC locks */ibool cancel; /*!< TRUE if the transaction is beingrolled back either via deadlockdetection or due to lock timeout. Thecaller has to acquire the trx_t::mutexin order to cancel the locks. Inlock_trx_table_locks_remove() wecheck for this cancel of a transaction'slocks and avoid reacquiring the trxmutex to prevent recursive deadlocks.Protected by both the lock sys mutexand the trx_t::mutex. */ };變量5 is_recovered
變量類(lèi)型 ulint 變量備注
0=normal transaction, 1=recovered, must be rolled back, protected by trx_sys->mutex when trx->in_rw_trx_list holds 0 =正常事務(wù),1 =恢復(fù),必須回滾,當(dāng)trx-> in_rw_trx_list保持時(shí)由trx_sys-> mutex保護(hù)
變量6 op_info
變量類(lèi)型 const char*
變量7 isolation_level
變量類(lèi)型 ulint 變量備注 READ UNCOMMITTED,READ COMMITTED,REPEATABLE READ,SERIALIZABLE
變量8 is_registered:1
變量類(lèi)型 unsigned 變量備注
MySQL has a transaction coordinator to coordinate two phase commit between multiple storage engines and the binary log. When an engine participates in a transaction, it's responsible for registering itself using the trans_register_ha() API. This flag is set to 1 after the transaction has been registered with the coordinator using the XA API, and is set to 0 after commit or rollback
MySQL有一個(gè)事務(wù)協(xié)調(diào)器來(lái)協(xié)調(diào)多個(gè)存儲(chǔ)引擎和二進(jìn)制日志之間的兩階段提交,它負(fù)責(zé)使用trans_register_ha()API注冊(cè)自己.
在事務(wù)已使用XA API向協(xié)調(diào)器注冊(cè)后,此標(biāo)志設(shè)置為1,并在提交或回滾后設(shè)置為0
變量9 check_unique_secondary
變量類(lèi)型 ulint
變量備注
通常為T(mén)RUE,但是如果用戶(hù)想要通過(guò)抑制對(duì)二級(jí)索引的唯一鍵檢查來(lái)加快插入,當(dāng)我們決定是否可以為它們使用插入緩沖區(qū)時(shí),我們?cè)O(shè)置這個(gè)FALSE
變量10 support_xa
變量類(lèi)型 ulint
變量備注 normally we do the XA two-phase commit steps, but by setting this to FALSE, one can save CPU time and about 150 bytes in the undo log size as then we skip XA steps
通常我們做XA兩階段提交步驟,但通過(guò)設(shè)置為FALSE,可以節(jié)省CPU時(shí)間和大約150字節(jié)的undo日志大小,然后我們跳過(guò)XA步驟
變量11 flush_log_later
變量類(lèi)型 ulint
變量備注
In 2PC, we hold the prepare_commit mutex across both phases. In that case, we defer flush of the logs to disk until after we release the mutex
在兩階段提交,我們持有兩個(gè)階段的prepare_commit互斥體。 在這種情況下,我們推遲刷新日志到磁盤(pán),直到我們釋放互斥體。
變量12 must_flush_log_later
變量類(lèi)型 ulint
變量備注
this flag is set to TRUE in trx_commit() if flush_log_later was TRUE, and there were modifications by the transaction; in that case we must flush the log in trx_commit_complete_for_mysql()
此標(biāo)志在trx_commit()中設(shè)置為T(mén)RUE,如果flush_log_later為T(mén)RUE,并且事務(wù)進(jìn)行了修改; 在這種情況下,我們必須通過(guò)trx_commit_complete_for_mysql()刷新日志
變量13 duplicates
變量類(lèi)型 ulint
變量備注 TRX_DUP_IGNORE | TRX_DUP_REPLACE
變量14 has_search_latch
變量類(lèi)型 ulint
變量備注
TRUE if this trx has latched the search system latch in S-mode 如果此trx已在S模式下鎖定搜索系統(tǒng)鎖存器,則為T(mén)RUE
變量15 search_latch_timeout
變量類(lèi)型 ulint
變量備注
If we notice that someone is waiting for our S-lock on the search latch to be released, we wait in?row0sel.cc?for BTR_SEA_TIMEOUT new searches until we try to keep the search latch again over calls from MySQL; this is intended to reduce contention on the search latch
如果我們注意到有事務(wù)在等待我們的S鎖鎖定被釋放,我們?cè)趓ow0sel.cc中等待BTR_SEA_TIMEOUT新的搜索,直到我們嘗試保持搜索鎖定再次超過(guò)來(lái)自MySQL的調(diào)用; 這旨在減少對(duì)搜索鎖存器的爭(zhēng)用
變量16 dict_operation
變量類(lèi)型 trx_dict_op_t
變量備注
主要是三種狀態(tài) 沒(méi)有修改表結(jié)構(gòu)=0 改表=1 修改索引=2
/** Type of data dictionary operation */ enum trx_dict_op_t {/** The transaction is not modifying the data dictionary. */TRX_DICT_OP_NONE = 0,/** The transaction is creating a table or an index, ordropping a table. The table must be dropped in crashrecovery. This and TRX_DICT_OP_NONE are the only possibleoperation modes in crash recovery. */TRX_DICT_OP_TABLE = 1,/** The transaction is creating or dropping an index in anexisting table. In crash recovery, the data dictionarymust be locked, but the table must not be dropped. */TRX_DICT_OP_INDEX = 2 };變量17 declared_to_be_inside_innodb
變量 ulint
備注
this is TRUE if we have declared this transaction in srv_conc_enter_innodb to be inside the InnoDB engine 如果我們已經(jīng)在srv_conc_enter_innodb中聲明這個(gè)事務(wù)在InnoDB引擎中,那么這是TRUE
變量18 n_tickets_to_enter_innodb
變量類(lèi)型 ulint
變量備注
< this can be > 0 only when declared_to_... is TRUE; when we come to srv_conc_innodb_enter, if the value here is > 0, we decrement this by 1
<這可以> 0只有當(dāng)declared_to_be_inside_innodb _…為T(mén)RUE 當(dāng)我們來(lái)到srv_conc_innodb_enter,如果這里的值> 0,我們將其減1
變量19 dict_operation_lock_mode
變量類(lèi)型 ulint
變量備注
0, RW_S_LATCH, or RW_X_LATCH: the latch mode trx currently holds on dict_operation_lock. Protected by dict_operation_lock 0,RW_S_LATCH或RW_X_LATCH:鎖存模式trx當(dāng)前持有dict_operation_lock。 受dict_operation_lock保護(hù)
變量20 no
變量類(lèi)型 trx_id_t
storage/innobase/include/univ.i typedef ib_uint64_t ib_id_t;storage/innobase/include/trx0types.h /** Transaction identifier (DB_TRX_ID, DATA_TRX_ID) */ typedef ib_id_t trx_id_t;變量備注
transaction serialization number: max trx id shortly before the transaction is moved to COMMITTED_IN_MEMORY state. Protected by trx_sys_t::mutex when trx->in_rw_trx_list. Initially set to TRX_ID_MAX
事務(wù)序列號(hào):事務(wù)被移動(dòng)到COMMITTED_IN_MEMORY狀態(tài)之前不久的max trx id。 當(dāng)trx-> in_rw_trx_list時(shí),由trx_sys_t :: mutex保護(hù)。 最初設(shè)置為T(mén)RX_ID_MAX
變量21 start_time
變量類(lèi)型 time_t
變量備注 time the trx state last time became TRX_STATE_ACTIVE
trx狀態(tài)變?yōu)門(mén)RX_STATE_ACTIVE的上一次時(shí)間(開(kāi)始時(shí)間)
變量22 id
變量類(lèi)型 trx_id_t
變量備注 transaction id 事務(wù)id
變量23 XID
變量類(lèi)型 XID
sql/handler.h typedef struct xid_t XID;xid_t是一個(gè)結(jié)構(gòu)體,代碼太多,這里就不貼了
變量備注 X/Open XA transaction identification to identify a transaction branch 打開(kāi)分布式事務(wù)的標(biāo)識(shí),以便區(qū)分事務(wù)分支
變量24 commit_lsn
變量類(lèi)型
/* Type used for all log sequence number storage and arithmetics */ typedef ib_uint64_t lsn_t;變量備注
lsn at the time of the commit lsn提交的時(shí)間
變量25 table_id
變量類(lèi)型 table_id_t
變量備注 Table to drop iff dict_operation == TRX_DICT_OP_TABLE, or 0
變量26 mysql_thd
變量類(lèi)型 THD* 這是一個(gè)超級(jí)大的結(jié)構(gòu)體,詳情需要看代碼
變量備注
MySQL thread handle corresponding to this trx, or NULL 對(duì)應(yīng)這個(gè)trx的MySQL線(xiàn)程句柄,或NULL
變量27 mysql_log_file_name
變量類(lèi)型 const char*
變量備注
if MySQL binlog is used, this field contains a pointer to the latest file name; this is NULL if binlog is not used
如果使用MySQL binlog,此字段包含指向最新文件名的指針; 如果不使用binlog,則為NULL
變量28 mysql_log_offset
變量類(lèi)型 ib_int64_t
變量備注
if MySQL binlog is used, this field contains the end offset of the binlog entry
如果使用MySQL binlog,則此字段包含binlog條目的結(jié)束偏移量
變量29 n_mysql_tables_in_use
變量類(lèi)型 ulint
變量備注 number of Innobase tables used in the processing of the current SQL statement in MySQL
MySQL中處理當(dāng)前SQL語(yǔ)句時(shí)使用的Innobase表的數(shù)量
變量30 mysql_n_tables_locked
變量類(lèi)型 ulint
變量備注
how many tables the current SQL statement uses, except those in consistent read
變量31 trx_list
變量類(lèi)型 UT_LIST_NODE_T(trx_t)
#define UT_LIST_NODE_T(TYPE) \ struct { \TYPE* prev; /*!< pointer to the previous node, \NULL if start of list */ \TYPE* next; /*!< pointer to next node, NULL if end of list */\ }變量備注
list of transactions; protected by trx_sys->mutex. The same node is used for both trx_sys_t::ro_trx_list and trx_sys_t::rw_trx_list
事務(wù)列表:受trx_sys->mutex保護(hù)。 同樣的節(jié)點(diǎn)用于trx_sys_t :: ro_trx_list和trx_sys_t :: rw_trx_list
變量32 mysql_trx_list
變量類(lèi)型 UT_LIST_NODE_T(trx_t)
變量備注
list of transactions created for MySQL; protected by trx_sys->mutex
變量33 error_state
變量類(lèi)型 dberr_t
變量備注
0 if no error, otherwise error number; NOTE That ONLY the thread doing the transaction is allowed to set this field: this is NOT protected by any mutex
錯(cuò)誤碼 注意只有執(zhí)行事務(wù)的線(xiàn)程才允許設(shè)置此字段 這不受任何互斥保護(hù)
變量34 dict_index_t*error_info
變量類(lèi)型 const
變量備注
if the error number indicates a duplicate key error, a pointer to the problematic index is stored here 如果錯(cuò)誤號(hào)表示重復(fù)鍵錯(cuò)誤,則在此存儲(chǔ)指向有問(wèn)題索引的指針
變量35 error_key_num
變量類(lèi)型 ulint
變量備注
if the index creation fails to a duplicate key error, a mysql key number of that index is stored here
如果索引創(chuàng)建失敗,重復(fù)的鍵錯(cuò)誤,該索引的mysql鍵號(hào)存儲(chǔ)在這里
變量36 sess
變量類(lèi)型 sess_t*
/* The session handle. This data structure is only used by purge and is not really necessary. We should get rid of it. */ struct sess_t{ulint state; /*!< state of the session */trx_t* trx; /*!< transaction object permanentlyassigned for the session: thetransaction instance designated by thetrx id changes, but the memorystructure is preserved */UT_LIST_BASE_NODE_T(que_t)graphs; /*!< query graphs belonging to thissession */ };變量備注
session of the trx, NULL if none
變量37 graph
變量類(lèi)型que_t*
變量備注
query currently run in the session, or NULL if none; NOTE that the query belongs to the session, and it can survive over a transaction commit, if it is a stored procedure with a COMMIT WORK statement, for instance
查詢(xún)當(dāng)前在運(yùn)行中的會(huì)話(huà),如果沒(méi)有則為NULL 注意,查詢(xún)屬于會(huì)話(huà),并且它可以通過(guò)事務(wù)提交存活,如果它是具有COMMIT WORK語(yǔ)句的存儲(chǔ)過(guò)程,例如
變量38 global_read_view_heap
變量類(lèi)型 mem_heap_t*
/* A memory heap is a nonempty linear list of memory blocks */ typedef mem_block_t mem_heap_t;/* A block of a memory heap consists of the info structure followed by an area of memory */ typedef struct mem_block_info_t mem_block_t;mem_block_info_t又是一個(gè)復(fù)雜的結(jié)構(gòu)體變量備注
memory heap for the global read view 內(nèi)存堆的全局讀取視圖
變量39 global_read_view
變量類(lèi)型 read_view_t* 又是一個(gè)比較復(fù)雜的結(jié)構(gòu)體
一致的讀取視圖關(guān)聯(lián)到事務(wù)或NULL
變量40 read_view
變量類(lèi)型 read_view_t* 變量備注
consistent read view used in the transaction or NULL, this read view if defined can be normal read view associated to a transaction (i.e. same as global_read_view) or read view associated to a cursor
一致的讀取視圖用于事務(wù)或NULL,此讀取視圖如果定義可以是與事務(wù)相關(guān)聯(lián)的正常讀取視圖(即與global_read_view相同)或與光標(biāo)相關(guān)聯(lián)的讀取視圖
變量41 trx_savepoints
變量類(lèi)型 UT_LIST_BASE_NODE_T(trx_named_savept_t)
變量備注 savepoints set with SAVEPOINT ..., oldest first 使用SAVEPOINT設(shè)置保存點(diǎn)的列表 ...,最舊的放在最前面
變量42 undo_mutex
變量類(lèi)型 ib_mutex_t
變量備注 mutex protecting the fields in this section (down to undo_no_arr), EXCEPT last_sql_stat_start, which can be accessed only when we know that there cannot be any activity in the undo logs!
互斥體保護(hù)此部分中的字段(向下到undo_no_arr),除了 last_sql_stat_start,只有當(dāng)我們知道在撤銷(xiāo)日志中不能有任何活動(dòng)時(shí)才可以訪(fǎng)問(wèn)它們!
變量43 undo_no
變量類(lèi)型undo_no_t
/** Undo number */ typedef ib_id_t undo_no_t;變量備注
next undo log record number to assign; since the undo log is private for a transaction, this is a simple ascending sequence with no gaps; thus it represents the number of modified/inserted rows in a transaction
分配下一個(gè)撤銷(xiāo)日志記錄號(hào); 因?yàn)槌蜂N(xiāo)日志對(duì)于事務(wù)是私有的,這是一個(gè)沒(méi)有間隙的簡(jiǎn)單升序序列; 因此它表示事務(wù)中修改/插入行的數(shù)量。
變量44 last_sql_stat_start
變量類(lèi)型 trx_savept_t
變量備注 undo_no when the last sql statement was started: in case of an error, trx is rolled back down to this undo number; see note at undo_mutex
當(dāng)最后一個(gè)sql語(yǔ)句啟動(dòng)時(shí),分配undo_no:在出現(xiàn)錯(cuò)誤的情況下,trx被回滾到這個(gè)撤銷(xiāo)號(hào); 請(qǐng)參見(jiàn)undo_mutex中的注釋
變量45 rseg
變量類(lèi)型 trx_rseg_t* 這又是一個(gè)比較復(fù)雜的結(jié)構(gòu)體,但segement其實(shí)是和Page綁定在一起的, 變量備注
rollback segment assigned to the transaction, or NULL if not assigned yet
回滾段分配給事務(wù),如果尚未分配,則為NULL
變量46 insert_undo
變量類(lèi)型 trx_undo_t*
變量備注
pointer to the insert undo log, or NULL if no inserts performed yet
指向插入undo日志的指針,如果尚未執(zhí)行插入,則為NULL
變量47 update_undo
變量類(lèi)型 trx_undo_t*
變量備注 pointer to the update undo log, or NULL if no update performed yet
變量48 roll_limit
變量類(lèi)型 undo_no_t
變量備注 least undo number to undo during a rollback
事務(wù)回滾的時(shí)候,最小的回滾數(shù)
變量49 pages_undone
變量類(lèi)型 ulint
變量備注 number of undo log pages undone since the last undo log truncation
自上次撤消日志截?cái)嘁詠?lái)撤銷(xiāo)日志頁(yè)面的數(shù)量
變量50 undo_no_arr
變量類(lèi)型 trx_undo_arr_t*
變量備注 array of undo numbers of undo log records which are currently processed by a rollback operation
撤消日志記錄的撤銷(xiāo)編號(hào)數(shù)組,這些撤消日志記錄當(dāng)前由回滾操作處理
變量51 n_autoinc_rows
變量類(lèi)型ulint
變量備注 no. of AUTO-INC rows required for an SQL statement. This is useful for multi-row INSERTs
SQL語(yǔ)句所需的AUTO-INC行的數(shù)量。 這對(duì)于多行INSERT非常有用
變量52 autoinc_locks
變量類(lèi)型 ib_vector_t*
變量備注
AUTOINC locks held by this transaction. Note that these are also in the lock list trx_locks. This vector needs to be freed explicitly when the trx instance is destroyed. Protected by lock_sys->mutex
此事務(wù)持有的AUTOINC鎖。 注意,這些也在鎖定列表trx_locks中。 當(dāng)trx實(shí)例被銷(xiāo)毀時(shí),這個(gè)向量需要被明確地釋放。 受lock_sys-> mutex保護(hù)
變量53 read_only
變量類(lèi)型 ibool
變量備注 TRUE if transaction is flagged as a READ-ONLY transaction. if !auto_commit || will_lock > 0 then it will added to the list trx_sys_t::ro_trx_list. A read only transaction will not be assigned an UNDO log. Non-locking auto-commit read-only transaction will not be on either list
如果事務(wù)標(biāo)記為READ-ONLY事務(wù),則為T(mén)RUE。 if!auto_commit || will_lock> 0,那么它將被添加到列表trx_sys_t :: ro_trx_list。 只讀事務(wù)將不會(huì)被分配UNDO日志。 非鎖定自動(dòng)提交只讀事務(wù)將不在任一列表上
變量54 auto_commit
變量類(lèi)型 ibool
變量備注 TRUE if it is an autocommit
變量55 will_lock
變量類(lèi)型 ulint
變量備注
Will acquire some locks. Increment each time we determine that a lock will be acquired by the MySQL layer
標(biāo)記會(huì)獲得一些鎖。 每次我們確定需要獲取鎖的時(shí)候,將被MySQL層獲取時(shí)遞增
變量56 ddl
變量類(lèi)型 bool
變量備注 true if it is a transaction that is being started for a DDL operation
如果它是為DDL操作啟動(dòng)的事務(wù),則為true
變量57 fts_trx
變量類(lèi)型 fts_trx_t*
變量類(lèi)型 FTS information, or NULL if transaction hasn't modified tables with FTS indexes (yet)
FTS信息,如果事務(wù)尚未修改具有FTS索引的表(尚未),則為NULL;
變量58 fts_next_doc_id
變量類(lèi)型 doc_id_t
變量備注
The document id used for updates 用于更新的文檔ID
變量59 flush_tables
變量類(lèi)型 ulint
變量備注 if "covering" the FLUSH TABLES",count of tables being flushed
如果“覆蓋”FLUSH TABLES“,則表的計(jì)數(shù)被刷新
變量60 api_trx
變量類(lèi)型 bool
變量備注 trx started by InnoDB API
變量61 api_auto_commit
變量類(lèi)型 bool
變量備注 automatic commit
變量62 read_write
變量類(lèi)型 bool
變量備注 if read and write operation
變量63 detailed_error[256]
變量類(lèi)型char
變量備注 detailed error message for last error, or empty
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的InnoDB事务结构体代码变量列表的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: nginx1.10.2源码安装配置参数参
- 下一篇: linux用户及权限详解(2017042