Below is the list of changes that have just been committed into a local
5.0-hp repository of vtkachenko. When vtkachenko does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1945 05/06/14 21:13:08 vtkachenko@stripped +7 -0
Many files:
Added SHOW MUTEX FLUSH command
sql/sql_yacc.yy
1.393 05/06/14 21:12:40 vtkachenko@stripped +2 -0
Added SHOW MUTEX FLUSH command
sql/sql_show.cc
1.248 05/06/14 21:12:40 vtkachenko@stripped +9 -1
Added SHOW MUTEX FLUSH command
sql/sql_parse.cc
1.435 05/06/14 21:12:40 vtkachenko@stripped +19 -2
Added SHOW MUTEX FLUSH command
sql/sql_lex.h
1.182 05/06/14 21:12:40 vtkachenko@stripped +2 -2
Added SHOW MUTEX FLUSH command
sql/mysql_priv.h
1.304 05/06/14 21:12:40 vtkachenko@stripped +1 -1
Added SHOW MUTEX FLUSH command
sql/ha_innodb.h
1.96 05/06/14 21:12:40 vtkachenko@stripped +1 -1
Added SHOW MUTEX FLUSH command
sql/ha_innodb.cc
1.212 05/06/14 21:12:39 vtkachenko@stripped +39 -1
Added SHOW MUTEX FLUSH command
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: vtkachenko
# Host: quadxeon.mysql.com
# Root: /users/vtkachenko/bk/HP/mysql-5.0-hp-build
--- 1.303/sql/mysql_priv.h 2005-06-10 07:18:42 +02:00
+++ 1.304/sql/mysql_priv.h 2005-06-14 21:12:40 +02:00
@@ -802,7 +802,7 @@
bool mysqld_help (THD *thd, const char *text);
void calc_sum_of_all_status(STATUS_VAR *to);
#ifdef TIMED_MUTEX
-bool timed_mutex_show_status(THD *thd);
+bool timed_mutex_show_status(THD *thd, bool flush);
#endif
--- 1.181/sql/sql_lex.h 2005-06-07 12:11:28 +02:00
+++ 1.182/sql/sql_lex.h 2005-06-14 21:12:40 +02:00
@@ -53,7 +53,7 @@
SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_LOGS, SQLCOM_SHOW_STATUS,
- SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_MUTEX_STATUS,
+ SQLCOM_SHOW_INNODB_STATUS, SQLCOM_SHOW_MUTEX_STATUS, SQLCOM_SHOW_MUTEX_FLUSH,
SQLCOM_SHOW_PROCESSLIST, SQLCOM_SHOW_MASTER_STAT, SQLCOM_SHOW_SLAVE_STAT,
SQLCOM_SHOW_GRANTS, SQLCOM_SHOW_CREATE, SQLCOM_SHOW_CHARSETS,
SQLCOM_SHOW_COLLATIONS, SQLCOM_SHOW_CREATE_DB, SQLCOM_SHOW_TABLE_STATUS,
@@ -756,7 +756,7 @@
uint8 create_view_algorithm;
uint8 create_view_check;
bool drop_if_exists, drop_temporary, local_file, one_shot_set;
- bool in_comment, ignore_space, verbose, no_write_to_binlog;
+ bool in_comment, ignore_space, verbose, flush, no_write_to_binlog;
bool tx_chain, tx_release;
/*
Special JOIN::prepare mode: changing of query is prohibited.
--- 1.434/sql/sql_parse.cc 2005-06-10 07:18:44 +02:00
+++ 1.435/sql/sql_parse.cc 2005-06-14 21:12:40 +02:00
@@ -2725,10 +2725,27 @@
#ifdef TIMED_MUTEX
if (check_global_access(thd, SUPER_ACL))
goto error;
- res= timed_mutex_show_status(thd);
+ res= timed_mutex_show_status(thd, 0);
#ifdef HAVE_INNOBASE_DB
if (!res)
- res= innodb_mutex_show_status(thd);
+ res= innodb_mutex_show_status(thd, 0);
+#endif /* HAVE_INNOBASE_DB */
+ send_eof(thd);
+#else /* TIMED_MUTEX */
+ my_message(ER_NOT_ALLOWED_COMMAND, ER(ER_NOT_ALLOWED_COMMAND), MYF(0));
+ goto error;
+#endif /* TIMED_MUTEX */
+ break;
+ }
+ case SQLCOM_SHOW_MUTEX_FLUSH:
+ {
+#ifdef TIMED_MUTEX
+ if (check_global_access(thd, SUPER_ACL))
+ goto error;
+ res= timed_mutex_show_status(thd, 1);
+#ifdef HAVE_INNOBASE_DB
+ if (!res)
+ res= innodb_mutex_show_status(thd, 1);
#endif /* HAVE_INNOBASE_DB */
send_eof(thd);
#else /* TIMED_MUTEX */
--- 1.247/sql/sql_show.cc 2005-06-10 07:18:46 +02:00
+++ 1.248/sql/sql_show.cc 2005-06-14 21:12:40 +02:00
@@ -1624,7 +1624,7 @@
extern uint count_timed_mutexes;
-bool timed_mutex_show_status(THD* thd)
+bool timed_mutex_show_status(THD* thd, bool flush)
{
Protocol *protocol= thd->protocol;
List<Item> field_list;
@@ -1674,6 +1674,14 @@
protocol->store((ulonglong)timed_mutex_root[i].os_lock_count);
protocol->store((ulonglong)0);
protocol->store((ulonglong)timed_mutex_root[i].time_wait/1000);
+ if (flush)
+ {
+ timed_mutex_root[i].lock_count= 0;
+ timed_mutex_root[i].spin_loops_count= 0;
+ timed_mutex_root[i].os_lock_count= 0;
+ timed_mutex_root[i].time_wait= 0;
+ }
+
if ( protocol->write() )
{
DBUG_RETURN(1);
--- 1.392/sql/sql_yacc.yy 2005-06-07 16:47:07 +02:00
+++ 1.393/sql/sql_yacc.yy 2005-06-14 21:12:40 +02:00
@@ -6326,6 +6326,8 @@
{ Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; WARN_DEPRECATED("SHOW INNODB STATUS", "SHOW ENGINE INNODB STATUS"); }
| MUTEX_SYM STATUS_SYM
{ Lex->sql_command = SQLCOM_SHOW_MUTEX_STATUS; }
+ | MUTEX_SYM FLUSH_SYM
+ { Lex->sql_command = SQLCOM_SHOW_MUTEX_FLUSH; }
| opt_full PROCESSLIST_SYM
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
| opt_var_type VARIABLES wild_and_where
--- 1.211/sql/ha_innodb.cc 2005-06-10 15:40:49 +02:00
+++ 1.212/sql/ha_innodb.cc 2005-06-14 21:12:39 +02:00
@@ -6264,7 +6264,7 @@
bool
innodb_mutex_show_status(
/*===============*/
- THD* thd) /* in: the MySQL query thread of the caller */
+ THD* thd, bool flush) /* in: the MySQL query thread of the caller */
{
Protocol *protocol= thd->protocol;
List<Item> field_list;
@@ -6327,6 +6327,9 @@
protocol->store((ulonglong)mutex->count_os_yield);
protocol->store((ulonglong)mutex->lspent_time/1000);
+
+
+
if (protocol->write())
{
#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
@@ -6346,9 +6349,33 @@
rw_lock_wait_time += mutex->lspent_time;
}
+ if (flush)
+ {
+ mutex->count_using= (ulonglong)0;
+ mutex->count_spin_loop= (ulonglong)0;
+ mutex->count_spin_rounds= (ulonglong)0;
+ mutex->count_os_wait= (ulonglong)0;
+ mutex->count_os_yield= (ulonglong)0;
+ mutex->lspent_time= (ulonglong)0;
+ }
+
mutex = UT_LIST_GET_NEXT(list, mutex);
}
+ protocol->prepare_for_resend();
+ protocol->store(" === InnoDB rw_locks ===", system_charset_info);
+ protocol->store("", system_charset_info);
+ protocol->store((ulonglong)0);
+ protocol->store((ulonglong)0);
+ protocol->store((ulonglong)0);
+ protocol->store((ulonglong)0);
+ protocol->store((ulonglong)0);
+ protocol->store((ulonglong)0);
+ if (protocol->write())
+ {
+ DBUG_RETURN(1);
+ }
+
lock = UT_LIST_GET_FIRST(rw_lock_list);
current_name= "";
first_row= 1;
@@ -6403,6 +6430,17 @@
s_count += lock->ls_count;
}
+
+ if (flush)
+ {
+ lock->lswork_time= (ulonglong)0;
+ lock->lswait_time= (ulonglong)0;
+ lock->lxwork_time= (ulonglong)0;
+ lock->lxwait_time= (ulonglong)0;
+ lock->lx_count= (ulonglong)0;
+ lock->ls_count= (ulonglong)0;
+ }
+
lock = UT_LIST_GET_NEXT(list, lock);
}
--- 1.95/sql/ha_innodb.h 2005-05-17 20:41:13 +02:00
+++ 1.96/sql/ha_innodb.h 2005-06-14 21:12:40 +02:00
@@ -269,7 +269,7 @@
int innobase_drop_database(char *path);
bool innodb_show_status(THD* thd);
-bool innodb_mutex_show_status(THD* thd);
+bool innodb_mutex_show_status(THD* thd, bool flush);
void innodb_export_status(void);
void innobase_release_temporary_latches(THD *thd);
| Thread |
|---|
| • bk commit into 5.0-hp tree (vtkachenko:1.1945) | Vadim Tkachenko | 14 Jun |