retries = 0;
} else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
++retries;
-@@ -3217,6 +3280,13 @@
+@@ -3220,6 +3283,13 @@
/* Let us wait until the read operation
completes */
for (;;) {
enum buf_io_fix io_fix;
-@@ -3231,6 +3301,12 @@
+@@ -3234,6 +3304,12 @@
break;
}
}
}
fix_type = MTR_MEMO_BUF_FIX;
-@@ -3256,13 +3332,17 @@
+@@ -3259,13 +3335,17 @@
/* In the case of a first access, try to apply linear
read-ahead */
return(block);
}
-@@ -3286,6 +3366,7 @@
+@@ -3289,6 +3369,7 @@
unsigned access_time;
ibool success;
ulint fix_type;
ut_ad(block);
ut_ad(mtr);
-@@ -3363,13 +3444,17 @@
+@@ -3366,13 +3447,17 @@
#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
ut_a(block->page.file_page_was_freed == FALSE);
#endif
}
#ifdef UNIV_IBUF_COUNT_DEBUG
-@@ -3379,6 +3464,9 @@
+@@ -3382,6 +3467,9 @@
buf_pool = buf_pool_from_block(block);
buf_pool->stat.n_page_gets++;
return(TRUE);
}
-@@ -3401,6 +3489,7 @@
+@@ -3404,6 +3492,7 @@
buf_pool_t* buf_pool;
ibool success;
ulint fix_type;
ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
-@@ -3487,6 +3576,11 @@
+@@ -3490,6 +3579,11 @@
#endif
buf_pool->stat.n_page_gets++;
/*********************************************************************//**
Note that a transaction has been registered with MySQL.
@return true if transaction is registered with MySQL 2PC coordinator */
-@@ -9280,6 +9316,25 @@
+@@ -9284,6 +9320,25 @@
statement has ended */
if (trx->n_mysql_tables_in_use == 0) {
/* This is set to the MySQL server value for this variable. It is only
needed for FOREIGN KEY definition parsing since FOREIGN KEY names are not
stored in the server metadata. The server stores and enforces it for
-@@ -1257,6 +1260,10 @@
+@@ -1259,6 +1262,10 @@
ibool has_slept = FALSE;
srv_conc_slot_t* slot = NULL;
ulint i;
if (trx->mysql_thd != NULL
&& thd_is_replication_slave_thread(trx->mysql_thd)) {
-@@ -1333,6 +1340,7 @@
+@@ -1335,6 +1342,7 @@
switches. */
if (SRV_THREAD_SLEEP_DELAY > 0) {
os_thread_sleep(SRV_THREAD_SLEEP_DELAY);
}
trx->op_info = "";
-@@ -1388,6 +1396,13 @@
+@@ -1390,6 +1398,13 @@
/* Go to wait for the event; when a thread leaves InnoDB it will
release this thread */
trx->op_info = "waiting in InnoDB queue";
thd_wait_begin(trx->mysql_thd, THD_WAIT_ROW_TABLE_LOCK);
-@@ -1396,6 +1411,12 @@
+@@ -1398,6 +1413,12 @@
trx->op_info = "";
diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
--- a/storage/innobase/trx/trx0trx.c 2010-12-03 15:41:52.053955669 +0900
+++ b/storage/innobase/trx/trx0trx.c 2010-12-03 17:42:42.127023410 +0900
-@@ -185,6 +185,15 @@
+@@ -186,6 +186,15 @@
trx->global_read_view = NULL;
trx->read_view = NULL;
/* Set X/Open XA transaction identification to NULL */
memset(&trx->xid, 0, sizeof(trx->xid));
trx->xid.formatID = -1;
-@@ -222,6 +231,11 @@
+@@ -223,6 +232,11 @@
trx->mysql_process_no = os_proc_get_number();
return(trx);
}
-@@ -353,6 +367,12 @@
+@@ -354,6 +368,12 @@
/*===============*/
trx_t* trx) /*!< in, own: trx object */
{
mutex_enter(&kernel_mutex);
UT_LIST_REMOVE(mysql_trx_list, trx_sys->mysql_trx_list, trx);
-@@ -374,6 +394,12 @@
+@@ -375,6 +395,12 @@
/*====================*/
trx_t* trx) /*!< in, own: trx object */
{
mutex_enter(&kernel_mutex);
trx_free(trx);
-@@ -1091,6 +1117,9 @@
+@@ -1153,6 +1179,9 @@
trx_t* trx) /*!< in: transaction */
{
que_thr_t* thr;
ut_ad(mutex_own(&kernel_mutex));
ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT);
-@@ -1105,6 +1134,11 @@
+@@ -1167,6 +1196,11 @@
thr = UT_LIST_GET_FIRST(trx->wait_thrs);
}
trx->que_state = TRX_QUE_RUNNING;
}
-@@ -1118,6 +1152,9 @@
+@@ -1180,6 +1214,9 @@
trx_t* trx) /*!< in: transaction in the TRX_QUE_LOCK_WAIT state */
{
que_thr_t* thr;
ut_ad(mutex_own(&kernel_mutex));
ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT);
-@@ -1132,6 +1169,11 @@
+@@ -1194,6 +1231,11 @@
thr = UT_LIST_GET_FIRST(trx->wait_thrs);
}