Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
diff -Nur mysql-5.0.25-nightly-20060823.orig/client/mysql_priv.h mysql-5.0.25-nightly-20060823.flush_status_time/client/mysql_priv.h
--- mysql-5.0.25-nightly-20060823.orig/client/mysql_priv.h 2006-08-22 23:09:20.000000000 -0700
+++ mysql-5.0.25-nightly-20060823.flush_status_time/client/mysql_priv.h 2006-09-25 19:36:33.000000000 -0700
@@ -1150,7 +1150,7 @@
External variables
*/
-extern time_t start_time;
+extern time_t start_time, flush_status_time;
extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH],
mysql_real_data_home[], *opt_mysql_tmpdir, mysql_charsets_dir[],
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
diff -Nur mysql-5.0.25-nightly-20060823.orig/sql/mysqld.cc mysql-5.0.25-nightly-20060823.flush_status_time/sql/mysqld.cc
--- mysql-5.0.25-nightly-20060823.orig/sql/mysqld.cc 2006-08-22 23:09:17.000000000 -0700
+++ mysql-5.0.25-nightly-20060823.flush_status_time/sql/mysqld.cc 2006-09-25 19:43:42.000000000 -0700
@@ -423,7 +423,7 @@
ulong rpl_recovery_rank=0;
double log_10[32]; /* 10 potences */
-time_t start_time;
+time_t start_time, flush_status_time;
char mysql_home[FN_REFLEN], pidfile_name[FN_REFLEN], system_time_zone[30];
char *default_tz_name;
@@ -2575,7 +2575,7 @@
tzset(); // Set tzname
max_system_variables.pseudo_thread_id= (ulong)~0;
- start_time=time((time_t*) 0);
+ start_time= flush_status_time= time((time_t*) 0);
if (init_thread_environment())
return 1;
mysql_init_variables();
@@ -6214,6 +6214,7 @@
{"Threads_created", (char*) &thread_created, SHOW_LONG_CONST},
{"Threads_running", (char*) &thread_running, SHOW_INT_CONST},
{"Uptime", (char*) 0, SHOW_STARTTIME},
+ {"Uptime_since_flush_status",(char*) 0, SHOW_FLUSHTIME},
{NullS, NullS, SHOW_LONG}
};
@@ -7478,6 +7479,7 @@
}
/* Reset the counters of all key caches (default and named). */
process_key_caches(reset_key_cache_counters);
+ flush_status_time= time((time_t*) 0);
pthread_mutex_unlock(&LOCK_status);
/*
diff -Nur mysql-5.0.25-nightly-20060823.orig/sql/mysql_priv.h mysql-5.0.25-nightly-20060823.flush_status_time/sql/mysql_priv.h
--- mysql-5.0.25-nightly-20060823.orig/sql/mysql_priv.h 2006-08-22 23:09:20.000000000 -0700
+++ mysql-5.0.25-nightly-20060823.flush_status_time/sql/mysql_priv.h 2006-09-25 19:36:33.000000000 -0700
@@ -1150,7 +1150,7 @@
External variables
*/
-extern time_t start_time;
+extern time_t start_time, flush_status_time;
extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH],
mysql_real_data_home[], *opt_mysql_tmpdir, mysql_charsets_dir[],
def_ft_boolean_syntax[sizeof(ft_boolean_syntax)];
diff -Nur mysql-5.0.25-nightly-20060823.orig/sql/sql_show.cc mysql-5.0.25-nightly-20060823.flush_status_time/sql/sql_show.cc
--- mysql-5.0.25-nightly-20060823.orig/sql/sql_show.cc 2006-08-22 23:09:18.000000000 -0700
+++ mysql-5.0.25-nightly-20060823.flush_status_time/sql/sql_show.cc 2006-09-25 19:44:46.000000000 -0700
@@ -1492,6 +1492,10 @@
nr= (long) (thd->query_start() - start_time);
end= int10_to_str(nr, buff, 10);
break;
+ case SHOW_FLUSHTIME:
+ nr= (long) (thd->query_start() - flush_status_time);
+ end= int10_to_str(nr, buff, 10);
+ break;
case SHOW_QUESTION:
end= int10_to_str((long) thd->query_id, buff, 10);
break;
diff -Nur mysql-5.0.25-nightly-20060823.orig/sql/structs.h mysql-5.0.25-nightly-20060823.flush_status_time/sql/structs.h
--- mysql-5.0.25-nightly-20060823.orig/sql/structs.h 2006-08-22 23:09:18.000000000 -0700
+++ mysql-5.0.25-nightly-20060823.flush_status_time/sql/structs.h 2006-09-25 19:40:22.000000000 -0700
@@ -172,9 +172,9 @@
SHOW_UNDEF,
SHOW_LONG, SHOW_LONGLONG, SHOW_INT, SHOW_CHAR, SHOW_CHAR_PTR,
SHOW_DOUBLE_STATUS,
- SHOW_BOOL, SHOW_MY_BOOL, SHOW_OPENTABLES, SHOW_STARTTIME, SHOW_QUESTION,
- SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_SYS, SHOW_HA_ROWS,
- SHOW_VARS,
+ SHOW_BOOL, SHOW_MY_BOOL, SHOW_OPENTABLES, SHOW_STARTTIME, SHOW_FLUSHTIME,
+ SHOW_QUESTION, SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_SYS,
+ SHOW_HA_ROWS, SHOW_VARS,
#ifdef HAVE_OPENSSL
SHOW_SSL_CTX_SESS_ACCEPT, SHOW_SSL_CTX_SESS_ACCEPT_GOOD,
SHOW_SSL_GET_VERSION, SHOW_SSL_CTX_GET_SESSION_CACHE_MODE,