List:Commits« Previous MessageNext Message »
From:Inaam Rana Date:September 23 2011 1:51pm
Subject:bzr push into mysql-trunk branch (inaam.rana:3430 to 3431)
View as plain text  
 3431 Inaam Rana	2011-09-23
      Report accurate log i/o's/second.
      
      Approved by: Sunny

    modified:
      storage/innobase/log/log0log.c
 3430 Daniel Fischer	2011-09-23
      more 5.5.16 fixes

    modified:
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/plugin_auth.result
      mysql-test/suite/sys_vars/r/all_vars.result
      sql/binlog.cc
=== modified file 'storage/innobase/log/log0log.c'
--- a/storage/innobase/log/log0log.c	revid:daniel.fischer@stripped
+++ b/storage/innobase/log/log0log.c	revid:inaam.rana@stripped
@@ -3487,15 +3487,20 @@ log_print(
 
 	current_time = time(NULL);
 
-	time_elapsed = 0.001 + difftime(current_time,
-					log_sys->last_printout_time);
+	time_elapsed = difftime(current_time,
+				log_sys->last_printout_time);
+
+	if (time_elapsed <= 0) {
+		time_elapsed = 1;
+	}
+
 	fprintf(file,
 		"%lu pending log writes, %lu pending chkp writes\n"
 		"%lu log i/o's done, %.2f log i/o's/second\n",
 		(ulong) log_sys->n_pending_writes,
 		(ulong) log_sys->n_pending_checkpoint_writes,
 		(ulong) log_sys->n_log_ios,
-		((log_sys->n_log_ios - log_sys->n_log_ios_old)
+		((double)(log_sys->n_log_ios - log_sys->n_log_ios_old)
 		 / time_elapsed));
 
 	log_sys->n_log_ios_old = log_sys->n_log_ios;


Attachment: [text/bzr-bundle] bzr/inaam.rana@oracle.com-20110923134913-msrvk1v9sp78efju.bundle
Thread
bzr push into mysql-trunk branch (inaam.rana:3430 to 3431) Inaam Rana24 Sep