Commit 9596f6d8 authored by marko's avatar marko

Merge r102 from hotbackup/trunk.

Corrected some comments.

os_file_create_tmpfile(): Remove the implementation from InnoDB Hot Backup.

In InnoDB Hot Backup builds, do not define dict_casedn_str(),
which is invoked in fil_load_single_table_tablespace() on
Windows.  This function depends on innobase_casedn_str() and
my_casedn_str().

Define btr_check_node_ptr() and data_error only #ifdef UNIV_DEBUG.
They are only being used in ut_ad() assertions.

Replace the occurrences of the type uint with ulint, because InnoDB
Hot Backup does not define any uint data type.

Disable lock_validate() in InnoDB Hot Backup builds.

Disable some unused static variables of srv0srv.c in InnoDB Hot Backup builds.

Disable some srv_table_...() functions in InnoDB Hot Backup builds.

Disable some unused static variables in srv0start.c in
InnoDB Hot Backup builds.

Disable io_handler_thread() in InnoDB Hot Backup builds.

Disable srv_calc_low32() and srv_calc_high32() in InnoDB Hot Backup builds
to avoid warnings about unused functions.

In fil_node_open_file(), avoid bogus assertions in InnoDB Hot Backup builds.

In fil_load_single_table_tablespace(), remove the call to dict_casedn_str(),
as it depends on MySQL code.

Copy the code of recv_reset_log_files_for_backup() from InnoDB Hot Backup.

Disable innobase_mysql_cmp(), cmp_whole_field(), cmp_data_data_slow(),
cmp_dtuple_rec_with_match() and cmp_rec_rec_with_match()
in InnoDB Hot Backup builds, as they depend on MySQL code.

Adapt dtype_set_mblen() and dtype_get_fixed_size() for InnoDB Hot Backup
builds, assuming that they will only be called on system tables, which
do not contain multi-byte characters.

Disable the static functions row_ins_set_exclusive_rec_lock() and
row_ins_dupl_error_with_rec() in InnoDB Hot Backup builds
to avoid warnings about unused functions.

