From f1dfafe721441d24f60d8f1092bb35ad6e0f7275 Mon Sep 17 00:00:00 2001 From: "vtkachenko@intelp4d.mysql.com" <> Date: Fri, 24 Dec 2004 13:31:21 +0100 Subject: [PATCH] Many files: tabs replaced ha_innodb.cc: Comments removed --- innobase/include/que0que.h | 8 ++++---- innobase/include/sync0rw.h | 6 +++--- innobase/include/sync0sync.h | 12 ++++++------ innobase/include/sync0sync.ic | 4 ++-- innobase/row/row0sel.c | 2 +- innobase/srv/srv0srv.c | 2 +- innobase/sync/sync0rw.c | 4 ++-- innobase/sync/sync0sync.c | 12 ++++++------ sql/ha_innodb.cc | 14 +++++++++----- sql/lex.h | 2 +- sql/set_var.cc | 6 +++--- sql/sql_parse.cc | 2 +- sql/sql_yacc.yy | 4 ++-- 13 files changed, 41 insertions(+), 37 deletions(-) diff --git a/innobase/include/que0que.h b/innobase/include/que0que.h index d45ae032ddb..298ec494750 100644 --- a/innobase/include/que0que.h +++ b/innobase/include/que0que.h @@ -359,7 +359,7 @@ struct que_thr_struct{ the control came */ ulint resource; /* resource usage of the query thread 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 @@ -484,9 +484,9 @@ struct que_fork_struct{ #define QUE_THR_ERROR 8 /* Query thread lock states */ -#define QUE_THR_LOCK_NOLOCK 0 -#define QUE_THR_LOCK_ROW 1 -#define QUE_THR_LOCK_TABLE 2 +#define QUE_THR_LOCK_NOLOCK 0 +#define QUE_THR_LOCK_ROW 1 +#define QUE_THR_LOCK_TABLE 2 /* From where the cursor position is counted */ #define QUE_CUR_NOT_DEFINED 1 diff --git a/innobase/include/sync0rw.h b/innobase/include/sync0rw.h index 6e3a4cf4dc7..bcf0749e05d 100644 --- a/innobase/include/sync0rw.h +++ b/innobase/include/sync0rw.h @@ -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 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. */ -#define rw_lock_create(L) rw_lock_create_func(\ +#define rw_lock_create(L) rw_lock_create_func(\ (L), __FILE__, __LINE__, __STRING(L)) /*=====================*/ @@ -76,8 +76,8 @@ rw_lock_create_func( /*================*/ rw_lock_t* lock, /* in: pointer to memory */ const char* cfile_name, /* in: file name where created */ - ulint cline, /* in: file line where created */ - const char* cmutex_name); /* in: mutex name */ + ulint cline, /* in: file line where created */ + const char* cmutex_name); /* in: mutex name */ /********************************************************************** 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 diff --git a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h index 98d61c129b1..600b12a5385 100644 --- a/innobase/include/sync0sync.h +++ b/innobase/include/sync0sync.h @@ -17,7 +17,7 @@ Created 9/5/1995 Heikki Tuuri #include "os0sync.h" #include "sync0arr.h" -extern my_bool timed_mutexes; +extern my_bool timed_mutexes; /********************************************************************** Initializes the synchronization data structures. */ @@ -50,8 +50,8 @@ mutex_create_func( /*==============*/ mutex_t* mutex, /* in: pointer to memory */ const char* cfile_name, /* in: file name where created */ - ulint cline, /* in: file line where created */ - const char* cmutex_name); /* in: mutex name */ + ulint cline, /* in: file line where created */ + const char* cmutex_name); /* in: mutex name */ /********************************************************************** 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 @@ -480,7 +480,7 @@ struct mutex_struct { ulong count_os_yield; /* count of os_wait */ ulonglong lspent_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 */ }; @@ -516,10 +516,10 @@ extern ibool sync_order_checks_on; extern ibool sync_initialized; /* 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_t mutex_list_mutex; +mutex_t mutex_list_mutex; #ifndef UNIV_NONINL diff --git a/innobase/include/sync0sync.ic b/innobase/include/sync0sync.ic index 1731b47db58..f26f3788dc3 100644 --- a/innobase/include/sync0sync.ic +++ b/innobase/include/sync0sync.ic @@ -252,8 +252,8 @@ mutex_enter_func( mutex->count_using++; - if (!mutex_test_and_set(mutex)) - { + if (!mutex_test_and_set(mutex)) + { #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index c079557ca8b..9104d6e1f4f 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -3793,7 +3793,7 @@ lock_wait_or_error: thr->lock_state= QUE_THR_LOCK_ROW; 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) { mtr_start(&mtr); diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index aa2a7fa9169..49d4d346a0e 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -1384,7 +1384,7 @@ srv_suspend_mysql_thread( trx_t* trx; ibool had_dict_lock = FALSE; ibool was_declared_inside_innodb = FALSE; - ib_longlong start_time, finish_time; + ib_longlong start_time, finish_time; ulint diff_time; ulint sec; ulint ms; diff --git a/innobase/sync/sync0rw.c b/innobase/sync/sync0rw.c index e57974a375b..359945594be 100644 --- a/innobase/sync/sync0rw.c +++ b/innobase/sync/sync0rw.c @@ -90,8 +90,8 @@ rw_lock_create_func( /*================*/ rw_lock_t* lock, /* in: pointer to memory */ const char* cfile_name, /* in: file name where created */ - ulint cline, /* in: file line where created */ - const char* cmutex_name) /* in: mutex name */ + ulint cline, /* in: file line where created */ + const char* cmutex_name) /* in: mutex name */ { /* If this is the very first time a synchronization object is created, then the following call initializes diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c index fb46c692830..317455f57a3 100644 --- a/innobase/sync/sync0sync.c +++ b/innobase/sync/sync0sync.c @@ -197,8 +197,8 @@ mutex_create_func( /*==============*/ mutex_t* mutex, /* in: pointer to memory */ const char* cfile_name, /* in: file name where created */ - ulint cline, /* in: file line where created */ - const char* cmutex_name) /* in: mutex name */ + ulint cline, /* in: file line where created */ + const char* cmutex_name) /* in: mutex name */ { #if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER) mutex_reset_lock_word(mutex); @@ -361,10 +361,10 @@ for the mutex before suspending the thread. */ void mutex_spin_wait( /*============*/ - mutex_t* mutex, /* in: pointer to mutex */ - const char* file_name, /* in: file name where - mutex requested */ - ulint line) /* in: line where requested */ + mutex_t* mutex, /* in: pointer to mutex */ + const char* file_name, /* in: file name where + mutex requested */ + ulint line) /* in: line where requested */ { ulint index; /* index of the reserved wait cell */ ulint i; /* spin round count */ diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 2ae1ff5672d..6577590f14a 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -5550,7 +5550,9 @@ innodb_mutex_show_status( Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) 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); @@ -5572,7 +5574,9 @@ innodb_mutex_show_status( if (protocol->write()) { -// mutex_exit(&mutex_list_mutex); +#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER + mutex_exit(&mutex_list_mutex); +#endif DBUG_RETURN(1); } } @@ -5602,12 +5606,12 @@ innodb_mutex_show_status( if (protocol->write()) { -// mutex_exit(&mutex_list_mutex); DBUG_RETURN(1); } - -// mutex_exit(&mutex_list_mutex); +#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER + mutex_exit(&mutex_list_mutex); +#endif send_eof(thd); DBUG_RETURN(FALSE); } diff --git a/sql/lex.h b/sql/lex.h index b052479d413..fe1cf582b5b 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -323,7 +323,7 @@ static SYMBOL symbols[] = { { "MULTILINESTRING", SYM(MULTILINESTRING)}, { "MULTIPOINT", SYM(MULTIPOINT)}, { "MULTIPOLYGON", SYM(MULTIPOLYGON)}, - { "MUTEX", SYM(MUTEX_SYM)}, + { "MUTEX", SYM(MUTEX_SYM)}, { "NAME", SYM(NAME_SYM)}, { "NAMES", SYM(NAMES_SYM)}, { "NATIONAL", SYM(NATIONAL_SYM)}, diff --git a/sql/set_var.cc b/sql/set_var.cc index 4e74ad02ea5..33dd195cbce 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -361,8 +361,8 @@ sys_var_thd_enum sys_tx_isolation("tx_isolation", fix_tx_isolation); sys_var_thd_ulong sys_tmp_table_size("tmp_table_size", &SV::tmp_table_size); -sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", - &timed_mutexes); +sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", + &timed_mutexes); sys_var_thd_ulong sys_net_wait_timeout("wait_timeout", &SV::net_wait_timeout); @@ -904,7 +904,7 @@ struct show_var_st init_vars[]= { {"thread_stack", (char*) &thread_stack, SHOW_LONG}, {sys_time_format.name, (char*) &sys_time_format, 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}, {"tmpdir", (char*) &opt_mysql_tmpdir, SHOW_CHAR_PTR}, {sys_trans_alloc_block_size.name, (char*) &sys_trans_alloc_block_size, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a622568d9dc..0965e055c41 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2491,7 +2491,7 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_MUTEX_STATUS: { if (check_global_access(thd, SUPER_ACL)) - goto error; + goto error; res = innodb_mutex_show_status(thd); break; } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index eba3b5298af..c2692261521 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -337,7 +337,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token MAX_UPDATES_PER_HOUR %token MEDIUM_SYM %token MIN_ROWS -%token MUTEX_SYM +%token MUTEX_SYM %token NAMES_SYM %token NAME_SYM %token NATIONAL_SYM @@ -6990,7 +6990,7 @@ keyword: | MULTILINESTRING {} | MULTIPOINT {} | MULTIPOLYGON {} - | MUTEX_SYM {} + | MUTEX_SYM {} | NAME_SYM {} | NAMES_SYM {} | NATIONAL_SYM {}