diff options
Diffstat (limited to 'innobase/trx')
-rw-r--r-- | innobase/trx/trx0purge.c | 3 | ||||
-rw-r--r-- | innobase/trx/trx0trx.c | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c index 97362d00b4b..d58240d3c11 100644 --- a/innobase/trx/trx0purge.c +++ b/innobase/trx/trx0purge.c @@ -209,9 +209,6 @@ trx_purge_sys_create(void) purge_sys->purge_undo_no = ut_dulint_zero; purge_sys->next_stored = FALSE; - rw_lock_create(&(purge_sys->purge_is_running)); - rw_lock_set_level(&(purge_sys->purge_is_running), - SYNC_PURGE_IS_RUNNING); rw_lock_create(&(purge_sys->latch)); rw_lock_set_level(&(purge_sys->latch), SYNC_PURGE_LATCH); diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 994a6777924..7566fe1839e 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -23,7 +23,7 @@ Created 3/26/1996 Heikki Tuuri #include "srv0srv.h" #include "thr0loc.h" #include "btr0sea.h" - +#include "os0proc.h" /* Copy of the prototype for innobase_mysql_print_thd: this copy MUST be equal to the one in mysql/sql/ha_innobase.cc ! */ @@ -85,12 +85,14 @@ trx_create( trx->conc_state = TRX_NOT_STARTED; trx->start_time = time(NULL); + trx->isolation_level = TRX_ISO_REPEATABLE_READ; trx->check_foreigns = TRUE; trx->check_unique_secondary = TRUE; trx->dict_operation = FALSE; trx->mysql_thd = NULL; + trx->mysql_query_str = NULL; trx->n_mysql_tables_in_use = 0; trx->mysql_n_tables_locked = 0; @@ -132,7 +134,7 @@ trx_create( trx->lock_heap = mem_heap_create_in_buffer(256); UT_LIST_INIT(trx->trx_locks); - trx->has_dict_foreign_key_check_lock = FALSE; + trx->has_dict_operation_lock = FALSE; trx->has_search_latch = FALSE; trx->search_latch_timeout = BTR_SEA_TIMEOUT; @@ -175,6 +177,8 @@ trx_allocate_for_mysql(void) mutex_exit(&kernel_mutex); trx->mysql_thread_id = os_thread_get_curr_id(); + + trx->mysql_process_no = os_proc_get_number(); return(trx); } @@ -1497,9 +1501,12 @@ trx_print( default: buf += sprintf(buf, " state %lu", trx->conc_state); } +#ifdef UNIV_LINUX + buf += sprintf(buf, ", process no %lu", trx->mysql_process_no); +#else buf += sprintf(buf, ", OS thread id %lu", os_thread_pf(trx->mysql_thread_id)); - +#endif if (ut_strlen(trx->op_info) > 0) { buf += sprintf(buf, " %s", trx->op_info); } |