List:Commits« Previous MessageNext Message »
From:Tatjana Azundris Nuernberg Date:October 15 2012 7:58am
Subject:bzr push into mysql-trunk branch (tatjana.nuernberg:4723 to 4724)
Bug#11763523
View as plain text  
 4724 Tatjana Azundris Nuernberg	2012-10-15 [merge]
      Bug#11763523: PLEASE WRITE PROPER DATES TO THE ERROR LOG
      
      Adds PID/TID to some logging functions;
      changes date-stamp from YYMMDD to ISO date (YYYY-MM-DD).
      
      Based on a patch by Davi.

    modified:
      sql/log.cc
      storage/innobase/ut/ut0ut.cc
 4723 Marko Mäkelä	2012-10-15 [merge]
      Merge mysql-5.6 to mysql-trunk.

    modified:
      storage/innobase/include/dict0load.h
      storage/innobase/row/row0log.cc
=== modified file 'sql/log.cc'
--- a/sql/log.cc	2012-09-22 17:12:32 +0000
+++ b/sql/log.cc	2012-10-15 07:57:33 +0000
@@ -2280,13 +2280,14 @@ static void print_buffer_to_file(enum lo
   localtime_r(&skr, &tm_tmp);
   start=&tm_tmp;
 
-  fprintf(stderr, "%02d%02d%02d %2d:%02d:%02d [%s] %.*s\n",
-          start->tm_year % 100,
-          start->tm_mon+1,
+  fprintf(stderr, "%d-%02d-%02d %02d:%02d:%02d %lu [%s] %.*s\n",
+          start->tm_year + 1900,
+          start->tm_mon + 1,
           start->tm_mday,
           start->tm_hour,
           start->tm_min,
           start->tm_sec,
+          current_pid,
           (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ?
            "Warning" : "Note"),
           (int) length, buffer);

=== modified file 'storage/innobase/ut/ut0ut.cc'
--- a/storage/innobase/ut/ut0ut.cc	2012-10-15 04:55:02 +0000
+++ b/storage/innobase/ut/ut0ut.cc	2012-10-15 07:57:33 +0000
@@ -28,6 +28,7 @@ Created 5/11/1994 Heikki Tuuri
 #ifndef UNIV_INNOCHECKSUM
 
 #include "ut0sort.h"
+#include "os0thread.h" /* thread-ID */
 
 #ifdef UNIV_NONINL
 #include "ut0ut.ic"
@@ -218,18 +219,25 @@ ut_print_timestamp(
 /*===============*/
 	FILE*  file) /*!< in: file where to print */
 {
+	ulint thread_id = 0;
+
+#ifndef UNIV_INNOCHECKSUM
+	thread_id = os_thread_pf(os_thread_get_curr_id());
+#endif
+
 #ifdef __WIN__
 	SYSTEMTIME cal_tm;
 
 	GetLocalTime(&cal_tm);
 
-	fprintf(file,"%02d%02d%02d %2d:%02d:%02d",
-		(int) cal_tm.wYear % 100,
+	fprintf(file, "%d-%02d-%02d %02d:%02d:%02d %lx",
+		(int) cal_tm.wYear,
 		(int) cal_tm.wMonth,
 		(int) cal_tm.wDay,
 		(int) cal_tm.wHour,
 		(int) cal_tm.wMinute,
-		(int) cal_tm.wSecond);
+		(int) cal_tm.wSecond,
+		thread_id);
 #else
 	struct tm* cal_tm_ptr;
 	time_t	   tm;
@@ -243,13 +251,14 @@ ut_print_timestamp(
 	time(&tm);
 	cal_tm_ptr = localtime(&tm);
 #endif
-	fprintf(file,"%02d%02d%02d %2d:%02d:%02d",
-		cal_tm_ptr->tm_year % 100,
+	fprintf(file, "%d-%02d-%02d %02d:%02d:%02d %lx",
+		cal_tm_ptr->tm_year + 1900,
 		cal_tm_ptr->tm_mon + 1,
 		cal_tm_ptr->tm_mday,
 		cal_tm_ptr->tm_hour,
 		cal_tm_ptr->tm_min,
-		cal_tm_ptr->tm_sec);
+		cal_tm_ptr->tm_sec,
+		thread_id);
 #endif
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tatjana.nuernberg:4723 to 4724)Bug#11763523Tatjana Azundris Nuernberg15 Oct