summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/trx')
-rw-r--r--innobase/trx/trx0purge.c25
-rw-r--r--innobase/trx/trx0rec.c36
-rw-r--r--innobase/trx/trx0roll.c26
-rw-r--r--innobase/trx/trx0sys.c24
-rw-r--r--innobase/trx/trx0trx.c24
-rw-r--r--innobase/trx/trx0undo.c15
6 files changed, 78 insertions, 72 deletions
diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c
index fa9c287b0ad..31223aa280e 100644
--- a/innobase/trx/trx0purge.c
+++ b/innobase/trx/trx0purge.c
@@ -275,7 +275,7 @@ trx_purge_add_update_undo_to_history(
if (undo->id >= TRX_RSEG_N_SLOTS) {
fprintf(stderr,
- "InnoDB: Error: undo->id is %lu\n", undo->id);
+ "InnoDB: Error: undo->id is %lu\n", (ulong) undo->id);
ut_a(0);
}
@@ -905,7 +905,7 @@ trx_purge_fetch_next_rec(
if (srv_print_thread_releases) {
printf(
"Purge: No logs left in the history list; pages handled %lu\n",
- purge_sys->n_pages_handled);
+ (ulong) purge_sys->n_pages_handled);
}
mutex_exit(&(purge_sys->mutex));
@@ -1057,7 +1057,8 @@ trx_purge(void)
if (srv_print_thread_releases) {
printf(
- "Purge ends; pages handled %lu\n", purge_sys->n_pages_handled);
+ "Purge ends; pages handled %lu\n",
+ (ulong) purge_sys->n_pages_handled);
}
return(purge_sys->n_pages_handled - old_pages_handled);
@@ -1074,16 +1075,16 @@ trx_purge_sys_print(void)
read_view_print(purge_sys->view);
fprintf(stderr, "InnoDB: Purge trx n:o %lu %lu, undo n_o %lu %lu\n",
- ut_dulint_get_high(purge_sys->purge_trx_no),
- ut_dulint_get_low(purge_sys->purge_trx_no),
- ut_dulint_get_high(purge_sys->purge_undo_no),
- ut_dulint_get_low(purge_sys->purge_undo_no));
+ (ulong) ut_dulint_get_high(purge_sys->purge_trx_no),
+ (ulong) ut_dulint_get_low(purge_sys->purge_trx_no),
+ (ulong) ut_dulint_get_high(purge_sys->purge_undo_no),
+ (ulong) ut_dulint_get_low(purge_sys->purge_undo_no));
fprintf(stderr,
"InnoDB: Purge next stored %lu, page_no %lu, offset %lu,\n"
"InnoDB: Purge hdr_page_no %lu, hdr_offset %lu\n",
- purge_sys->next_stored,
- purge_sys->page_no,
- purge_sys->offset,
- purge_sys->hdr_page_no,
- purge_sys->hdr_offset);
+ (ulong) purge_sys->next_stored,
+ (ulong) purge_sys->page_no,
+ (ulong) purge_sys->offset,
+ (ulong) purge_sys->hdr_page_no,
+ (ulong) purge_sys->hdr_offset);
}
diff --git a/innobase/trx/trx0rec.c b/innobase/trx/trx0rec.c
index 9453189d598..a0f500e51d7 100644
--- a/innobase/trx/trx0rec.c
+++ b/innobase/trx/trx0rec.c
@@ -866,15 +866,16 @@ trx_undo_update_rec_get_update(
fprintf(stderr,
"InnoDB: Error: trying to access update undo rec field %lu in table %s\n"
"InnoDB: index %s, but index has only %lu fields\n",
- field_no, index->table_name, index->name,
- dict_index_get_n_fields(index));
+ (ulong) field_no, index->table_name, index->name,
+ (ulong) dict_index_get_n_fields(index));
fprintf(stderr,
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com");
fprintf(stderr,
"InnoDB: Run also CHECK TABLE on table %s\n", index->table_name);
fprintf(stderr,
- "InnoDB: n_fields = %lu, i = %lu, ptr %lx\n", n_fields, i, (ulint)ptr);
+ "InnoDB: n_fields = %lu, i = %lu, ptr %lx\n", (ulong) n_fields, (ulong) i,
+ (ulong) ptr);
return(NULL);
}
@@ -1371,17 +1372,18 @@ trx_undo_prev_version_build(
fprintf(stderr,
"InnoDB: Table name %s, index name %s, n_uniq %lu\n",
index->table_name, index->name,
- dict_index_get_n_unique(index));
+ (ulong) dict_index_get_n_unique(index));
fprintf(stderr,
"InnoDB: undo rec address %lx, type %lu cmpl_info %lu\n",
- (ulint)undo_rec, type, cmpl_info);
+ (ulong) undo_rec, (ulong) type,
+ (ulong) cmpl_info);
fprintf(stderr,
"InnoDB: undo rec table id %lu %lu, index table id %lu %lu\n",
- ut_dulint_get_high(table_id),
- ut_dulint_get_low(table_id),
- ut_dulint_get_high(index->table->id),
- ut_dulint_get_low(index->table->id));
+ (ulong) ut_dulint_get_high(table_id),
+ (ulong) ut_dulint_get_low(table_id),
+ (ulong) ut_dulint_get_high(index->table->id),
+ (ulong) ut_dulint_get_low(index->table->id));
ut_sprintf_buf(err_buf, undo_rec, 150);
@@ -1395,17 +1397,17 @@ trx_undo_prev_version_build(
fprintf(stderr,
"InnoDB: Record trx id %lu %lu, update rec trx id %lu %lu\n",
- ut_dulint_get_high(rec_trx_id),
- ut_dulint_get_low(rec_trx_id),
- ut_dulint_get_high(trx_id),
- ut_dulint_get_low(trx_id));
+ (ulong) ut_dulint_get_high(rec_trx_id),
+ (ulong) ut_dulint_get_low(rec_trx_id),
+ (ulong) ut_dulint_get_high(trx_id),
+ (ulong) ut_dulint_get_low(trx_id));
fprintf(stderr,
"InnoDB: Roll ptr in rec %lu %lu, in update rec %lu %lu\n",
- ut_dulint_get_high(old_roll_ptr),
- ut_dulint_get_low(old_roll_ptr),
- ut_dulint_get_high(roll_ptr),
- ut_dulint_get_low(roll_ptr));
+ (ulong) ut_dulint_get_high(old_roll_ptr),
+ (ulong) ut_dulint_get_low(old_roll_ptr),
+ (ulong) ut_dulint_get_high(roll_ptr),
+ (ulong) ut_dulint_get_low(roll_ptr));
trx_purge_sys_print();
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c
index 7d1b341221c..1f053aeed89 100644
--- a/innobase/trx/trx0roll.c
+++ b/innobase/trx/trx0roll.c
@@ -394,8 +394,8 @@ loop:
if (trx->conc_state == TRX_COMMITTED_IN_MEMORY) {
fprintf(stderr, "InnoDB: Cleaning up trx with id %lu %lu\n",
- ut_dulint_get_high(trx->id),
- ut_dulint_get_low(trx->id));
+ (ulong) ut_dulint_get_high(trx->id),
+ (ulong) ut_dulint_get_low(trx->id));
trx_cleanup_at_db_startup(trx);
@@ -430,9 +430,9 @@ loop:
fprintf(stderr,
"InnoDB: Rolling back trx with id %lu %lu, %lu%s rows to undo",
- ut_dulint_get_high(trx->id),
- ut_dulint_get_low(trx->id),
- (ulint)rows_to_undo, unit);
+ (ulong) ut_dulint_get_high(trx->id),
+ (ulong) ut_dulint_get_low(trx->id),
+ (ulong) rows_to_undo, unit);
mutex_exit(&kernel_mutex);
if (trx->dict_operation) {
@@ -449,7 +449,7 @@ loop:
fprintf(stderr,
"InnoDB: Waiting for rollback of trx id %lu to end\n",
- ut_dulint_get_low(trx->id));
+ (ulong) ut_dulint_get_low(trx->id));
os_thread_sleep(100000);
mutex_enter(&kernel_mutex);
@@ -463,8 +463,8 @@ loop:
fprintf(stderr,
"InnoDB: Dropping table with id %lu %lu in recovery if it exists\n",
- ut_dulint_get_high(trx->table_id),
- ut_dulint_get_low(trx->table_id));
+ (ulong) ut_dulint_get_high(trx->table_id),
+ (ulong) ut_dulint_get_low(trx->table_id));
table = dict_table_get_on_id_low(trx->table_id, trx);
@@ -483,8 +483,8 @@ loop:
}
fprintf(stderr, "\nInnoDB: Rolling back of trx id %lu %lu completed\n",
- ut_dulint_get_high(trx->id),
- ut_dulint_get_low(trx->id));
+ (ulong) ut_dulint_get_high(trx->id),
+ (ulong) ut_dulint_get_low(trx->id));
mem_heap_free(heap);
goto loop;
@@ -853,10 +853,10 @@ try_again:
if (progress_pct != trx_roll_progress_printed_pct) {
if (trx_roll_progress_printed_pct == 0) {
fprintf(stderr,
- "\nInnoDB: Progress in percents: %lu", progress_pct);
+ "\nInnoDB: Progress in percents: %lu", (ulong) progress_pct);
} else {
fprintf(stderr,
- " %lu", progress_pct);
+ " %lu", (ulong) progress_pct);
}
fflush(stderr);
trx_roll_progress_printed_pct = progress_pct;
@@ -1130,7 +1130,7 @@ trx_finish_rollback_off_kernel(
if (lock_print_waits) {
printf("Trx %lu rollback finished\n",
- ut_dulint_get_low(trx->id));
+ (ulong) ut_dulint_get_low(trx->id));
}
trx_commit_off_kernel(trx);
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 177c5db7413..d9eace5ad9a 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -434,7 +434,7 @@ trx_sys_doublewrite_init_or_restore_pages(
fprintf(stderr,
"InnoDB: Warning: a page in the doublewrite buffer is not within space\n"
"InnoDB: bounds; space id %lu page number %lu, page %lu in doublewrite buf.\n",
- space_id, page_no, i);
+ (ulong) space_id, (ulong) page_no, (ulong) i);
} else if (space_id == TRX_SYS_SPACE
&& ( (page_no >= block1
@@ -457,7 +457,7 @@ trx_sys_doublewrite_init_or_restore_pages(
fprintf(stderr,
"InnoDB: Warning: database page corruption or a failed\n"
- "InnoDB: file read of page %lu.\n", page_no);
+ "InnoDB: file read of page %lu.\n", (ulong) page_no);
fprintf(stderr,
"InnoDB: Trying to recover it from the doublewrite buffer.\n");
@@ -628,9 +628,9 @@ trx_sys_print_mysql_binlog_offset_from_page(
printf(
"ibbackup: Last MySQL binlog file position %lu %lu, file name %s\n",
- mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ (ulong) mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_HIGH),
- mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ (ulong) mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_LOW),
sys_header + TRX_SYS_MYSQL_LOG_INFO + TRX_SYS_MYSQL_LOG_NAME);
}
@@ -662,9 +662,9 @@ trx_sys_print_mysql_binlog_offset(void)
fprintf(stderr,
"InnoDB: Last MySQL binlog file position %lu %lu, file name %s\n",
- mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ (ulong) mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_HIGH),
- mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ (ulong) mach_read_from_4(sys_header + TRX_SYS_MYSQL_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_LOW),
sys_header + TRX_SYS_MYSQL_LOG_INFO + TRX_SYS_MYSQL_LOG_NAME);
@@ -698,9 +698,9 @@ trx_sys_print_mysql_master_log_pos(void)
fprintf(stderr,
"InnoDB: In a MySQL replication slave the last master binlog file\n"
"InnoDB: position %lu %lu, file name %s\n",
- mach_read_from_4(sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ (ulong) mach_read_from_4(sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_HIGH),
- mach_read_from_4(sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ (ulong) mach_read_from_4(sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ TRX_SYS_MYSQL_LOG_OFFSET_LOW),
sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
+ TRX_SYS_MYSQL_LOG_NAME);
@@ -872,12 +872,12 @@ trx_sys_init_at_db_start(void)
fprintf(stderr,
"InnoDB: %lu transaction(s) which must be rolled back or cleaned up\n"
"InnoDB: in total %lu%s row operations to undo\n",
- UT_LIST_GET_LEN(trx_sys->trx_list),
- (ulint)rows_to_undo, unit);
+ (ulong) UT_LIST_GET_LEN(trx_sys->trx_list),
+ (ulong) rows_to_undo, unit);
fprintf(stderr, "InnoDB: Trx id counter is %lu %lu\n",
- ut_dulint_get_high(trx_sys->max_trx_id),
- ut_dulint_get_low(trx_sys->max_trx_id));
+ (ulong) ut_dulint_get_high(trx_sys->max_trx_id),
+ (ulong) ut_dulint_get_low(trx_sys->max_trx_id));
}
UT_LIST_INIT(trx_sys->view_list);
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 292b7cd6f2f..3926cfa03c5 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -1589,26 +1589,26 @@ trx_print(
char* start_of_line;
buf += sprintf(buf, "TRANSACTION %lu %lu",
- ut_dulint_get_high(trx->id),
- ut_dulint_get_low(trx->id));
+ (ulong) ut_dulint_get_high(trx->id),
+ (ulong) ut_dulint_get_low(trx->id));
switch (trx->conc_state) {
case TRX_NOT_STARTED: buf += sprintf(buf,
", not started"); break;
case TRX_ACTIVE: buf += sprintf(buf,
", ACTIVE %lu sec",
- (ulint)difftime(time(NULL), trx->start_time)); break;
+ (ulong) difftime(time(NULL), trx->start_time)); break;
case TRX_COMMITTED_IN_MEMORY: buf += sprintf(buf,
", COMMITTED IN MEMORY");
break;
- default: buf += sprintf(buf, " state %lu", trx->conc_state);
+ default: buf += sprintf(buf, " state %lu", (ulong) trx->conc_state);
}
#ifdef UNIV_LINUX
buf += sprintf(buf, ", process no %lu", trx->mysql_process_no);
#endif
buf += sprintf(buf, ", OS thread id %lu",
- os_thread_pf(trx->mysql_thread_id));
+ (ulong) os_thread_pf(trx->mysql_thread_id));
if (ut_strlen(trx->op_info) > 0) {
buf += sprintf(buf, " %s", trx->op_info);
@@ -1620,7 +1620,7 @@ trx_print(
if (trx->declared_to_be_inside_innodb) {
buf += sprintf(buf, ", thread declared inside InnoDB %lu",
- trx->n_tickets_to_enter_innodb);
+ (ulong) trx->n_tickets_to_enter_innodb);
}
buf += sprintf(buf, "\n");
@@ -1628,8 +1628,8 @@ trx_print(
if (trx->n_mysql_tables_in_use > 0 || trx->mysql_n_tables_locked > 0) {
buf += sprintf(buf, "mysql tables in use %lu, locked %lu\n",
- trx->n_mysql_tables_in_use,
- trx->mysql_n_tables_locked);
+ (ulong) trx->n_mysql_tables_in_use,
+ (ulong) trx->mysql_n_tables_locked);
}
start_of_line = buf;
@@ -1642,7 +1642,7 @@ trx_print(
"ROLLING BACK "); break;
case TRX_QUE_COMMITTING: buf += sprintf(buf,
"COMMITTING "); break;
- default: buf += sprintf(buf, "que state %lu", trx->que_state);
+ default: buf += sprintf(buf, "que state %lu", (ulong) trx->que_state);
}
if (0 < UT_LIST_GET_LEN(trx->trx_locks) ||
@@ -1650,8 +1650,8 @@ trx_print(
buf += sprintf(buf,
"%lu lock struct(s), heap size %lu",
- UT_LIST_GET_LEN(trx->trx_locks),
- mem_heap_get_size(trx->lock_heap));
+ (ulong) UT_LIST_GET_LEN(trx->trx_locks),
+ (ulong) mem_heap_get_size(trx->lock_heap));
}
if (trx->has_search_latch) {
@@ -1660,7 +1660,7 @@ trx_print(
if (ut_dulint_cmp(trx->undo_no, ut_dulint_zero) != 0) {
buf += sprintf(buf, ", undo log entries %lu",
- ut_dulint_get_low(trx->undo_no));
+ (ulong) ut_dulint_get_low(trx->undo_no));
}
if (buf != start_of_line) {
diff --git a/innobase/trx/trx0undo.c b/innobase/trx/trx0undo.c
index 82572b82807..f3f93734a49 100644
--- a/innobase/trx/trx0undo.c
+++ b/innobase/trx/trx0undo.c
@@ -1116,7 +1116,7 @@ trx_undo_mem_create_at_db_start(
if (id >= TRX_RSEG_N_SLOTS) {
fprintf(stderr,
- "InnoDB: Error: undo->id is %lu\n", id);
+ "InnoDB: Error: undo->id is %lu\n", (ulong) id);
ut_a(0);
}
@@ -1274,7 +1274,7 @@ trx_undo_mem_create(
if (id >= TRX_RSEG_N_SLOTS) {
fprintf(stderr,
- "InnoDB: Error: undo->id is %lu\n", id);
+ "InnoDB: Error: undo->id is %lu\n", (ulong) id);
ut_a(0);
}
@@ -1317,7 +1317,8 @@ trx_undo_mem_init_for_reuse(
ut_ad(mutex_own(&((undo->rseg)->mutex)));
if (undo->id >= TRX_RSEG_N_SLOTS) {
- fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", undo->id);
+ fprintf(stderr, "InnoDB: Error: undo->id is %lu\n",
+ (ulong) undo->id);
mem_analyze_corruption((byte*)undo);
ut_a(0);
@@ -1343,7 +1344,7 @@ trx_undo_mem_free(
{
if (undo->id >= TRX_RSEG_N_SLOTS) {
fprintf(stderr,
- "InnoDB: Error: undo->id is %lu\n", undo->id);
+ "InnoDB: Error: undo->id is %lu\n", (ulong) undo->id);
ut_a(0);
}
@@ -1450,7 +1451,8 @@ trx_undo_reuse_cached(
ut_ad(undo->hdr_page_no == undo->top_page_no);
if (undo->id >= TRX_RSEG_N_SLOTS) {
- fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", undo->id);
+ fprintf(stderr, "InnoDB: Error: undo->id is %lu\n",
+ (ulong) undo->id);
mem_analyze_corruption((byte*)undo);
ut_a(0);
}
@@ -1582,7 +1584,8 @@ trx_undo_set_state_at_finish(
ut_ad(trx && undo && mtr);
if (undo->id >= TRX_RSEG_N_SLOTS) {
- fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", undo->id);
+ fprintf(stderr, "InnoDB: Error: undo->id is %lu\n",
+ (ulong) undo->id);
mem_analyze_corruption((byte*)undo);
ut_a(0);
}