Commit af22d870 authored by unknown's avatar unknown

Many files:

  tabs replaced
ha_innodb.cc:
  Comments removed


innobase/include/que0que.h:
  tabs replaced
innobase/include/sync0rw.h:
  tabs replaced
innobase/include/sync0sync.h:
  tabs replaced
innobase/include/sync0sync.ic:
  tabs replaced
innobase/row/row0sel.c:
  tabs replaced
innobase/srv/srv0srv.c:
  tabs replaced
innobase/sync/sync0rw.c:
  tabs replaced
innobase/sync/sync0sync.c:
  tabs replaced
sql/ha_innodb.cc:
  Comments removed
sql/lex.h:
  tabs replaced
sql/set_var.cc:
  tabs replaced
sql/sql_parse.cc:
  tabs replaced
sql/sql_yacc.yy:
  tabs replaced
parent 40d7e74e
...@@ -359,7 +359,7 @@ struct que_thr_struct{ ...@@ -359,7 +359,7 @@ struct que_thr_struct{
the control came */ the control came */
ulint resource; /* resource usage of the query thread ulint resource; /* resource usage of the query thread
thus far */ thus far */
ulint lock_state; /* lock state of thread (table or row) */ ulint lock_state; /* lock state of thread (table or row) */
}; };
#define QUE_THR_MAGIC_N 8476583 #define QUE_THR_MAGIC_N 8476583
...@@ -484,9 +484,9 @@ struct que_fork_struct{ ...@@ -484,9 +484,9 @@ struct que_fork_struct{
#define QUE_THR_ERROR 8 #define QUE_THR_ERROR 8
/* Query thread lock states */ /* Query thread lock states */
#define QUE_THR_LOCK_NOLOCK 0 #define QUE_THR_LOCK_NOLOCK 0
#define QUE_THR_LOCK_ROW 1 #define QUE_THR_LOCK_ROW 1
#define QUE_THR_LOCK_TABLE 2 #define QUE_THR_LOCK_TABLE 2
/* From where the cursor position is counted */ /* From where the cursor position is counted */
#define QUE_CUR_NOT_DEFINED 1 #define QUE_CUR_NOT_DEFINED 1
......
...@@ -61,7 +61,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory ...@@ -61,7 +61,7 @@ Creates, or rather, initializes an rw-lock object in a specified memory
location (which must be appropriately aligned). The rw-lock is initialized location (which must be appropriately aligned). The rw-lock is initialized
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
is necessary only if the memory block containing it is freed. */ is necessary only if the memory block containing it is freed. */
#define rw_lock_create(L) rw_lock_create_func(\ #define rw_lock_create(L) rw_lock_create_func(\
(L), __FILE__, __LINE__, __STRING(L)) (L), __FILE__, __LINE__, __STRING(L))
/*=====================*/ /*=====================*/
...@@ -76,8 +76,8 @@ rw_lock_create_func( ...@@ -76,8 +76,8 @@ rw_lock_create_func(
/*================*/ /*================*/
rw_lock_t* lock, /* in: pointer to memory */ rw_lock_t* lock, /* in: pointer to memory */
const char* cfile_name, /* in: file name where created */ const char* cfile_name, /* in: file name where created */
ulint cline, /* in: file line where created */ ulint cline, /* in: file line where created */
const char* cmutex_name); /* in: mutex name */ const char* cmutex_name); /* in: mutex name */
/********************************************************************** /**********************************************************************
Calling this function is obligatory only if the memory buffer containing Calling this function is obligatory only if the memory buffer containing
the rw-lock is freed. Removes an rw-lock object from the global list. The the rw-lock is freed. Removes an rw-lock object from the global list. The
......
...@@ -17,7 +17,7 @@ Created 9/5/1995 Heikki Tuuri ...@@ -17,7 +17,7 @@ Created 9/5/1995 Heikki Tuuri
#include "os0sync.h" #include "os0sync.h"
#include "sync0arr.h" #include "sync0arr.h"
extern my_bool timed_mutexes; extern my_bool timed_mutexes;
/********************************************************************** /**********************************************************************
Initializes the synchronization data structures. */ Initializes the synchronization data structures. */
...@@ -50,8 +50,8 @@ mutex_create_func( ...@@ -50,8 +50,8 @@ mutex_create_func(
/*==============*/ /*==============*/
mutex_t* mutex, /* in: pointer to memory */ mutex_t* mutex, /* in: pointer to memory */
const char* cfile_name, /* in: file name where created */ const char* cfile_name, /* in: file name where created */
ulint cline, /* in: file line where created */ ulint cline, /* in: file line where created */
const char* cmutex_name); /* in: mutex name */ const char* cmutex_name); /* in: mutex name */
/********************************************************************** /**********************************************************************
Calling this function is obligatory only if the memory buffer containing Calling this function is obligatory only if the memory buffer containing
the mutex is freed. Removes a mutex object from the mutex list. The mutex the mutex is freed. Removes a mutex object from the mutex list. The mutex
...@@ -480,7 +480,7 @@ struct mutex_struct { ...@@ -480,7 +480,7 @@ struct mutex_struct {
ulong count_os_yield; /* count of os_wait */ ulong count_os_yield; /* count of os_wait */
ulonglong lspent_time; /* mutex os_wait timer msec */ ulonglong lspent_time; /* mutex os_wait timer msec */
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 */
}; };
...@@ -516,10 +516,10 @@ extern ibool sync_order_checks_on; ...@@ -516,10 +516,10 @@ extern ibool sync_order_checks_on;
extern ibool sync_initialized; extern ibool sync_initialized;
/* Global list of database mutexes (not OS mutexes) created. */ /* Global list of database mutexes (not OS mutexes) created. */
UT_LIST_BASE_NODE_T(mutex_t) mutex_list; UT_LIST_BASE_NODE_T(mutex_t) mutex_list;
/* Mutex protecting the mutex_list variable */ /* Mutex protecting the mutex_list variable */
mutex_t mutex_list_mutex; mutex_t mutex_list_mutex;
#ifndef UNIV_NONINL #ifndef UNIV_NONINL
......
...@@ -252,8 +252,8 @@ mutex_enter_func( ...@@ -252,8 +252,8 @@ mutex_enter_func(
mutex->count_using++; mutex->count_using++;
if (!mutex_test_and_set(mutex)) if (!mutex_test_and_set(mutex))
{ {
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
mutex_set_debug_info(mutex, file_name, line); mutex_set_debug_info(mutex, file_name, line);
#endif #endif
......
...@@ -3793,7 +3793,7 @@ row_search_for_mysql( ...@@ -3793,7 +3793,7 @@ row_search_for_mysql(
thr->lock_state= QUE_THR_LOCK_ROW; thr->lock_state= QUE_THR_LOCK_ROW;
was_lock_wait = row_mysql_handle_errors(&err, trx, thr, NULL); was_lock_wait = row_mysql_handle_errors(&err, trx, thr, NULL);
thr->lock_state= QUE_THR_LOCK_NOLOCK; thr->lock_state= QUE_THR_LOCK_NOLOCK;
if (was_lock_wait) { if (was_lock_wait) {
mtr_start(&mtr); mtr_start(&mtr);
......
...@@ -1384,7 +1384,7 @@ srv_suspend_mysql_thread( ...@@ -1384,7 +1384,7 @@ srv_suspend_mysql_thread(
trx_t* trx; trx_t* trx;
ibool had_dict_lock = FALSE; ibool had_dict_lock = FALSE;
ibool was_declared_inside_innodb = FALSE; ibool was_declared_inside_innodb = FALSE;
ib_longlong start_time, finish_time; ib_longlong start_time, finish_time;
ulint diff_time; ulint diff_time;
ulint sec; ulint sec;
ulint ms; ulint ms;
......
...@@ -90,8 +90,8 @@ rw_lock_create_func( ...@@ -90,8 +90,8 @@ rw_lock_create_func(
/*================*/ /*================*/
rw_lock_t* lock, /* in: pointer to memory */ rw_lock_t* lock, /* in: pointer to memory */
const char* cfile_name, /* in: file name where created */ const char* cfile_name, /* in: file name where created */
ulint cline, /* in: file line where created */ ulint cline, /* in: file line where created */
const char* cmutex_name) /* in: mutex name */ const char* cmutex_name) /* in: mutex name */
{ {
/* If this is the very first time a synchronization /* If this is the very first time a synchronization
object is created, then the following call initializes object is created, then the following call initializes
......
...@@ -197,8 +197,8 @@ mutex_create_func( ...@@ -197,8 +197,8 @@ mutex_create_func(
/*==============*/ /*==============*/
mutex_t* mutex, /* in: pointer to memory */ mutex_t* mutex, /* in: pointer to memory */
const char* cfile_name, /* in: file name where created */ const char* cfile_name, /* in: file name where created */
ulint cline, /* in: file line where created */ ulint cline, /* in: file line where created */
const char* cmutex_name) /* in: mutex name */ const char* cmutex_name) /* in: mutex name */
{ {
#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) #if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER)
mutex_reset_lock_word(mutex); mutex_reset_lock_word(mutex);
...@@ -361,10 +361,10 @@ for the mutex before suspending the thread. */ ...@@ -361,10 +361,10 @@ for the mutex before suspending the thread. */
void void
mutex_spin_wait( mutex_spin_wait(
/*============*/ /*============*/
mutex_t* mutex, /* in: pointer to mutex */ mutex_t* mutex, /* in: pointer to mutex */
const char* file_name, /* in: file name where const char* file_name, /* in: file name where
mutex requested */ mutex requested */
ulint line) /* in: line where requested */ ulint line) /* in: line where requested */
{ {
ulint index; /* index of the reserved wait cell */ ulint index; /* index of the reserved wait cell */
ulint i; /* spin round count */ ulint i; /* spin round count */
......
...@@ -5550,7 +5550,9 @@ innodb_mutex_show_status( ...@@ -5550,7 +5550,9 @@ innodb_mutex_show_status(
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
// mutex_enter(&mutex_list_mutex); #ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
mutex_enter(&mutex_list_mutex);
#endif
mutex = UT_LIST_GET_FIRST(mutex_list); mutex = UT_LIST_GET_FIRST(mutex_list);
...@@ -5572,7 +5574,9 @@ innodb_mutex_show_status( ...@@ -5572,7 +5574,9 @@ innodb_mutex_show_status(
if (protocol->write()) if (protocol->write())
{ {
// mutex_exit(&mutex_list_mutex); #ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
mutex_exit(&mutex_list_mutex);
#endif
DBUG_RETURN(1); DBUG_RETURN(1);
} }
} }
...@@ -5602,12 +5606,12 @@ innodb_mutex_show_status( ...@@ -5602,12 +5606,12 @@ innodb_mutex_show_status(
if (protocol->write()) if (protocol->write())
{ {
// mutex_exit(&mutex_list_mutex);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
// mutex_exit(&mutex_list_mutex); mutex_exit(&mutex_list_mutex);
#endif
send_eof(thd); send_eof(thd);
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }
......
...@@ -323,7 +323,7 @@ static SYMBOL symbols[] = { ...@@ -323,7 +323,7 @@ static SYMBOL symbols[] = {
{ "MULTILINESTRING", SYM(MULTILINESTRING)}, { "MULTILINESTRING", SYM(MULTILINESTRING)},
{ "MULTIPOINT", SYM(MULTIPOINT)}, { "MULTIPOINT", SYM(MULTIPOINT)},
{ "MULTIPOLYGON", SYM(MULTIPOLYGON)}, { "MULTIPOLYGON", SYM(MULTIPOLYGON)},
{ "MUTEX", SYM(MUTEX_SYM)}, { "MUTEX", SYM(MUTEX_SYM)},
{ "NAME", SYM(NAME_SYM)}, { "NAME", SYM(NAME_SYM)},
{ "NAMES", SYM(NAMES_SYM)}, { "NAMES", SYM(NAMES_SYM)},
{ "NATIONAL", SYM(NATIONAL_SYM)}, { "NATIONAL", SYM(NATIONAL_SYM)},
......
...@@ -361,8 +361,8 @@ sys_var_thd_enum sys_tx_isolation("tx_isolation", ...@@ -361,8 +361,8 @@ sys_var_thd_enum sys_tx_isolation("tx_isolation",
fix_tx_isolation); fix_tx_isolation);
sys_var_thd_ulong sys_tmp_table_size("tmp_table_size", sys_var_thd_ulong sys_tmp_table_size("tmp_table_size",
&SV::tmp_table_size); &SV::tmp_table_size);
sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", sys_var_bool_ptr sys_timed_mutexes("timed_mutexes",
&timed_mutexes); &timed_mutexes);
sys_var_thd_ulong sys_net_wait_timeout("wait_timeout", sys_var_thd_ulong sys_net_wait_timeout("wait_timeout",
&SV::net_wait_timeout); &SV::net_wait_timeout);
...@@ -904,7 +904,7 @@ struct show_var_st init_vars[]= { ...@@ -904,7 +904,7 @@ struct show_var_st init_vars[]= {
{"thread_stack", (char*) &thread_stack, SHOW_LONG}, {"thread_stack", (char*) &thread_stack, SHOW_LONG},
{sys_time_format.name, (char*) &sys_time_format, SHOW_SYS}, {sys_time_format.name, (char*) &sys_time_format, SHOW_SYS},
{"time_zone", (char*) &sys_time_zone, SHOW_SYS}, {"time_zone", (char*) &sys_time_zone, SHOW_SYS},
{sys_timed_mutexes.name, (char*) &sys_timed_mutexes, SHOW_SYS}, {sys_timed_mutexes.name, (char*) &sys_timed_mutexes, SHOW_SYS},
{sys_tmp_table_size.name, (char*) &sys_tmp_table_size, SHOW_SYS}, {sys_tmp_table_size.name, (char*) &sys_tmp_table_size, SHOW_SYS},
{"tmpdir", (char*) &opt_mysql_tmpdir, SHOW_CHAR_PTR}, {"tmpdir", (char*) &opt_mysql_tmpdir, SHOW_CHAR_PTR},
{sys_trans_alloc_block_size.name, (char*) &sys_trans_alloc_block_size, {sys_trans_alloc_block_size.name, (char*) &sys_trans_alloc_block_size,
......
...@@ -2491,7 +2491,7 @@ mysql_execute_command(THD *thd) ...@@ -2491,7 +2491,7 @@ mysql_execute_command(THD *thd)
case SQLCOM_SHOW_MUTEX_STATUS: case SQLCOM_SHOW_MUTEX_STATUS:
{ {
if (check_global_access(thd, SUPER_ACL)) if (check_global_access(thd, SUPER_ACL))
goto error; goto error;
res = innodb_mutex_show_status(thd); res = innodb_mutex_show_status(thd);
break; break;
} }
......
...@@ -337,7 +337,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); ...@@ -337,7 +337,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token MAX_UPDATES_PER_HOUR %token MAX_UPDATES_PER_HOUR
%token MEDIUM_SYM %token MEDIUM_SYM
%token MIN_ROWS %token MIN_ROWS
%token MUTEX_SYM %token MUTEX_SYM
%token NAMES_SYM %token NAMES_SYM
%token NAME_SYM %token NAME_SYM
%token NATIONAL_SYM %token NATIONAL_SYM
...@@ -6990,7 +6990,7 @@ keyword: ...@@ -6990,7 +6990,7 @@ keyword:
| MULTILINESTRING {} | MULTILINESTRING {}
| MULTIPOINT {} | MULTIPOINT {}
| MULTIPOLYGON {} | MULTIPOLYGON {}
| MUTEX_SYM {} | MUTEX_SYM {}
| NAME_SYM {} | NAME_SYM {}
| NAMES_SYM {} | NAMES_SYM {}
| NATIONAL_SYM {} | NATIONAL_SYM {}
......
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