Commit 42116bf2 authored by unknown's avatar unknown

Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0

into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0

parents 2359f1fa ddb47b9e
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Script to create Solaris packages # Script to create Solaris packages
# #
$INTERACTIVE= 0; $INTERACTIVE= 0;
$hostname= `hostname`; chomp ($hostname= `hostname`);
$find = "/usr/bin/find"; $find = "/usr/bin/find";
$pkgproto = "/usr/bin/pkgproto"; $pkgproto = "/usr/bin/pkgproto";
$pkgmk = "/usr/bin/pkgmk -o"; $pkgmk = "/usr/bin/pkgmk -o";
...@@ -75,7 +75,7 @@ $os =~ '\.'; ...@@ -75,7 +75,7 @@ $os =~ '\.';
$os = "sol$'"; $os = "sol$'";
chomp $os; chomp $os;
$default{"basedir"}= "/usr/local"; $default{"basedir"}= "/usr/local";
$default{"packagename"}= $fullname . '.pkg'; $default{"packagename"}= "${fullname}.pkg";
# Check for correctness of guessed values by userinput # Check for correctness of guessed values by userinput
...@@ -136,6 +136,8 @@ system ("gzip /tmp/$packagename"); ...@@ -136,6 +136,8 @@ system ("gzip /tmp/$packagename");
# Clean-up the spool area # Clean-up the spool area
system ("(cd /var/spool/pkg; rm -rf $pkg)"); system ("(cd /var/spool/pkg; rm -rf $pkg)");
# Clean-up the ~/packaging/ area
system ("(rm -rf mysql*)");
unlink $pkginfo; unlink $pkginfo;
unlink $prototype; unlink $prototype;
system ("mv /tmp/${packagename}.gz $pkgdir"); system ("mv /tmp/${packagename}.gz $pkgdir");
......
...@@ -81,6 +81,7 @@ dtype_get_at_most_n_mbchars( ...@@ -81,6 +81,7 @@ dtype_get_at_most_n_mbchars(
ulint data_len, ulint data_len,
const char* str) const char* str)
{ {
#ifndef UNIV_HOTBACKUP
ut_a(data_len != UNIV_SQL_NULL); ut_a(data_len != UNIV_SQL_NULL);
if (dtype_str_needs_mysql_cmp(dtype)) { if (dtype_str_needs_mysql_cmp(dtype)) {
...@@ -99,6 +100,12 @@ dtype_get_at_most_n_mbchars( ...@@ -99,6 +100,12 @@ dtype_get_at_most_n_mbchars(
} }
return(data_len); return(data_len);
#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 */
} }
/************************************************************************* /*************************************************************************
......
...@@ -53,6 +53,7 @@ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve ...@@ -53,6 +53,7 @@ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve
/* Identifies generated InnoDB foreign key names */ /* Identifies generated InnoDB foreign key names */
static char dict_ibfk[] = "_ibfk_"; static char dict_ibfk[] = "_ibfk_";
#ifndef UNIV_HOTBACKUP
/********************************************************************** /**********************************************************************
Compares NUL-terminated UTF-8 strings case insensitively. Compares NUL-terminated UTF-8 strings case insensitively.
...@@ -76,6 +77,7 @@ void ...@@ -76,6 +77,7 @@ void
innobase_casedn_str( innobase_casedn_str(
/*================*/ /*================*/
char* a); /* in/out: string to put in lower case */ char* a); /* in/out: string to put in lower case */
#endif /* !UNIV_HOTBACKUP */
/************************************************************************** /**************************************************************************
Adds a column to the data dictionary hash table. */ Adds a column to the data dictionary hash table. */
...@@ -2095,6 +2097,7 @@ dict_foreign_find_index( ...@@ -2095,6 +2097,7 @@ dict_foreign_find_index(
dict_index_t* types_idx)/* in: NULL or an index to whose types the dict_index_t* types_idx)/* in: NULL or an index to whose types the
column types must match */ column types must match */
{ {
#ifndef UNIV_HOTBACKUP
dict_index_t* index; dict_index_t* index;
const char* col_name; const char* col_name;
ulint i; ulint i;
...@@ -2139,6 +2142,12 @@ dict_foreign_find_index( ...@@ -2139,6 +2142,12 @@ dict_foreign_find_index(
} }
return(NULL); return(NULL);
#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 */
} }
/************************************************************************** /**************************************************************************
...@@ -2492,6 +2501,7 @@ dict_scan_col( ...@@ -2492,6 +2501,7 @@ dict_scan_col(
const char** name) /* out,own: the column name; NULL if no name const char** name) /* out,own: the column name; NULL if no name
was scannable */ was scannable */
{ {
#ifndef UNIV_HOTBACKUP
dict_col_t* col; dict_col_t* col;
ulint i; ulint i;
...@@ -2525,6 +2535,12 @@ dict_scan_col( ...@@ -2525,6 +2535,12 @@ dict_scan_col(
} }
return(ptr); return(ptr);
#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 */
} }
/************************************************************************* /*************************************************************************
...@@ -2542,6 +2558,7 @@ dict_scan_table_name( ...@@ -2542,6 +2558,7 @@ dict_scan_table_name(
const char** ref_name)/* out,own: the table name; const char** ref_name)/* out,own: the table name;
NULL if no name was scannable */ NULL if no name was scannable */
{ {
#ifndef UNIV_HOTBACKUP
const char* database_name = NULL; const char* database_name = NULL;
ulint database_name_len = 0; ulint database_name_len = 0;
const char* table_name = NULL; const char* table_name = NULL;
...@@ -2623,6 +2640,12 @@ dict_scan_table_name( ...@@ -2623,6 +2640,12 @@ dict_scan_table_name(
*table = dict_table_get_low(ref); *table = dict_table_get_low(ref);
return(ptr); return(ptr);
#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 */
} }
/************************************************************************* /*************************************************************************
......
...@@ -8,7 +8,9 @@ Created 4/24/1996 Heikki Tuuri ...@@ -8,7 +8,9 @@ Created 4/24/1996 Heikki Tuuri
*******************************************************/ *******************************************************/
#include "dict0load.h" #include "dict0load.h"
#ifndef UNIV_HOTBACKUP
#include "mysql_version.h" #include "mysql_version.h"
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_NONINL #ifdef UNIV_NONINL
#include "dict0load.ic" #include "dict0load.ic"
...@@ -792,6 +794,7 @@ dict_load_table( ...@@ -792,6 +794,7 @@ dict_load_table(
name, (ulong)mix_len); name, (ulong)mix_len);
} }
#ifndef UNIV_HOTBACKUP
#if MYSQL_VERSION_ID < 50003 #if MYSQL_VERSION_ID < 50003
/* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the /* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
"compact format" flag. */ "compact format" flag. */
...@@ -807,6 +810,7 @@ dict_load_table( ...@@ -807,6 +810,7 @@ dict_load_table(
return(NULL); return(NULL);
} }
#endif /* MYSQL_VERSION_ID < 50300 */ #endif /* MYSQL_VERSION_ID < 50300 */
#endif /* !UNIV_HOTBACKUP */
ut_a(0 == ut_strcmp("SPACE", ut_a(0 == ut_strcmp("SPACE",
dict_field_get_col( dict_field_get_col(
......
...@@ -273,6 +273,7 @@ dtype_get_fixed_size( ...@@ -273,6 +273,7 @@ dtype_get_fixed_size(
/* out: fixed size, or 0 */ /* out: fixed size, or 0 */
dtype_t* type) /* in: type */ dtype_t* type) /* in: type */
{ {
#ifndef UNIV_HOTBACKUP
ulint mtype; ulint mtype;
mtype = dtype_get_mtype(type); mtype = dtype_get_mtype(type);
...@@ -321,6 +322,12 @@ dtype_get_fixed_size( ...@@ -321,6 +322,12 @@ dtype_get_fixed_size(
} }
return(0); return(0);
#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 */
} }
/*************************************************************************** /***************************************************************************
......
...@@ -294,6 +294,12 @@ srv_boot(void); ...@@ -294,6 +294,12 @@ srv_boot(void);
/*==========*/ /*==========*/
/* out: DB_SUCCESS or error code */ /* out: DB_SUCCESS or error code */
/************************************************************************* /*************************************************************************
Initializes the server. */
void
srv_init(void);
/*==========*/
/*************************************************************************
Frees the OS fast mutex created in srv_boot(). */ Frees the OS fast mutex created in srv_boot(). */
void void
......
...@@ -53,6 +53,16 @@ srv_parse_log_group_home_dirs( ...@@ -53,6 +53,16 @@ srv_parse_log_group_home_dirs(
error */ error */
char* str, /* in: character string */ char* str, /* in: character string */
char*** log_group_home_dirs); /* out, own: log group home dirs */ char*** log_group_home_dirs); /* out, own: log group home dirs */
/*************************************************************************
Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */
char*
srv_add_path_separator_if_needed(
/*=============================*/
/* out: string which has the separator if the
string is not empty */
char* str); /* in: null-terminated character string */
/******************************************************************** /********************************************************************
Starts Innobase and creates a new database if database files Starts Innobase and creates a new database if database files
are not found and the user wants. Server parameters are are not found and the user wants. Server parameters are
......
...@@ -17,7 +17,9 @@ Created 9/5/1995 Heikki Tuuri ...@@ -17,7 +17,9 @@ Created 9/5/1995 Heikki Tuuri
#include "os0sync.h" #include "os0sync.h"
#include "sync0arr.h" #include "sync0arr.h"
#ifndef UNIV_HOTBACKUP
extern my_bool timed_mutexes; extern my_bool timed_mutexes;
#endif /* UNIV_HOTBACKUP */
/********************************************************************** /**********************************************************************
Initializes the synchronization data structures. */ Initializes the synchronization data structures. */
...@@ -475,6 +477,7 @@ struct mutex_struct { ...@@ -475,6 +477,7 @@ struct mutex_struct {
const char* cfile_name;/* File name where mutex created */ const char* cfile_name;/* File name where mutex created */
ulint cline; /* Line where created */ ulint cline; /* Line where created */
ulint magic_n; ulint magic_n;
#ifndef UNIV_HOTBACKUP
ulong count_using; /* count of times mutex used */ ulong count_using; /* count of times mutex used */
ulong count_spin_loop; /* count of spin loops */ ulong count_spin_loop; /* count of spin loops */
ulong count_spin_rounds; /* count of spin rounds */ ulong count_spin_rounds; /* count of spin rounds */
...@@ -484,6 +487,7 @@ struct mutex_struct { ...@@ -484,6 +487,7 @@ struct mutex_struct {
ulonglong lmax_spent_time; /* mutex os_wait timer msec */ ulonglong lmax_spent_time; /* mutex os_wait timer msec */
const char* cmutex_name;/* mutex name */ const char* cmutex_name;/* mutex name */
ulint mutex_type;/* 0 - usual mutex 1 - rw_lock mutex */ ulint mutex_type;/* 0 - usual mutex 1 - rw_lock mutex */
#endif /* !UNIV_HOTBACKUP */
}; };
#define MUTEX_MAGIC_N (ulint)979585 #define MUTEX_MAGIC_N (ulint)979585
......
...@@ -250,7 +250,9 @@ mutex_enter_func( ...@@ -250,7 +250,9 @@ mutex_enter_func(
/* Note that we do not peek at the value of lock_word before trying /* Note that we do not peek at the value of lock_word before trying
the atomic test_and_set; we could peek, and possibly save time. */ the atomic test_and_set; we could peek, and possibly save time. */
#ifndef UNIV_HOTBACKUP
mutex->count_using++; mutex->count_using++;
#endif /* UNIV_HOTBACKUP */
if (!mutex_test_and_set(mutex)) if (!mutex_test_and_set(mutex))
{ {
......
...@@ -173,10 +173,10 @@ their transaction objects for a recovery. */ ...@@ -173,10 +173,10 @@ their transaction objects for a recovery. */
int int
trx_recover_for_mysql( trx_recover_for_mysql(
/*=================*/ /*==================*/
/* out: number of prepared transactions */ /* out: number of prepared transactions */
XID* xid_list, /* in/out: prepared transactions */ XID* xid_list, /* in/out: prepared transactions */
uint len); /* in: number of slots in xid_list */ ulint len); /* in: number of slots in xid_list */
/*********************************************************************** /***********************************************************************
This function is used to commit one X/Open XA distributed transaction This function is used to commit one X/Open XA distributed transaction
......
...@@ -694,7 +694,7 @@ lock_is_table_exclusive( ...@@ -694,7 +694,7 @@ lock_is_table_exclusive(
trx_t* trx) /* in: transaction */ trx_t* trx) /* in: transaction */
{ {
lock_t* lock; lock_t* lock;
bool ok = FALSE; ibool ok = FALSE;
ut_ad(table && trx); ut_ad(table && trx);
...@@ -4219,7 +4219,8 @@ lock_get_n_rec_locks(void) ...@@ -4219,7 +4219,8 @@ lock_get_n_rec_locks(void)
return(n_locks); return(n_locks);
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Prints info of locks for all transactions. */ Prints info of locks for all transactions. */
...@@ -4743,7 +4744,7 @@ lock_validate(void) ...@@ -4743,7 +4744,7 @@ lock_validate(void)
return(TRUE); return(TRUE);
} }
#endif /* !UNIV_HOTBACKUP */
/*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/ /*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/
/************************************************************************* /*************************************************************************
......
...@@ -1546,6 +1546,7 @@ row_ins_scan_sec_index_for_duplicate( ...@@ -1546,6 +1546,7 @@ row_ins_scan_sec_index_for_duplicate(
dtuple_t* entry, /* in: index entry */ dtuple_t* entry, /* in: index entry */
que_thr_t* thr) /* in: query thread */ que_thr_t* thr) /* in: query thread */
{ {
#ifndef UNIV_HOTBACKUP
ulint n_unique; ulint n_unique;
ulint i; ulint i;
int cmp; int cmp;
...@@ -1662,6 +1663,12 @@ row_ins_scan_sec_index_for_duplicate( ...@@ -1662,6 +1663,12 @@ row_ins_scan_sec_index_for_duplicate(
dtuple_set_n_fields_cmp(entry, n_fields_cmp); dtuple_set_n_fields_cmp(entry, n_fields_cmp);
return(err); return(err);
#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 */
} }
/******************************************************************* /*******************************************************************
...@@ -1681,6 +1688,7 @@ row_ins_duplicate_error_in_clust( ...@@ -1681,6 +1688,7 @@ row_ins_duplicate_error_in_clust(
que_thr_t* thr, /* in: query thread */ que_thr_t* thr, /* in: query thread */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /* in: mtr */
{ {
#ifndef UNIV_HOTBACKUP
ulint err; ulint err;
rec_t* rec; rec_t* rec;
page_t* page; page_t* page;
...@@ -1801,6 +1809,12 @@ row_ins_duplicate_error_in_clust( ...@@ -1801,6 +1809,12 @@ row_ins_duplicate_error_in_clust(
err = DB_SUCCESS; err = DB_SUCCESS;
func_exit: func_exit:
return(err); return(err);
#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 */
} }
/******************************************************************* /*******************************************************************
......
...@@ -260,6 +260,7 @@ row_mysql_handle_errors( ...@@ -260,6 +260,7 @@ row_mysql_handle_errors(
que_thr_t* thr, /* in: query thread */ que_thr_t* thr, /* in: query thread */
trx_savept_t* savept) /* in: savepoint or NULL */ trx_savept_t* savept) /* in: savepoint or NULL */
{ {
#ifndef UNIV_HOTBACKUP
ulint err; ulint err;
handle_new_error: handle_new_error:
...@@ -359,6 +360,12 @@ row_mysql_handle_errors( ...@@ -359,6 +360,12 @@ row_mysql_handle_errors(
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
return(FALSE); return(FALSE);
#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 */
} }
/************************************************************************ /************************************************************************
...@@ -2072,6 +2079,7 @@ row_add_table_to_background_drop_list( ...@@ -2072,6 +2079,7 @@ row_add_table_to_background_drop_list(
return(TRUE); return(TRUE);
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Discards the tablespace of a table which stored in an .ibd file. Discarding Discards the tablespace of a table which stored in an .ibd file. Discarding
means that this function deletes the .ibd file and assigns a new table id for means that this function deletes the .ibd file and assigns a new table id for
...@@ -2692,6 +2700,7 @@ fputs(" InnoDB: Unable to assign a new identifier to table ", stderr); ...@@ -2692,6 +2700,7 @@ fputs(" InnoDB: Unable to assign a new identifier to table ", stderr);
return((int) err); return((int) err);
} }
#endif /* !UNIV_HOTBACKUP */
/************************************************************************* /*************************************************************************
Drops a table for MySQL. If the name of the table to be dropped is equal Drops a table for MySQL. If the name of the table to be dropped is equal
...@@ -3088,7 +3097,9 @@ fputs(" InnoDB: You are trying to drop table ", stderr); ...@@ -3088,7 +3097,9 @@ fputs(" InnoDB: You are trying to drop table ", stderr);
trx->op_info = ""; trx->op_info = "";
#ifndef UNIV_HOTBACKUP
srv_wake_master_thread(); srv_wake_master_thread();
#endif /* !UNIV_HOTBACKUP */
return((int) err); return((int) err);
} }
......
...@@ -848,7 +848,7 @@ srv_get_thread_type(void) ...@@ -848,7 +848,7 @@ srv_get_thread_type(void)
/************************************************************************* /*************************************************************************
Initializes the server. */ Initializes the server. */
static
void void
srv_init(void) srv_init(void)
/*==========*/ /*==========*/
...@@ -1310,6 +1310,7 @@ srv_boot(void) ...@@ -1310,6 +1310,7 @@ srv_boot(void)
return(DB_SUCCESS); return(DB_SUCCESS);
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Reserves a slot in the thread table for the current MySQL OS thread. Reserves a slot in the thread table for the current MySQL OS thread.
NOTE! The kernel mutex has to be reserved by the caller! */ NOTE! The kernel mutex has to be reserved by the caller! */
...@@ -1368,6 +1369,7 @@ srv_table_reserve_slot_for_mysql(void) ...@@ -1368,6 +1369,7 @@ srv_table_reserve_slot_for_mysql(void)
return(slot); return(slot);
} }
#endif /* !UNIV_HOTBACKUP */
/******************************************************************* /*******************************************************************
Puts a MySQL OS thread to wait for a lock to be released. If an error Puts a MySQL OS thread to wait for a lock to be released. If an error
...@@ -1382,6 +1384,7 @@ srv_suspend_mysql_thread( ...@@ -1382,6 +1384,7 @@ srv_suspend_mysql_thread(
que_thr_t* thr) /* in: query thread associated with the MySQL que_thr_t* thr) /* in: query thread associated with the MySQL
OS thread */ OS thread */
{ {
#ifndef UNIV_HOTBACKUP
srv_slot_t* slot; srv_slot_t* slot;
os_event_t event; os_event_t event;
double wait_time; double wait_time;
...@@ -1520,6 +1523,12 @@ srv_suspend_mysql_thread( ...@@ -1520,6 +1523,12 @@ srv_suspend_mysql_thread(
trx->error_state = DB_LOCK_WAIT_TIMEOUT; trx->error_state = DB_LOCK_WAIT_TIMEOUT;
} }
#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 */
} }
/************************************************************************ /************************************************************************
...@@ -1532,6 +1541,7 @@ srv_release_mysql_thread_if_suspended( ...@@ -1532,6 +1541,7 @@ srv_release_mysql_thread_if_suspended(
que_thr_t* thr) /* in: query thread associated with the que_thr_t* thr) /* in: query thread associated with the
MySQL OS thread */ MySQL OS thread */
{ {
#ifndef UNIV_HOTBACKUP
srv_slot_t* slot; srv_slot_t* slot;
ulint i; ulint i;
...@@ -1553,8 +1563,15 @@ srv_release_mysql_thread_if_suspended( ...@@ -1553,8 +1563,15 @@ srv_release_mysql_thread_if_suspended(
} }
/* not found */ /* not found */
#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 */
} }
#ifndef UNIV_HOTBACKUP
/********************************************************************** /**********************************************************************
Refreshes the values used to calculate per-second averages. */ Refreshes the values used to calculate per-second averages. */
static static
...@@ -2576,3 +2593,4 @@ srv_master_thread( ...@@ -2576,3 +2593,4 @@ srv_master_thread(
return(0); return(0);
#endif #endif
} }
#endif /* !UNIV_HOTBACKUP */
...@@ -479,7 +479,6 @@ srv_normalize_path_for_win( ...@@ -479,7 +479,6 @@ srv_normalize_path_for_win(
Adds a slash or a backslash to the end of a string if it is missing Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */ and the string is not empty. */
static
char* char*
srv_add_path_separator_if_needed( srv_add_path_separator_if_needed(
/*=============================*/ /*=============================*/
...@@ -531,6 +530,7 @@ srv_calc_high32( ...@@ -531,6 +530,7 @@ srv_calc_high32(
return(file_size >> (32 - UNIV_PAGE_SIZE_SHIFT)); return(file_size >> (32 - UNIV_PAGE_SIZE_SHIFT));
} }
#ifndef UNIV_HOTBACKUP
/************************************************************************* /*************************************************************************
Creates or opens the log files and closes them. */ Creates or opens the log files and closes them. */
static static
...@@ -1834,4 +1834,5 @@ void set_panic_flag_for_netware() ...@@ -1834,4 +1834,5 @@ void set_panic_flag_for_netware()
extern ibool panic_shutdown; extern ibool panic_shutdown;
panic_shutdown = TRUE; panic_shutdown = TRUE;
} }
#endif #endif /* __NETWARE__ */
#endif /* !UNIV_HOTBACKUP */
...@@ -102,8 +102,10 @@ rw_lock_create_func( ...@@ -102,8 +102,10 @@ rw_lock_create_func(
lock->mutex.cfile_name = cfile_name; lock->mutex.cfile_name = cfile_name;
lock->mutex.cline = cline; lock->mutex.cline = cline;
#ifndef UNIV_HOTBACKUP
lock->mutex.cmutex_name = cmutex_name; lock->mutex.cmutex_name = cmutex_name;
lock->mutex.mutex_type = 1; lock->mutex.mutex_type = 1;
#endif /* !UNIV_HOTBACKUP */
rw_lock_set_waiters(lock, 0); rw_lock_set_waiters(lock, 0);
rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED); rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED);
......
...@@ -215,6 +215,7 @@ mutex_create_func( ...@@ -215,6 +215,7 @@ mutex_create_func(
mutex->level = SYNC_LEVEL_NONE; mutex->level = SYNC_LEVEL_NONE;
mutex->cfile_name = cfile_name; mutex->cfile_name = cfile_name;
mutex->cline = cline; mutex->cline = cline;
#ifndef UNIV_HOTBACKUP
mutex->cmutex_name= cmutex_name; mutex->cmutex_name= cmutex_name;
mutex->count_using= 0; mutex->count_using= 0;
mutex->mutex_type= 0; mutex->mutex_type= 0;
...@@ -224,7 +225,7 @@ mutex_create_func( ...@@ -224,7 +225,7 @@ mutex_create_func(
mutex->count_spin_rounds= 0; mutex->count_spin_rounds= 0;
mutex->count_os_wait= 0; mutex->count_os_wait= 0;
mutex->count_os_yield= 0; mutex->count_os_yield= 0;
#endif /* !UNIV_HOTBACKUP */
/* Check that lock_word is aligned; this is important on Intel */ /* Check that lock_word is aligned; this is important on Intel */
ut_ad(((ulint)(&(mutex->lock_word))) % 4 == 0); ut_ad(((ulint)(&(mutex->lock_word))) % 4 == 0);
...@@ -372,9 +373,9 @@ mutex_spin_wait( ...@@ -372,9 +373,9 @@ mutex_spin_wait(
ulint ltime_diff; ulint ltime_diff;
ulint sec; ulint sec;
ulint ms; ulint ms;
#ifndef UNIV_HOTBACKUP
uint timer_started = 0; uint timer_started = 0;
#endif /* !UNIV_HOTBACKUP */
ut_ad(mutex); ut_ad(mutex);
mutex_loop: mutex_loop:
...@@ -388,8 +389,10 @@ mutex_spin_wait( ...@@ -388,8 +389,10 @@ mutex_spin_wait(
memory word. */ memory word. */
spin_loop: spin_loop:
#ifndef UNIV_HOTBACKUP
mutex_spin_wait_count++; mutex_spin_wait_count++;
mutex->count_spin_loop++; mutex->count_spin_loop++;
#endif /* !UNIV_HOTBACKUP */
while (mutex_get_lock_word(mutex) != 0 && i < SYNC_SPIN_ROUNDS) while (mutex_get_lock_word(mutex) != 0 && i < SYNC_SPIN_ROUNDS)
{ {
...@@ -403,6 +406,7 @@ mutex_spin_wait( ...@@ -403,6 +406,7 @@ mutex_spin_wait(
if (i == SYNC_SPIN_ROUNDS) if (i == SYNC_SPIN_ROUNDS)
{ {
#ifndef UNIV_HOTBACKUP
mutex->count_os_yield++; mutex->count_os_yield++;
if (timed_mutexes == 1 && timer_started==0) if (timed_mutexes == 1 && timer_started==0)
{ {
...@@ -410,6 +414,7 @@ mutex_spin_wait( ...@@ -410,6 +414,7 @@ mutex_spin_wait(
lstart_time= (ib_longlong)sec * 1000000 + ms; lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1; timer_started = 1;
} }
#endif /* !UNIV_HOTBACKUP */
os_thread_yield(); os_thread_yield();
} }
...@@ -422,7 +427,9 @@ mutex_spin_wait( ...@@ -422,7 +427,9 @@ mutex_spin_wait(
mutex_spin_round_count += i; mutex_spin_round_count += i;
#ifndef UNIV_HOTBACKUP
mutex->count_spin_rounds += i; mutex->count_spin_rounds += i;
#endif /* !UNIV_HOTBACKUP */
if (mutex_test_and_set(mutex) == 0) if (mutex_test_and_set(mutex) == 0)
{ {
...@@ -504,8 +511,8 @@ Now there is no risk of infinite wait on the event. */ ...@@ -504,8 +511,8 @@ Now there is no risk of infinite wait on the event. */
mutex_system_call_count++; mutex_system_call_count++;
mutex_os_wait_count++; mutex_os_wait_count++;
#ifndef UNIV_HOTBACKUP
mutex->count_os_wait++; mutex->count_os_wait++;
/* /*
!!!!! Sometimes os_wait can be called without os_thread_yield !!!!! Sometimes os_wait can be called without os_thread_yield
*/ */
...@@ -516,12 +523,13 @@ Now there is no risk of infinite wait on the event. */ ...@@ -516,12 +523,13 @@ Now there is no risk of infinite wait on the event. */
lstart_time= (ib_longlong)sec * 1000000 + ms; lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1; timer_started = 1;
} }
#endif /* !UNIV_HOTBACKUP */
sync_array_wait_event(sync_primary_wait_array, index); sync_array_wait_event(sync_primary_wait_array, index);
goto mutex_loop; goto mutex_loop;
finish_timing: finish_timing:
#ifndef UNIV_HOTBACKUP
if (timed_mutexes == 1 && timer_started==1) if (timed_mutexes == 1 && timer_started==1)
{ {
ut_usectime(&sec, &ms); ut_usectime(&sec, &ms);
...@@ -534,6 +542,7 @@ Now there is no risk of infinite wait on the event. */ ...@@ -534,6 +542,7 @@ Now there is no risk of infinite wait on the event. */
mutex->lmax_spent_time= ltime_diff; mutex->lmax_spent_time= ltime_diff;
} }
} }
#endif /* !UNIV_HOTBACKUP */
return; return;
} }
......
...@@ -52,6 +52,7 @@ trx_general_rollback_for_mysql( ...@@ -52,6 +52,7 @@ trx_general_rollback_for_mysql(
trx_savept_t* savept) /* in: pointer to savepoint undo number, if trx_savept_t* savept) /* in: pointer to savepoint undo number, if
partial rollback requested */ partial rollback requested */
{ {
#ifndef UNIV_HOTBACKUP
mem_heap_t* heap; mem_heap_t* heap;
que_thr_t* thr; que_thr_t* thr;
roll_node_t* roll_node; roll_node_t* roll_node;
...@@ -103,6 +104,12 @@ trx_general_rollback_for_mysql( ...@@ -103,6 +104,12 @@ trx_general_rollback_for_mysql(
srv_active_wake_master_thread(); srv_active_wake_master_thread();
return((int) trx->error_state); return((int) trx->error_state);
#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 */
} }
/*********************************************************************** /***********************************************************************
...@@ -322,7 +329,7 @@ were set after this savepoint are deleted. */ ...@@ -322,7 +329,7 @@ were set after this savepoint are deleted. */
ulint ulint
trx_release_savepoint_for_mysql( trx_release_savepoint_for_mysql(
/*================================*/ /*============================*/
/* out: if no savepoint /* out: if no savepoint
of the name found then of the name found then
DB_NO_SAVEPOINT, DB_NO_SAVEPOINT,
......
...@@ -1844,7 +1844,7 @@ trx_recover_for_mysql( ...@@ -1844,7 +1844,7 @@ trx_recover_for_mysql(
/* out: number of prepared transactions /* out: number of prepared transactions
stored in xid_list */ stored in xid_list */
XID* xid_list, /* in/out: prepared transactions */ XID* xid_list, /* in/out: prepared transactions */
uint len) /* in: number of slots in xid_list */ ulint len) /* in: number of slots in xid_list */
{ {
trx_t* trx; trx_t* trx;
int num_of_transactions = 0; int num_of_transactions = 0;
......
...@@ -416,7 +416,11 @@ ut_print_namel( ...@@ -416,7 +416,11 @@ ut_print_namel(
{ {
const char* s = name; const char* s = name;
const char* e = s + namelen; const char* e = s + namelen;
#ifdef UNIV_HOTBACKUP
int q = '"';
#else
int q = mysql_get_identifier_quote_char(trx, name, namelen); int q = mysql_get_identifier_quote_char(trx, name, namelen);
#endif
if (q == EOF) { if (q == EOF) {
fwrite(name, 1, namelen, f); fwrite(name, 1, namelen, f);
return; return;
......
...@@ -3669,18 +3669,23 @@ static void ndb_set_fragmentation(NDBTAB &tab, TABLE *form, uint pk_length) ...@@ -3669,18 +3669,23 @@ static void ndb_set_fragmentation(NDBTAB &tab, TABLE *form, uint pk_length)
uint no_fragments; uint no_fragments;
{ {
#if MYSQL_VERSION_ID >= 50000 #if MYSQL_VERSION_ID >= 50000
uint acc_row_size= 25+2; uint acc_row_size= 25 + /*safety margin*/ 2;
#else #else
uint acc_row_size= pk_length*4; uint acc_row_size= pk_length*4;
/* add acc overhead */ /* add acc overhead */
if (pk_length <= 8) if (pk_length <= 8) /* main page will set the limit */
acc_row_size+= 25+2; /* main page will set the limit */ acc_row_size+= 25 + /*safety margin*/ 2;
else else /* overflow page will set the limit */
acc_row_size+= 4+4; /* overflow page will set the limit */ acc_row_size+= 4 + /*safety margin*/ 4;
#endif #endif
ulonglong acc_fragment_size= 512*1024*1024; ulonglong acc_fragment_size= 512*1024*1024;
ulonglong max_rows= form->s->max_rows; ulonglong max_rows= form->s->max_rows;
#if MYSQL_VERSION_ID >= 50100
no_fragments= (max_rows*acc_row_size)/acc_fragment_size+1; no_fragments= (max_rows*acc_row_size)/acc_fragment_size+1;
#else
no_fragments= ((max_rows*acc_row_size)/acc_fragment_size+1
+1/*correct rounding*/)/2;
#endif
} }
{ {
uint no_nodes= g_ndb_cluster_connection->no_db_nodes(); uint no_nodes= g_ndb_cluster_connection->no_db_nodes();
......
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