In row_sel_field_store_in_mysql_format(), disable some UTF-8 related
assertions #ifndef UNIV_RELEASE_NOT_YET_STABLE.
parent a7fe6497
......@@ -2413,6 +2413,7 @@ btr_print_tree(
}
#endif /* UNIV_BTR_PRINT */
#ifdef UNIV_DEBUG
/****************************************************************
Checks that the node pointer to a page is appropriate. */
......@@ -2458,6 +2459,7 @@ btr_check_node_ptr(
return(TRUE);
}
#endif /* UNIV_DEBUG */
/****************************************************************
Display identification information for a record. */
......
......@@ -18,10 +18,10 @@ Created 5/30/1994 Heikki Tuuri
#include "dict0dict.h"
#include "btr0cur.h"
#ifdef UNIV_DEBUG
byte data_error; /* data pointers of tuple fields are initialized
to point here for error checking */
#ifdef UNIV_DEBUG
ulint data_dummy; /* this is used to fool the compiler in
dtuple_validate */
#endif /* UNIV_DEBUG */
......
......@@ -198,7 +198,8 @@ and unique key errors */
FILE* dict_foreign_err_file = NULL;
mutex_t dict_foreign_err_mutex; /* mutex protecting the foreign
and unique error buffers */
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Makes all characters in a NUL-terminated UTF-8 string lower case. */
......@@ -209,6 +210,7 @@ dict_casedn_str(
{
innobase_casedn_str(a);
}
#endif /* !UNIV_HOTBACKUP */
/************************************************************************
Checks if the database name in two table names is the same. */
......
......@@ -510,10 +510,12 @@ fil_node_open_file(
ulint size_low;
ulint size_high;
ibool ret;
ibool success;
#ifndef UNIV_HOTBACKUP
byte* buf2;
byte* page;
ibool success;
ulint space_id;
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(&(system->mutex)));
......@@ -546,9 +548,6 @@ fil_node_open_file(
ut_a(0);
}
ut_a(space->purpose != FIL_LOG);
ut_a(space->id != 0);
os_file_get_size(node->handle, &size_low, &size_high);
size_bytes = (((ib_longlong)size_high) << 32)
......@@ -557,6 +556,9 @@ fil_node_open_file(
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
#else
ut_a(space->purpose != FIL_LOG);
ut_a(space->id != 0);
if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
fprintf(stderr,
"InnoDB: Error: the size of single-table tablespace file %s\n"
......@@ -2805,6 +2807,7 @@ fil_load_single_table_tablespace(
filename);
srv_normalize_path_for_win(filepath);
#ifdef __WIN__
# ifndef UNIV_HOTBACKUP
/* If lower_case_table_names is 0 or 2, then MySQL allows database
directory names with upper case letters. On Windows, all table and
database names in InnoDB are internally always in lower case. Put the
......@@ -2812,6 +2815,7 @@ fil_load_single_table_tablespace(
internal data dictionary. */
dict_casedn_str(filepath);
# endif /* !UNIV_HOTBACKUP */
#endif
file = os_file_create_simple_no_error_handling(filepath, OS_FILE_OPEN,
OS_FILE_READ_ONLY, &success);
......
......@@ -277,6 +277,7 @@ btr_node_ptr_delete(
dict_tree_t* tree, /* in: index tree */
page_t* page, /* in: page whose node pointer is deleted */
mtr_t* mtr); /* in: mtr */
#ifdef UNIV_DEBUG
/****************************************************************
Checks that the node pointer to a page is appropriate. */
......@@ -287,6 +288,7 @@ btr_check_node_ptr(
dict_tree_t* tree, /* in: index tree */
page_t* page, /* in: index page */
mtr_t* mtr); /* in: mtr */
#endif /* UNIV_DEBUG */
/*****************************************************************
Tries to merge the page first to the left immediate brother if such a
brother exists, and the node pointers to the current page and to the
......
......@@ -9,7 +9,9 @@ Created 5/30/1994 Heikki Tuuri
#include "mem0mem.h"
#include "ut0rnd.h"
#ifdef UNIV_DEBUG
extern byte data_error;
#endif /* UNIV_DEBUG */
/*************************************************************************
Gets pointer to the type struct of SQL data field. */
......
......@@ -8,6 +8,7 @@ Created 1/16/1996 Heikki Tuuri
#include "mach0data.h"
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Get the variable length bounds of the given character set.
......@@ -20,6 +21,7 @@ innobase_get_cset_width(
ulint cset, /* in: MySQL charset-collation code */
ulint* mbminlen, /* out: minimum length of a char (in bytes) */
ulint* mbmaxlen); /* out: maximum length of a char (in bytes) */
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Gets the MySQL charset-collation code for MySQL string types. */
......@@ -55,9 +57,21 @@ dtype_set_mblen(
{
ut_ad(type);
if (dtype_is_string_type(type->mtype)) {
#ifndef UNIV_HOTBACKUP
innobase_get_cset_width(dtype_get_charset_coll(type->prtype),
&type->mbminlen, &type->mbmaxlen);
ut_ad(type->mbminlen <= type->mbmaxlen);
#else /* !UNIV_HOTBACKUP */
#ifdef notdefined
printf("ibbackup: DEBUG: type->mtype=%lu, type->prtype=%lu\n",
type->mtype, type->prtype);
#endif
ut_a(type->mtype <= DATA_BINARY);
#ifdef notdefined
ut_a(type->prtype == (DATA_BINARY | DATA_NOT_NULL));
#endif
type->mbminlen = type->mbmaxlen = 1;
#endif /* !UNIV_HOTBACKUP */
} else {
type->mbminlen = type->mbmaxlen = 0;
}
......@@ -338,7 +352,6 @@ dtype_new_read_for_order_and_null_size(
dtype_set_mblen(type);
}
#ifndef UNIV_HOTBACKUP
/***************************************************************************
Returns the size of a fixed size data type, 0 if not a fixed size type. */
UNIV_INLINE
......@@ -383,6 +396,11 @@ dtype_get_fixed_size(
if (type->prtype & DATA_BINARY_TYPE) {
return(dtype_get_len(type));
} else {
#ifdef UNIV_HOTBACKUP
if (type->mbminlen == type->mbmaxlen) {
return(dtype_get_len(type));
}
#else /* UNIV_HOTBACKUP */
/* We play it safe here and ask MySQL for
mbminlen and mbmaxlen. Although
type->mbminlen and type->mbmaxlen are
......@@ -414,6 +432,7 @@ dtype_get_fixed_size(
if (mbminlen == mbmaxlen) {
return(dtype_get_len(type));
}
#endif /* !UNIV_HOTBACKUP */
}
/* fall through for variable-length charsets */
case DATA_VARCHAR:
......@@ -485,7 +504,6 @@ dtype_get_min_size(
return(0);
}
#endif /* !UNIV_HOTBACKUP */
/***************************************************************************
Returns a stored SQL NULL size for a type. For fixed length types it is
......
......@@ -26,6 +26,7 @@ Created 1/8/1996 Heikki Tuuri
#include "ut0byte.h"
#include "trx0types.h"
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Makes all characters in a NUL-terminated UTF-8 string lower case. */
......@@ -33,6 +34,7 @@ void
dict_casedn_str(
/*============*/
char* a); /* in/out: string to put in lower case */
#endif /* !UNIV_HOTBACKUP */
/************************************************************************
Get the database name length in a table name. */
......
......@@ -183,7 +183,10 @@ void
os_io_init_simple(void);
/*===================*/
/***************************************************************************
Creates a temporary file. */
Creates a temporary file. This function is like tmpfile(3), but
the temporary file is created in the MySQL temporary directory.
On Netware, this function is like tmpfile(3), because the C run-time
library of Netware does not expose the delete-on-close flag. */
FILE*
os_file_create_tmpfile(void);
......
......@@ -357,7 +357,7 @@ trx_print(
/*======*/
FILE* f, /* in: output stream */
trx_t* trx, /* in: transaction */
uint max_query_len); /* in: max query length to print, or 0 to
ulint max_query_len); /* in: max query length to print, or 0 to
use the default max length */
#ifndef UNIV_HOTBACKUP
......
......@@ -396,7 +396,7 @@ lock_deadlock_recursive(
ulint* cost, /* in/out: number of calculation steps thus
far: if this exceeds LOCK_MAX_N_STEPS_...
we return LOCK_VICTIM_IS_START */
uint depth); /* in: recursion depth: if this exceeds
ulint depth); /* in: recursion depth: if this exceeds
LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK, we
return LOCK_VICTIM_IS_START */
......@@ -1529,7 +1529,8 @@ lock_rec_has_expl(
return(NULL);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Checks if some other transaction has a lock request in the queue. */
static
......@@ -1572,6 +1573,7 @@ lock_rec_other_has_expl_req(
return(NULL);
}
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Checks if some other transaction has a conflicting explicit lock request
......@@ -3230,7 +3232,7 @@ lock_deadlock_recursive(
ulint* cost, /* in/out: number of calculation steps thus
far: if this exceeds LOCK_MAX_N_STEPS_...
we return LOCK_VICTIM_IS_START */
uint depth) /* in: recursion depth: if this exceeds
ulint depth) /* in: recursion depth: if this exceeds
LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK, we
return LOCK_VICTIM_IS_START */
{
......@@ -4169,6 +4171,7 @@ lock_rec_print(
}
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Calculates the number of record lock structs in the record lock hash table. */
static
......@@ -4198,7 +4201,6 @@ lock_get_n_rec_locks(void)
return(n_locks);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Prints info of locks for all transactions. */
......
......@@ -3064,22 +3064,22 @@ recv_reset_log_files_for_backup(
byte* buf;
ulint i;
ulint log_dir_len;
char* name;
static const
char logfilename[] = "ib_logfile";
char name[5000];
static const char ib_logfile_basename[] = "ib_logfile";
log_dir_len = strlen(log_dir);
/* reserve space for log_dir, "ib_logfile" and a number */
name = memcpy(mem_alloc(log_dir_len + ((sizeof logfilename) + 11)),
log_dir, log_dir_len);
memcpy(name + log_dir_len, logfilename, sizeof logfilename);
/* full path name of ib_logfile consists of log dir path + basename
+ number. This must fit in the name buffer.
*/
ut_a(log_dir_len + strlen(ib_logfile_basename) + 11 < sizeof(name));
buf = ut_malloc(LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE);
memset(buf, '\0', LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE);
for (i = 0; i < n_log_files; i++) {
sprintf(name + log_dir_len + sizeof logfilename, "%lu", (ulong) i);
sprintf(name, "%s%s%lu", log_dir,
ib_logfile_basename, (ulong)i);
log_file = os_file_create_simple(name, OS_FILE_CREATE,
OS_FILE_READ_WRITE, &success);
......@@ -3117,7 +3117,7 @@ recv_reset_log_files_for_backup(
log_block_init_in_old_format(buf + LOG_FILE_HDR_SIZE, lsn);
log_block_set_first_rec_group(buf + LOG_FILE_HDR_SIZE,
LOG_BLOCK_HDR_SIZE);
strcpy(name + log_dir_len + sizeof logfilename, "0");
sprintf(name, "%s%s%lu", log_dir, ib_logfile_basename, (ulong)0);
log_file = os_file_create_simple(name, OS_FILE_OPEN,
OS_FILE_READ_WRITE, &success);
......@@ -3132,7 +3132,6 @@ recv_reset_log_files_for_backup(
os_file_flush(log_file);
os_file_close(log_file);
mem_free(name);
ut_free(buf);
}
#endif /* UNIV_HOTBACKUP */
......
......@@ -502,7 +502,8 @@ os_io_init_simple(void)
#if !defined(UNIV_HOTBACKUP) && !defined(__NETWARE__)
/*************************************************************************
Creates a temporary file. This function is defined in ha_innodb.cc. */
Creates a temporary file that will be deleted on close.
This function is defined in ha_innodb.cc. */
int
innobase_mysql_tmpfile(void);
......@@ -511,7 +512,10 @@ innobase_mysql_tmpfile(void);
#endif /* !UNIV_HOTBACKUP && !__NETWARE__ */
/***************************************************************************
Creates a temporary file. */
Creates a temporary file. This function is like tmpfile(3), but
the temporary file is created in the MySQL temporary directory.
On Netware, this function is like tmpfile(3), because the C run-time
library of Netware does not expose the delete-on-close flag. */
FILE*
os_file_create_tmpfile(void)
......@@ -536,7 +540,7 @@ os_file_create_tmpfile(void)
O_SEQUENTIAL | O_SHORT_LIVED | O_TEMPORARY |
# endif /* __WIN__ */
O_CREAT | O_EXCL | O_RDWR,
S_IREAD | S_IWRITE);
0600);
if (fd >= 0) {
# ifndef __WIN__
unlink(name);
......
......@@ -57,6 +57,7 @@ cmp_debug_dtuple_rec_with_match(
returns, contains the value for current
comparison */
#endif /* UNIV_DEBUG */
#ifndef UNIV_HOTBACKUP
/*****************************************************************
This function is used to compare two data fields for which the data type
is such that we must use MySQL code to compare them. The prototype here
......@@ -75,7 +76,7 @@ innobase_mysql_cmp(
unsigned char* b, /* in: data field */
unsigned int b_length); /* in: data field length,
not UNIV_SQL_NULL */
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Transforms the character code so that it is ordered appropriately for the
language. This is only used for the latin1 char set. MySQL does the
......@@ -148,6 +149,7 @@ cmp_types_are_equal(
return(TRUE);
}
#ifndef UNIV_HOTBACKUP
/*****************************************************************
Innobase uses this function to compare two data fields for which the data type
is such that we must compare whole fields or call MySQL to do the comparison */
......@@ -276,6 +278,7 @@ cmp_whole_field(
return(0);
}
#endif /* !UNIV_HOTBACKUP */
/*****************************************************************
This function is used to compare two data fields for which we know the
......@@ -294,6 +297,7 @@ cmp_data_data_slow(
buffer) */
ulint len2) /* in: data field length or UNIV_SQL_NULL */
{
#ifndef UNIV_HOTBACKUP
ulint data1_byte;
ulint data2_byte;
ulint cur_bytes;
......@@ -388,6 +392,12 @@ cmp_data_data_slow(
data1++;
data2++;
}
#else /* !UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* !UNIV_HOTBACKUP */
return(0); /* Not reached */
}
......@@ -423,6 +433,7 @@ cmp_dtuple_rec_with_match(
matched; when function returns, contains the
value for current comparison */
{
#ifndef UNIV_HOTBACKUP
dtype_t* cur_type; /* pointer to type of the current
field in dtuple */
dfield_t* dtuple_field; /* current field in logical record */
......@@ -624,6 +635,13 @@ order_resolved:
*matched_bytes = cur_bytes;
return(ret);
#else /* !UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(0);
#endif /* !UNIV_HOTBACKUP */
}
/******************************************************************
......@@ -712,6 +730,7 @@ cmp_rec_rec_with_match(
matched; when the function returns, contains
the value for the current comparison */
{
#ifndef UNIV_HOTBACKUP
dtype_t* cur_type; /* pointer to type struct of the
current field in index */
ulint rec1_n_fields; /* the number of fields in rec */
......@@ -919,6 +938,13 @@ order_resolved:
*matched_bytes = cur_bytes;
return(ret);
#else /* !UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
return(0);
#endif /* !UNIV_HOTBACKUP */
}
#ifdef UNIV_DEBUG
......
......@@ -1137,6 +1137,7 @@ row_ins_set_shared_rec_lock(
return(err);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Sets a exclusive lock on a record. Used in locking possible duplicate key
records */
......@@ -1166,6 +1167,7 @@ row_ins_set_exclusive_rec_lock(
return(err);
}
#endif /* !UNIV_HOTBACKUP */
/*******************************************************************
Checks if foreign key constraint fails for an index entry. Sets shared locks
......@@ -1564,6 +1566,7 @@ row_ins_check_foreign_constraints(
return(DB_SUCCESS);
}
#ifndef UNIV_HOTBACKUP
/*******************************************************************
Checks if a unique key violation to rec would occur at the index entry
insert. */
......@@ -1615,6 +1618,7 @@ row_ins_dupl_error_with_rec(
return(!rec_get_deleted_flag(rec, rec_offs_comp(offsets)));
}
#endif /* !UNIV_HOTBACKUP */
/*******************************************************************
Scans a unique non-clustered index at a given index entry to determine
......
......@@ -2393,16 +2393,18 @@ row_sel_field_store_in_mysql_format(
} else if (templ->type == DATA_MYSQL) {
memcpy(dest, data, len);
#if defined(UNIV_RELEASE_NOT_YET_STABLE) || defined(UNIV_DEBUG)
ut_a(templ->mysql_col_len >= len);
ut_a(templ->mbmaxlen >= templ->mbminlen);
ut_a(templ->mbmaxlen > templ->mbminlen
|| templ->mysql_col_len == len);
ut_a(len * templ->mbmaxlen >= templ->mysql_col_len);
#endif /* UNIV_RELEASE_NOT_YET_STABLE || UNIV_DEBUG */
/* The following assertion would fail for old tables
containing UTF-8 ENUM columns due to Bug #9526. */
ut_ad(!templ->mbmaxlen
|| !(templ->mysql_col_len % templ->mbmaxlen));
ut_a(len * templ->mbmaxlen >= templ->mysql_col_len);
if (templ->mbminlen != templ->mbmaxlen) {
/* Pad with spaces. This undoes the stripping
......@@ -2412,6 +2414,7 @@ row_sel_field_store_in_mysql_format(
memset(dest + len, 0x20, templ->mysql_col_len - len);
}
} else {
#if defined(UNIV_RELEASE_NOT_YET_STABLE) || defined(UNIV_DEBUG)
ut_a(templ->type == DATA_CHAR
|| templ->type == DATA_FIXBINARY
/*|| templ->type == DATA_SYS_CHILD
......@@ -2419,6 +2422,7 @@ row_sel_field_store_in_mysql_format(
|| templ->type == DATA_FLOAT
|| templ->type == DATA_DOUBLE
|| templ->type == DATA_DECIMAL);
#endif /* UNIV_RELEASE_NOT_YET_STABLE || UNIV_DEBUG */
ut_ad(templ->mysql_col_len == len);
memcpy(dest, data, len);
......
......@@ -339,10 +339,12 @@ ulint srv_n_rows_inserted = 0;
ulint srv_n_rows_updated = 0;
ulint srv_n_rows_deleted = 0;
ulint srv_n_rows_read = 0;
#ifndef UNIV_HOTBACKUP
static ulint srv_n_rows_inserted_old = 0;
static ulint srv_n_rows_updated_old = 0;
static ulint srv_n_rows_deleted_old = 0;
static ulint srv_n_rows_read_old = 0;
#endif /* !UNIV_HOTBACKUP */
ulint srv_n_lock_wait_count = 0;
ulint srv_n_lock_wait_current_count = 0;
......@@ -663,6 +665,7 @@ srv_table_get_nth_slot(
return(srv_sys->threads + index);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Gets the number of threads in the system. */
......@@ -771,6 +774,7 @@ srv_suspend_thread(void)
return(event);
}
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Releases threads of the type given from suspension in the thread table.
......
......@@ -68,20 +68,20 @@ ibool srv_have_fullfsync = FALSE;
ibool srv_start_raw_disk_in_use = FALSE;
static ibool srv_start_has_been_called = FALSE;
ulint srv_sizeof_trx_t_in_ha_innodb_cc;
ibool srv_startup_is_before_trx_rollback_phase = FALSE;
ibool srv_is_being_started = FALSE;
#ifndef UNIV_HOTBACKUP
static ibool srv_start_has_been_called = FALSE;
static ibool srv_was_started = FALSE;
#endif /* !UNIV_HOTBACKUP */
/* At a shutdown the value first climbs to SRV_SHUTDOWN_CLEANUP
and then to SRV_SHUTDOWN_LAST_PHASE */
ulint srv_shutdown_state = 0;
ibool measure_cont = FALSE;
#ifndef UNIV_HOTBACKUP
static os_file_t files[1000];
static mutex_t ios_mutex;
......@@ -96,6 +96,7 @@ static os_fast_mutex_t srv_os_test_mutex;
/* Name of srv_monitor_file */
static char* srv_monitor_file_name;
#endif /* !UNIV_HOTBACKUP */
#define SRV_N_PENDING_IOS_PER_THREAD OS_AIO_N_PENDING_IOS_PER_THREAD
#define SRV_MAX_N_PENDING_SYNC_IOS 100
......@@ -420,6 +421,7 @@ srv_parse_log_group_home_dirs(
return(TRUE);
}
#ifndef UNIV_HOTBACKUP
/************************************************************************
I/o-handler thread function. */
static
......@@ -463,6 +465,7 @@ io_handler_thread(
return(0);
#endif
}
#endif /* !UNIV_HOTBACKUP */
#ifdef __WIN__
#define SRV_PATH_SEPARATOR '\\'
......@@ -516,6 +519,7 @@ srv_add_path_separator_if_needed(
return(out_str);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Calculates the low 32 bits when a file size which is given as a number
database pages is converted to the number of bytes. */
......@@ -544,7 +548,6 @@ srv_calc_high32(
return(file_size >> (32 - UNIV_PAGE_SIZE_SHIFT));
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Creates or opens the log files and closes them. */
static
......
......@@ -32,7 +32,7 @@ copy MUST be equal to the one in mysql/sql/ha_innodb.cc ! */
void innobase_mysql_print_thd(
FILE* f,
void* thd,
uint max_query_len);
ulint max_query_len);
/* Dummy session used currently in MySQL interface */
sess_t* trx_dummy_sess = NULL;
......@@ -1690,7 +1690,7 @@ trx_print(
/*======*/
FILE* f, /* in: output stream */
trx_t* trx, /* in: transaction */
uint max_query_len) /* in: max query length to print, or 0 to
ulint max_query_len) /* in: max query length to print, or 0 to
use the default max length */
{
ibool newline;
......@@ -1950,7 +1950,7 @@ trx_recover_for_mysql(
ulint len) /* in: number of slots in xid_list */
{
trx_t* trx;
int count = 0;
ulint count = 0;
ut_ad(xid_list);
ut_ad(len);
......@@ -1985,7 +1985,7 @@ trx_recover_for_mysql(
count++;
if ((uint)count == len ) {
if (count == len) {
break;
}
}
......@@ -1998,8 +1998,8 @@ trx_recover_for_mysql(
if (count > 0){
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: %d transactions in prepared state after recovery\n",
count);
" InnoDB: %lu transactions in prepared state after recovery\n",
(ulong) count);
}
return (count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment