diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-06-22 20:41:14 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-06-22 20:41:14 +0300 |
commit | 1081513a12851d432103eaabcb6533c84062196c (patch) | |
tree | cd94be28879d52101bd7438dc97dc04856d81739 /innobase/include/trx0sys.h | |
parent | b7b988b3c36fa7a1f0a284d6478bbccbe706c09f (diff) | |
download | mariadb-git-1081513a12851d432103eaabcb6533c84062196c.tar.gz |
Many files:
Merge 3.23.52
innobase/btr/btr0btr.c:
Merge 3.23.52
innobase/btr/btr0cur.c:
Merge 3.23.52
innobase/btr/btr0sea.c:
Merge 3.23.52
innobase/include/btr0btr.h:
Merge 3.23.52
innobase/include/btr0cur.h:
Merge 3.23.52
innobase/include/btr0sea.h:
Merge 3.23.52
innobase/include/buf0buf.h:
Merge 3.23.52
innobase/include/buf0rea.h:
Merge 3.23.52
innobase/include/data0data.h:
Merge 3.23.52
innobase/include/data0data.ic:
Merge 3.23.52
innobase/include/log0log.h:
Merge 3.23.52
innobase/include/log0log.ic:
Merge 3.23.52
innobase/include/os0file.h:
Merge 3.23.52
innobase/include/page0page.h:
Merge 3.23.52
innobase/include/page0page.ic:
Merge 3.23.52
innobase/include/row0mysql.h:
Merge 3.23.52
innobase/include/trx0roll.h:
Merge 3.23.52
innobase/include/trx0sys.h:
Merge 3.23.52
innobase/include/trx0trx.h:
Merge 3.23.52
innobase/include/ut0ut.h:
Merge 3.23.52
innobase/include/univ.i:
Merge 3.23.52
innobase/include/ut0ut.ic:
Merge 3.23.52
innobase/buf/buf0buf.c:
Merge 3.23.52
innobase/buf/buf0rea.c:
Merge 3.23.52
innobase/data/data0data.c:
Merge 3.23.52
innobase/dict/dict0crea.c:
Merge 3.23.52
innobase/dict/dict0dict.c:
Merge 3.23.52
innobase/dict/dict0load.c:
Merge 3.23.52
innobase/dict/dict0mem.c:
Merge 3.23.52
innobase/fsp/fsp0fsp.c:
Merge 3.23.52
innobase/ibuf/ibuf0ibuf.c:
Merge 3.23.52
innobase/lock/lock0lock.c:
Merge 3.23.52
innobase/log/log0log.c:
Merge 3.23.52
innobase/log/log0recv.c:
Merge 3.23.52
innobase/mtr/mtr0log.c:
Merge 3.23.52
innobase/mtr/mtr0mtr.c:
Merge 3.23.52
innobase/os/os0file.c:
Merge 3.23.52
innobase/page/page0cur.c:
Merge 3.23.52
innobase/page/page0page.c:
Merge 3.23.52
innobase/rem/rem0cmp.c:
Merge 3.23.52
innobase/row/row0ins.c:
Merge 3.23.52
innobase/row/row0mysql.c:
Merge 3.23.52
innobase/row/row0purge.c:
Merge 3.23.52
innobase/row/row0upd.c:
Merge 3.23.52
innobase/srv/srv0srv.c:
Merge 3.23.52
innobase/srv/srv0start.c:
Merge 3.23.52
innobase/trx/trx0roll.c:
Merge 3.23.52
innobase/trx/trx0sys.c:
Merge 3.23.52
innobase/trx/trx0trx.c:
Merge 3.23.52
innobase/trx/trx0undo.c:
Merge 3.23.52
innobase/ut/ut0mem.c:
Merge 3.23.52
innobase/ut/ut0ut.c:
Merge 3.23.52
Diffstat (limited to 'innobase/include/trx0sys.h')
-rw-r--r-- | innobase/include/trx0sys.h | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/innobase/include/trx0sys.h b/innobase/include/trx0sys.h index 60d5adb72d1..b08df7f6901 100644 --- a/innobase/include/trx0sys.h +++ b/innobase/include/trx0sys.h @@ -24,6 +24,14 @@ Created 3/26/1996 Heikki Tuuri #include "fsp0fsp.h" #include "read0types.h" +/* In a MySQL replication slave, in crash recovery we store the master log +file name and position here. We have successfully got the updates to InnoDB +up to this position. If .._pos is -1, it means no crash recovery was needed, +or there was no master log position info inside InnoDB. */ + +extern char trx_sys_mysql_master_log_name[]; +extern ib_longlong trx_sys_mysql_master_log_pos; + /* The transaction system */ extern trx_sys_t* trx_sys; @@ -229,13 +237,18 @@ trx_in_trx_list( trx_t* in_trx);/* in: trx */ /********************************************************************* Updates the offset information about the end of the MySQL binlog entry -which corresponds to the transaction just being committed. */ +which corresponds to the transaction just being committed. In a MySQL +replication slave updates the latest master binlog position up to which +replication has proceeded. */ void trx_sys_update_mysql_binlog_offset( /*===============================*/ - trx_t* trx, /* in: transaction being committed */ - mtr_t* mtr); /* in: mtr */ + char* file_name,/* in: MySQL log file name */ + ib_longlong offset, /* in: position in that log file */ + ulint field, /* in: offset of the MySQL log info field in + the trx sys header */ + mtr_t* mtr); /* in: mtr */ /********************************************************************* Prints to stderr the MySQL binlog offset info in the trx system header if the magic number shows it valid. */ @@ -243,15 +256,17 @@ the magic number shows it valid. */ void trx_sys_print_mysql_binlog_offset(void); /*===================================*/ +/********************************************************************* +Prints to stderr the MySQL master log offset info in the trx system header if +the magic number shows it valid. */ + +void +trx_sys_print_mysql_master_log_pos(void); +/*====================================*/ /* The automatically created system rollback segment has this id */ #define TRX_SYS_SYSTEM_RSEG_ID 0 -/* Max number of rollback segments: the number of segment specification slots -in the transaction system array; rollback segment id must fit in one byte, -therefore 256 */ -#define TRX_SYS_N_RSEGS 256 - /* Space id and page no where the trx system file copy resides */ #define TRX_SYS_SPACE 0 /* the SYSTEM tablespace */ #define TRX_SYS_PAGE_NO FSP_TRX_SYS_PAGE_NO @@ -277,22 +292,29 @@ therefore 256 */ segment specification slots */ /*-------------------------------------------------------------*/ -#define TRX_SYS_MYSQL_LOG_NAME_LEN 32 +/* Max number of rollback segments: the number of segment specification slots +in the transaction system array; rollback segment id must fit in one byte, +therefore 256; each slot is currently 8 bytes in size */ +#define TRX_SYS_N_RSEGS 256 + +#define TRX_SYS_MYSQL_LOG_NAME_LEN 512 #define TRX_SYS_MYSQL_LOG_MAGIC_N 873422344 +/* The offset of the MySQL replication info on the trx system header page; +this contains the same fields as TRX_SYS_MYSQL_LOG_INFO below */ +#define TRX_SYS_MYSQL_MASTER_LOG_INFO (UNIV_PAGE_SIZE - 2000) + /* The offset of the MySQL binlog offset info on the trx system header page */ -#define TRX_SYS_MYSQL_LOG_INFO (UNIV_PAGE_SIZE - 300) +#define TRX_SYS_MYSQL_LOG_INFO (UNIV_PAGE_SIZE - 1000) #define TRX_SYS_MYSQL_LOG_MAGIC_N_FLD 0 /* magic number which shows if we have valid data in the MySQL binlog info; the value is ..._MAGIC_N if yes */ -#define TRX_SYS_MYSQL_LOG_NAME 4 /* MySQL log file name */ -#define TRX_SYS_MYSQL_LOG_OFFSET_HIGH (4 + TRX_SYS_MYSQL_LOG_NAME_LEN) - /* high 4 bytes of the offset +#define TRX_SYS_MYSQL_LOG_OFFSET_HIGH 4 /* high 4 bytes of the offset within that file */ -#define TRX_SYS_MYSQL_LOG_OFFSET_LOW (8 + TRX_SYS_MYSQL_LOG_NAME_LEN) - /* low 4 bytes of the offset +#define TRX_SYS_MYSQL_LOG_OFFSET_LOW 8 /* low 4 bytes of the offset within that file */ +#define TRX_SYS_MYSQL_LOG_NAME 12 /* MySQL log file name */ /* The offset of the doublewrite buffer header on the trx system header page */ #define TRX_SYS_DOUBLEWRITE (UNIV_PAGE_SIZE - 200) |