summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
Diffstat (limited to 'innobase')
-rw-r--r--innobase/buf/buf0lru.c6
-rw-r--r--innobase/dict/dict0dict.c5
-rw-r--r--innobase/dict/dict0load.c35
-rw-r--r--innobase/eval/eval0proc.c2
-rw-r--r--innobase/include/mem0mem.ic2
-rw-r--r--innobase/include/page0page.ic8
-rw-r--r--innobase/include/pars0pars.h2
-rw-r--r--innobase/include/pars0sym.h2
-rw-r--r--innobase/mem/mem0dbg.c2
-rw-r--r--innobase/os/os0file.c22
-rw-r--r--innobase/os/os0sync.c4
-rw-r--r--innobase/os/os0thread.c4
-rw-r--r--innobase/rem/rem0cmp.c13
-rw-r--r--innobase/row/row0mysql.c12
-rw-r--r--innobase/row/row0sel.c8
-rw-r--r--innobase/trx/trx0sys.c3
-rw-r--r--innobase/trx/trx0trx.c2
-rw-r--r--innobase/ut/ut0ut.c2
18 files changed, 53 insertions, 81 deletions
diff --git a/innobase/buf/buf0lru.c b/innobase/buf/buf0lru.c
index 8460a049d3e..18c4f8c10fb 100644
--- a/innobase/buf/buf0lru.c
+++ b/innobase/buf/buf0lru.c
@@ -878,11 +878,11 @@ buf_LRU_block_remove_hashed_page(
(ulong) block->offset);
if (buf_page_hash_get(block->space, block->offset)) {
fprintf(stderr,
-"InnoDB: From hash table we find block %lx of %lu %lu which is not %lx\n",
- (ulong) buf_page_hash_get(block->space, block->offset),
+"InnoDB: From hash table we find block %p of %lu %lu which is not %p\n",
+ buf_page_hash_get(block->space, block->offset),
(ulong) buf_page_hash_get(block->space, block->offset)->space,
(ulong) buf_page_hash_get(block->space, block->offset)->offset,
- (ulong) block);
+ block);
}
#ifdef UNIV_DEBUG
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index e2681369a8e..02f46ea7b18 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -2326,8 +2326,9 @@ dict_scan_to(
/* Outside quotes: look for the keyword. */
ulint i;
for (i = 0; string[i]; i++) {
- if (toupper((ulint)(ptr[i]))
- != toupper((ulint)(string[i]))) {
+ if (toupper((int)(unsigned char)(ptr[i]))
+ != toupper((int)(unsigned char)
+ (string[i]))) {
goto nomatch;
}
}
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index 1f4ebe810b4..b33111b1ff1 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -730,7 +730,6 @@ dict_load_table(
ulint space;
ulint n_cols;
ulint err;
- ulint mix_len;
mtr_t mtr;
#ifdef UNIV_SYNC_DEBUG
@@ -778,40 +777,6 @@ dict_load_table(
return(NULL);
}
- /* Track a corruption bug reported on the MySQL mailing list Jan 14,
- 2005: mix_len had a value different from 0 */
-
- field = rec_get_nth_field_old(rec, 7, &len);
- ut_a(len == 4);
-
- mix_len = mach_read_from_4(field);
-
- if (mix_len != 0 && mix_len != 0x80000000) {
- ut_print_timestamp(stderr);
-
- fprintf(stderr,
- " InnoDB: table %s has a nonsensical mix len %lu\n",
- name, (ulong)mix_len);
- }
-
-#ifndef UNIV_HOTBACKUP
-#if MYSQL_VERSION_ID < 50003
- /* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
- "compact format" flag. */
- field = rec_get_nth_field(rec, 7, &len);
- if (mach_read_from_1(field) & 0x80) {
- btr_pcur_close(&pcur);
- mtr_commit(&mtr);
- mem_heap_free(heap);
- ut_print_timestamp(stderr);
- fprintf(stderr,
- " InnoDB: table %s is in the new compact format\n"
- "InnoDB: of MySQL 5.0.3 or later\n", name);
- return(NULL);
- }
-#endif /* MYSQL_VERSION_ID < 50300 */
-#endif /* !UNIV_HOTBACKUP */
-
ut_a(0 == ut_strcmp("SPACE",
dict_field_get_col(
dict_index_get_nth_field(sys_index, 9))->name));
diff --git a/innobase/eval/eval0proc.c b/innobase/eval/eval0proc.c
index f710fed880f..50676e4f3fc 100644
--- a/innobase/eval/eval0proc.c
+++ b/innobase/eval/eval0proc.c
@@ -161,7 +161,7 @@ for_step(
{
for_node_t* node;
que_node_t* parent;
- int loop_var_value;
+ lint loop_var_value;
ut_ad(thr);
diff --git a/innobase/include/mem0mem.ic b/innobase/include/mem0mem.ic
index 714c30e3642..82d88099c3f 100644
--- a/innobase/include/mem0mem.ic
+++ b/innobase/include/mem0mem.ic
@@ -606,7 +606,7 @@ mem_strdupq(
char* dst;
char* d;
const char* s = str;
- int len = strlen(str) + 3;
+ size_t len = strlen(str) + 3;
/* calculate the number of quote characters in the string */
while((s = strchr(s, q)) != NULL) {
s++;
diff --git a/innobase/include/page0page.ic b/innobase/include/page0page.ic
index ac6b0263a7d..bc0805ca30c 100644
--- a/innobase/include/page0page.ic
+++ b/innobase/include/page0page.ic
@@ -549,10 +549,10 @@ page_rec_get_next(
"InnoDB: Next record offset is nonsensical %lu in record at offset %lu\n",
(ulong)offs, (ulong)(rec - page));
fprintf(stderr,
-"\nInnoDB: rec address %lx, first buffer frame %lx\n"
-"InnoDB: buffer pool high end %lx, buf fix count %lu\n",
- (ulong)rec, (ulong)buf_pool->frame_zero,
- (ulong)buf_pool->high_end,
+"\nInnoDB: rec address %p, first buffer frame %p\n"
+"InnoDB: buffer pool high end %p, buf fix count %lu\n",
+ rec, buf_pool->frame_zero,
+ buf_pool->high_end,
(ulong)buf_block_align(rec)->buf_fix_count);
buf_page_print(page);
diff --git a/innobase/include/pars0pars.h b/innobase/include/pars0pars.h
index 28985e2f9d0..62a41a881e8 100644
--- a/innobase/include/pars0pars.h
+++ b/innobase/include/pars0pars.h
@@ -414,7 +414,7 @@ pars_complete_graph_for_exec(
/* Struct used to denote a reserved word in a parsing tree */
struct pars_res_word_struct{
- ulint code; /* the token code for the reserved word from
+ int code; /* the token code for the reserved word from
pars0grm.h */
};
diff --git a/innobase/include/pars0sym.h b/innobase/include/pars0sym.h
index a40523861dd..633a49e3cb5 100644
--- a/innobase/include/pars0sym.h
+++ b/innobase/include/pars0sym.h
@@ -152,7 +152,7 @@ struct sym_tab_struct{
parser */
const char* sql_string;
/* SQL string to parse */
- int string_len;
+ size_t string_len;
/* SQL string length */
int next_char_pos;
/* position of the next character in
diff --git a/innobase/mem/mem0dbg.c b/innobase/mem/mem0dbg.c
index ea8c296f8cf..7c0be818948 100644
--- a/innobase/mem/mem0dbg.c
+++ b/innobase/mem/mem0dbg.c
@@ -445,7 +445,7 @@ mem_heap_validate_or_print(
&& (mem_block_get_len(block) > UNIV_PAGE_SIZE)) {
fprintf(stderr,
-"InnoDB: Error: mem block %lx length %lu > UNIV_PAGE_SIZE\n", (ulong) block,
+"InnoDB: Error: mem block %p length %lu > UNIV_PAGE_SIZE\n", block,
(ulong) mem_block_get_len(block));
/* error */
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 969f7aee859..eeba98a8ab2 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -2053,8 +2053,8 @@ try_again:
ut_ad(buf);
ut_ad(n > 0);
- low = offset;
- high = offset_high;
+ low = (DWORD) offset;
+ high = (DWORD) offset_high;
/* Protect the seek / read operation with a mutex */
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
@@ -2072,7 +2072,7 @@ try_again:
os_n_pending_reads++;
- ret = ReadFile(file, buf, n, &len, NULL);
+ ret = ReadFile(file, buf, (DWORD) n, &len, NULL);
os_n_pending_reads--;
@@ -2164,8 +2164,8 @@ try_again:
ut_ad(buf);
ut_ad(n > 0);
- low = offset;
- high = offset_high;
+ low = (DWORD) offset;
+ high = (DWORD) offset_high;
/* Protect the seek / read operation with a mutex */
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
@@ -2183,7 +2183,7 @@ try_again:
os_n_pending_reads++;
- ret = ReadFile(file, buf, n, &len, NULL);
+ ret = ReadFile(file, buf, (DWORD) n, &len, NULL);
os_n_pending_reads--;
@@ -2258,8 +2258,8 @@ os_file_write(
ut_ad(buf);
ut_ad(n > 0);
retry:
- low = offset;
- high = offset_high;
+ low = (DWORD) offset;
+ high = (DWORD) offset_high;
/* Protect the seek / write operation with a mutex */
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES;
@@ -2288,7 +2288,7 @@ retry:
os_n_pending_writes++;
- ret = WriteFile(file, buf, n, &len, NULL);
+ ret = WriteFile(file, buf, (DWORD) n, &len, NULL);
os_n_pending_writes--;
@@ -3279,7 +3279,7 @@ os_aio(
#ifdef WIN_ASYNC_IO
ibool retval;
BOOL ret = TRUE;
- DWORD len = n;
+ DWORD len = (DWORD) n;
void* dummy_mess1;
void* dummy_mess2;
ulint dummy_type;
@@ -4126,7 +4126,7 @@ loop:
if (os_n_file_reads == os_n_file_reads_old) {
avg_bytes_read = 0.0;
} else {
- avg_bytes_read = os_bytes_read_since_printout /
+ avg_bytes_read = (double) os_bytes_read_since_printout /
(os_n_file_reads - os_n_file_reads_old);
}
diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c
index c48c44a4c70..18d92af5054 100644
--- a/innobase/os/os0sync.c
+++ b/innobase/os/os0sync.c
@@ -361,7 +361,7 @@ os_event_wait_time(
ut_a(event);
if (time != OS_SYNC_INFINITE_TIME) {
- err = WaitForSingleObject(event->handle, time / 1000);
+ err = WaitForSingleObject(event->handle, (DWORD) time / 1000);
} else {
err = WaitForSingleObject(event->handle, INFINITE);
}
@@ -408,7 +408,7 @@ os_event_wait_multiple(
ut_a(native_event_array);
ut_a(n > 0);
- index = WaitForMultipleObjects(n, native_event_array,
+ index = WaitForMultipleObjects((DWORD) n, native_event_array,
FALSE, /* Wait for any 1 event */
INFINITE); /* Infinite wait time
limit */
diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c
index 91061bc8459..847d0ee1cc7 100644
--- a/innobase/os/os0thread.c
+++ b/innobase/os/os0thread.c
@@ -100,7 +100,7 @@ os_thread_create(
{
#ifdef __WIN__
os_thread_t thread;
- ulint win_thread_id;
+ DWORD win_thread_id;
os_mutex_enter(os_sync_mutex);
os_thread_count++;
@@ -253,7 +253,7 @@ os_thread_sleep(
ulint tm) /* in: time in microseconds */
{
#ifdef __WIN__
- Sleep(tm / 1000);
+ Sleep((DWORD) tm / 1000);
#elif defined(__NETWARE__)
delay(tm / 1000);
#else
diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c
index 193bda75f24..74348b865a8 100644
--- a/innobase/rem/rem0cmp.c
+++ b/innobase/rem/rem0cmp.c
@@ -322,7 +322,9 @@ cmp_data_data_slow(
&& dtype_get_charset_coll(cur_type->prtype) !=
data_mysql_latin1_swedish_charset_coll)) {
- return(cmp_whole_field(cur_type, data1, len1, data2, len2));
+ return(cmp_whole_field(cur_type,
+ data1, (unsigned) len1,
+ data2, (unsigned) len2));
}
/* Compare then the fields */
@@ -532,8 +534,9 @@ cmp_dtuple_rec_with_match(
ret = cmp_whole_field(
cur_type,
- dfield_get_data(dtuple_field), dtuple_f_len,
- rec_b_ptr, rec_f_len);
+ dfield_get_data(dtuple_field),
+ (unsigned) dtuple_f_len,
+ rec_b_ptr, (unsigned) rec_f_len);
if (ret != 0) {
cur_bytes = 0;
@@ -832,8 +835,8 @@ cmp_rec_rec_with_match(
data_mysql_latin1_swedish_charset_coll)) {
ret = cmp_whole_field(cur_type,
- rec1_b_ptr, rec1_f_len,
- rec2_b_ptr, rec2_f_len);
+ rec1_b_ptr, (unsigned) rec1_f_len,
+ rec2_b_ptr, (unsigned) rec2_f_len);
if (ret != 0) {
cur_bytes = 0;
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 4c014d39f7a..1ee3f7d380e 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -756,7 +756,7 @@ run_again:
trx->op_info = "";
- return(err);
+ return((int) err);
}
que_thr_stop_for_mysql_no_error(thr, trx);
@@ -856,7 +856,7 @@ run_again:
trx->op_info = "";
- return(err);
+ return((int) err);
}
que_thr_stop_for_mysql_no_error(thr, trx);
@@ -972,7 +972,7 @@ run_again:
trx->op_info = "";
- return(err);
+ return((int) err);
}
que_thr_stop_for_mysql_no_error(thr, trx);
@@ -1222,7 +1222,7 @@ run_again:
trx->op_info = "";
- return(err);
+ return((int) err);
}
que_thr_stop_for_mysql_no_error(thr, trx);
@@ -1438,7 +1438,7 @@ row_mysql_recover_tmp_table(
}
else {
int status;
- int namelen = strlen(table->name);
+ int namelen = (int) strlen(table->name);
char* old_name = mem_strdupl(table->name, namelen);
/* replace "rsql" with "#sql" */
old_name[ptr - table->name + 1] = '#';
@@ -1928,7 +1928,7 @@ row_drop_table_for_mysql_in_background(
trx_free_for_background(trx);
- return(error);
+ return((int) error);
}
/*************************************************************************
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 736ca15262c..7a5e4cb9264 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -3484,10 +3484,10 @@ rec_loop:
ut_print_timestamp(stderr);
buf_page_print(buf_frame_align(rec));
fprintf(stderr,
-"\nInnoDB: rec address %lx, first buffer frame %lx\n"
-"InnoDB: buffer pool high end %lx, buf block fix count %lu\n",
- (ulong)rec, (ulong)buf_pool->frame_zero,
- (ulong)buf_pool->high_end,
+"\nInnoDB: rec address %p, first buffer frame %p\n"
+"InnoDB: buffer pool high end %p, buf block fix count %lu\n",
+ rec, buf_pool->frame_zero,
+ buf_pool->high_end,
(ulong)buf_block_align(rec)->buf_fix_count);
fprintf(stderr,
"InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,\n"
diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c
index 57166e98f45..68fe6d5079a 100644
--- a/innobase/trx/trx0sys.c
+++ b/innobase/trx/trx0sys.c
@@ -685,7 +685,8 @@ trx_sys_print_mysql_binlog_offset(void)
{
trx_sysf_t* sys_header;
mtr_t mtr;
- ulong trx_sys_mysql_bin_log_pos_high, trx_sys_mysql_bin_log_pos_low;
+ ulint trx_sys_mysql_bin_log_pos_high;
+ ulint trx_sys_mysql_bin_log_pos_low;
mtr_start(&mtr);
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index dd4da33abb5..ad82560e26c 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -274,6 +274,8 @@ trx_free(
(ulong)trx->mysql_n_tables_locked);
trx_print(stderr, trx);
+
+ ut_print_buf(stderr, (byte*)trx, sizeof(trx_t));
}
ut_a(trx->magic_n == TRX_MAGIC_N);
diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c
index 1fffd08c718..1be5939303a 100644
--- a/innobase/ut/ut0ut.c
+++ b/innobase/ut/ut0ut.c
@@ -454,7 +454,7 @@ ut_copy_file(
len < (long) sizeof buf ? (size_t) len : sizeof buf;
size_t size = fread(buf, 1, maxs, src);
fwrite(buf, 1, size, dest);
- len -= size;
+ len -= (long) size;
if (size < maxs) {
break;
}