Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe

A after merge fix for last merge


innobase/btr/btr0btr.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/btr/btr0sea.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0buf.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0flu.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0lru.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/buf/buf0rea.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/com/com0shm.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/data/data0data.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/data/data0type.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/dict/dict0crea.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/dict/dict0dict.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fil/fil0fil.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fsp/fsp0fsp.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/fut/fut0lst.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ha/ha0ha.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ibuf/ibuf0ibuf.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/include/univ.i:
  Disabled ut_sprintf/ut_fprintf. Not needed as all number arguments to printf are now casted
innobase/lock/lock0lock.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/log/log0log.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/log/log0recv.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mem/mem0dbg.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mem/mem0pool.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mtr/mtr0log.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/mtr/mtr0mtr.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/os/os0file.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/os/os0sync.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/page/page0cur.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/page/page0page.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/read/read0read.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/rem/rem0cmp.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/rem/rem0rec.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/row/row0mysql.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
  Heikki, please check the change of % to %%
innobase/row/row0sel.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/row/row0undo.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/srv/srv0srv.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/srv/srv0start.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0arr.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0rw.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/sync/sync0sync.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0purge.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0rec.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0roll.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0sys.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0trx.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/trx/trx0undo.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/usr/usr0sess.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ut/ut0mem.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
innobase/ut/ut0ut.c:
  Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
sql/sql_delete.cc:
  After merge fix
This commit is contained in:
unknown 2003-12-20 03:41:04 +02:00
commit 65c44414c2
49 changed files with 816 additions and 686 deletions

View file

@ -1177,7 +1177,8 @@ dict_create_or_check_foreign_constraint_tables(void)
error = trx->error_state;
if (error != DB_SUCCESS) {
fprintf(stderr, "InnoDB: error %lu in creation\n", error);
fprintf(stderr, "InnoDB: error %lu in creation\n",
(ulong) error);
ut_a(error == DB_OUT_OF_FILE_SPACE);
@ -1256,27 +1257,27 @@ loop:
/* We allocate the new id from the sequence of table id's */
id = dict_hdr_get_new_id(DICT_HDR_TABLE_ID);
sprintf(buf2, "%lu_%lu", ut_dulint_get_high(id),
ut_dulint_get_low(id));
sprintf(buf2, "%lu_%lu", (ulong) ut_dulint_get_high(id),
(ulong) ut_dulint_get_low(id));
foreign->id = mem_heap_alloc(foreign->heap, ut_strlen(buf2) + 1);
ut_memcpy(foreign->id, buf2, ut_strlen(buf2) + 1);
len += sprintf(buf + len,
"INSERT INTO SYS_FOREIGN VALUES('%lu_%lu', '%s', '%s', %lu);\n",
ut_dulint_get_high(id),
ut_dulint_get_low(id),
(ulong) ut_dulint_get_high(id),
(ulong) ut_dulint_get_low(id),
table->name,
foreign->referenced_table_name,
foreign->n_fields
+ (foreign->type << 24));
(ulong) (foreign->n_fields
+ (foreign->type << 24)));
for (i = 0; i < foreign->n_fields; i++) {
len += sprintf(buf + len,
"INSERT INTO SYS_FOREIGN_COLS VALUES('%lu_%lu', %lu, '%s', '%s');\n",
ut_dulint_get_high(id),
ut_dulint_get_low(id),
i,
(ulong) ut_dulint_get_high(id),
(ulong) ut_dulint_get_low(id),
(ulong) i,
foreign->foreign_col_names[i],
foreign->referenced_col_names[i]);
}
@ -1303,7 +1304,7 @@ loop:
if (error != DB_SUCCESS) {
fprintf(stderr,
"InnoDB: Foreign key constraint creation failed:\n"
"InnoDB: internal error number %lu\n", error);
"InnoDB: internal error number %lu\n", (ulong) error);
if (error == DB_DUPLICATE_KEY) {
fprintf(stderr,

View file

@ -3804,10 +3804,11 @@ dict_table_print_low(
printf(
"TABLE: name %s, id %lu %lu, columns %lu, indexes %lu, appr.rows %lu\n",
table->name,
ut_dulint_get_high(table->id),
ut_dulint_get_low(table->id),
table->n_cols, UT_LIST_GET_LEN(table->indexes),
(ulint)table->stat_n_rows);
(ulong) ut_dulint_get_high(table->id),
(ulong) ut_dulint_get_low(table->id),
(ulong) table->n_cols,
(ulong) UT_LIST_GET_LEN(table->indexes),
(ulong) table->stat_n_rows);
printf(" COLUMNS: ");
for (i = 0; i < table->n_cols - 1; i++) {
@ -3883,16 +3884,16 @@ dict_index_print_low(
printf(
" INDEX: name %s, table name %s, id %lu %lu, fields %lu/%lu, type %lu\n",
index->name, index->table_name,
ut_dulint_get_high(tree->id),
ut_dulint_get_low(tree->id),
index->n_user_defined_cols,
index->n_fields, index->type);
(ulong) ut_dulint_get_high(tree->id),
(ulong) ut_dulint_get_low(tree->id),
(ulong) index->n_user_defined_cols,
(ulong) index->n_fields, (ulong) index->type);
printf(
" root page %lu, appr.key vals %lu, leaf pages %lu, size pages %lu\n",
tree->page,
(ulint)n_vals,
index->stat_n_leaf_pages,
index->stat_index_size);
(ulong) tree->page,
(ulong) n_vals,
(ulong) index->stat_n_leaf_pages,
(ulong) index->stat_index_size);
printf(" FIELDS: ");
@ -3920,7 +3921,7 @@ dict_field_print_low(
printf(" %s", field->name);
if (field->prefix_len != 0) {
printf("(%lu)", field->prefix_len);
printf("(%lu)", (ulong) field->prefix_len);
}
}