[Commits] Rev 3127: c in http://bazaar.launchpad.net/~maria-captains/maria/5.1/

serg at askmonty.org serg at askmonty.org
Wed Jan 4 22:01:06 EET 2012


At http://bazaar.launchpad.net/~maria-captains/maria/5.1/

------------------------------------------------------------
revno: 3127
revision-id: sergii at pisem.net-20120104200126-hhfmhjo8vvvu65vu
parent: sergii at pisem.net-20120104191015-rytix9tsyic5phkx
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.1
timestamp: Wed 2012-01-04 21:01:26 +0100
message:
  c
-------------- next part --------------
=== modified file 'mysql-test/r/feedback_plugin_send.result'
--- a/mysql-test/r/feedback_plugin_send.result	2011-11-12 17:40:51 +0000
+++ b/mysql-test/r/feedback_plugin_send.result	2012-01-04 20:01:26 +0000
@@ -9,7 +9,7 @@ FEEDBACK_SEND_RETRY_WAIT	60
 FEEDBACK_SEND_TIMEOUT	60
 FEEDBACK_URL	http://mariadb.org/feedback_plugin/post
 FEEDBACK_USER_INFO	mysql-test
-feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent
-feedback plugin: server replied 'ok'
-feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent
-feedback plugin: server replied 'ok'
+feedback plugin[PID]/1: report to 'http://mariadb.org/feedback_plugin/post' was sent
+feedback plugin[PID]/1: server replied 'ok'
+feedback plugin[PID]/2: report to 'http://mariadb.org/feedback_plugin/post' was sent
+feedback plugin[PID]/2: server replied 'ok'

=== modified file 'mysql-test/t/feedback_plugin_send.test'
--- a/mysql-test/t/feedback_plugin_send.test	2011-12-03 18:29:15 +0000
+++ b/mysql-test/t/feedback_plugin_send.test	2012-01-04 20:01:26 +0000
@@ -17,16 +17,13 @@ replace_result https http;
 perl;
   $log_error= $ENV{'MYSQLTEST_VARDIR'} . '/log/mysqld.1.err';
   open(LOG, '<', $log_error) or die "open(< $log_error): $!";
-
-  # Get the first few rows (as there may be different number rows in the log)
-  $i= 0;
-  while ($_=<LOG>)
-  {
-    if (/feedback plugin:.*/)
-    {
-      print "$&\n";
-      break if ($i++ >= 3);
-    }
+  @a=();
+  while ($_=<LOG>) {
+    m/feedback plugin\[(\d+)\].*/ or next;
+    push @a, "$&\n";
+    $pid=$1 unless $pid;
+    $pid='foo' unless $pid == $1;
   }
+  for (@a) { s/\[$pid\]/[PID]/o; print }
   close LOG;
 EOF

=== modified file 'plugin/feedback/url_http.cc'
--- a/plugin/feedback/url_http.cc	2011-11-13 12:28:35 +0000
+++ b/plugin/feedback/url_http.cc	2012-01-04 20:01:26 +0000
@@ -156,6 +156,8 @@ int Url_http::send(const char* data, siz
   my_socket fd= INVALID_SOCKET;
   char buf[1024];
   uint len= 0;
+  static uint counter=0;
+  counter++;
 
   addrinfo *addrs, *addr, filter= {0, AF_UNSPEC, SOCK_STREAM, 6, 0, 0, 0, 0};
   int res= getaddrinfo(host.str, port.str, &filter, &addrs);
@@ -250,7 +252,8 @@ int Url_http::send(const char* data, siz
                     full_url.str);
   else
   {
-    sql_print_information("feedback plugin: report to '%s' was sent",
+    sql_print_information("feedback plugin[%u]/%u: report to '%s' was sent",
+                          getpid(), counter,
                           full_url.str);
 
     /*
@@ -281,7 +284,8 @@ int Url_http::send(const char* data, siz
           from= NULL;
       }
       if (from)
-        sql_print_information("feedback plugin: server replied '%s'", from);
+        sql_print_information("feedback plugin[%u]/%u: server replied '%s'",
+                              getpid(), counter, from);
       else
         sql_print_warning("feedback plugin: failed to parse server reply");
     }



More information about the commits mailing list