#include <sql_table.h> // explain_filename, nz2, EXPLAIN_PARTITIONS_AS_COMMENT,
// EXPLAIN_FILENAME_MAX_EXTRA_LENGTH
-@@ -52,6 +54,15 @@
- #include <mysql/innodb_priv.h>
+@@ -53,6 +55,15 @@
#include <mysql/psi/psi.h>
+ #include <my_sys.h>
+#ifdef MYSQL_SERVER
+#include <rpl_mi.h>
static my_bool innobase_rollback_on_timeout = FALSE;
static my_bool innobase_create_status_file = FALSE;
static my_bool innobase_stats_on_metadata = TRUE;
-@@ -2221,6 +2241,89 @@
+@@ -2248,6 +2268,89 @@
}
#endif /* DBUG_OFF */
/* Check that values don't overflow on 32-bit systems. */
if (sizeof(ulint) == 4) {
if (innobase_buffer_pool_size > UINT_MAX32) {
-@@ -2519,6 +2622,76 @@
+@@ -2546,6 +2649,76 @@
goto mem_free_and_error;
}
innobase_old_blocks_pct = buf_LRU_old_ratio_update(
innobase_old_blocks_pct, TRUE);
-@@ -2631,6 +2804,25 @@
+@@ -2658,6 +2831,25 @@
trx_t* trx) /*!< in: transaction handle */
{
if (trx_is_started(trx)) {
trx_commit_for_mysql(trx);
}
-@@ -10990,6 +11182,12 @@
+@@ -11014,6 +11206,12 @@
"The common part for InnoDB table spaces.",
NULL, NULL, NULL);
static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
"Enable InnoDB doublewrite buffer (enabled by default). "
-@@ -11450,6 +11648,7 @@
+@@ -11474,6 +11672,7 @@
MYSQL_SYSVAR(old_blocks_pct),
MYSQL_SYSVAR(old_blocks_time),
MYSQL_SYSVAR(open_files),
diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
--- a/storage/innobase/include/trx0trx.h 2010-12-03 15:18:48.894955550 +0900
+++ b/storage/innobase/include/trx0trx.h 2010-12-03 15:38:20.323953416 +0900
-@@ -569,6 +569,21 @@
+@@ -580,6 +580,20 @@
ib_int64_t mysql_log_offset;/* if MySQL binlog is used, this field
contains the end offset of the binlog
entry */
+ replication has processed */
+ const char* mysql_relay_log_file_name;
+ ib_int64_t mysql_relay_log_pos;
-+
- os_thread_id_t mysql_thread_id;/* id of the MySQL thread associated
- with this transaction object */
- ulint mysql_process_no;/* since in Linux, 'top' reports
+ /*------------------------------*/
+ ulint n_mysql_tables_in_use; /* number of Innobase tables
+ used in the processing of the current
diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
--- a/storage/innobase/trx/trx0sys.c 2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/trx/trx0sys.c 2010-12-03 15:38:20.325956917 +0900
-@@ -75,13 +75,16 @@
+@@ -76,13 +76,16 @@
file name and position here. */
/* @{ */
/** Master binlog file name */
/** If this MySQL server uses binary logging, after InnoDB has been inited
and if it has done a crash recovery, we store the binlog file name and position
here. */
-@@ -683,23 +686,25 @@
+@@ -684,23 +687,25 @@
void
trx_sys_update_mysql_binlog_offset(
/*===============================*/
if (mach_read_from_4(sys_header + field
+ TRX_SYS_MYSQL_LOG_MAGIC_N_FLD)
!= TRX_SYS_MYSQL_LOG_MAGIC_N) {
-@@ -821,13 +826,26 @@
+@@ -822,13 +827,26 @@
+ TRX_SYS_MYSQL_LOG_OFFSET_LOW),
sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ TRX_SYS_MYSQL_LOG_NAME);
trx_sys_mysql_master_log_pos
= (((ib_int64_t) mach_read_from_4(
-@@ -836,6 +854,19 @@
+@@ -837,6 +855,19 @@
+ ((ib_int64_t) mach_read_from_4(
sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_LOW));
diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
--- a/storage/innobase/trx/trx0trx.c 2010-12-03 15:37:45.549028990 +0900
+++ b/storage/innobase/trx/trx0trx.c 2010-12-03 15:38:20.328957217 +0900
-@@ -136,6 +136,10 @@
+@@ -138,6 +138,10 @@
trx->mysql_log_file_name = NULL;
trx->mysql_log_offset = 0;
mutex_create(trx_undo_mutex_key, &trx->undo_mutex, SYNC_TRX_UNDO);
-@@ -766,6 +770,7 @@
+@@ -820,6 +824,7 @@
{
mtr_t mtr;
trx_rseg_t* rseg;
ut_ad(!mutex_own(&kernel_mutex));
-@@ -819,8 +824,12 @@
+@@ -873,8 +878,12 @@
if (trx->mysql_log_file_name
&& trx->mysql_log_file_name[0] != '\0') {
trx->mysql_log_file_name,
trx->mysql_log_offset,
TRX_SYS_MYSQL_LOG_INFO, &mtr);
-@@ -828,6 +837,27 @@
+@@ -882,6 +891,27 @@
trx->mysql_log_file_name = NULL;
}