List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:May 3 2012 11:00am
Subject:bzr push into mysql-trunk branch (tor.didriksen:3780 to 3781) Bug#13983918
View as plain text  
 3781 Tor Didriksen	2012-05-03
      BUG#13983918 - FACTOR OUT MY_GET_ERR_MSG() FROM MY_ERROR() FOR GENERAL USE
      
      Post-push fix for unit test, 
      adjust to different perror() messages on different platforms.
     @ sql/rpl_utility.h
        Remove lots of warnings of the form:
        "sql/rpl_utility.h", line 470: Warning: extra ";" ignored.
     @ unittest/gunit/CMakeLists.txt
        The my_error test does not need to include the entier server.

    modified:
      sql/rpl_utility.h
      unittest/gunit/CMakeLists.txt
      unittest/gunit/my_error-t.cc
 3780 Frazer Clement	2012-05-03
      Second part of not removing MySQL Cluster binary man pages

    modified:
      man/CMakeLists.txt
=== modified file 'sql/rpl_utility.h'
--- a/sql/rpl_utility.h	2012-04-24 13:39:42 +0000
+++ b/sql/rpl_utility.h	2012-05-03 10:59:36 +0000
@@ -467,7 +467,7 @@ private:
 public:
   Deferred_log_events(Relay_log_info *rli);
   ~Deferred_log_events();
-  /* queue for exection at Query-log-event time prior the Query */;
+  /* queue for exection at Query-log-event time prior the Query */
   int add(Log_event *ev);
   bool is_empty();
   bool execute(Relay_log_info *rli);

=== modified file 'unittest/gunit/CMakeLists.txt'
--- a/unittest/gunit/CMakeLists.txt	2012-05-02 04:50:53 +0000
+++ b/unittest/gunit/CMakeLists.txt	2012-05-03 10:59:36 +0000
@@ -229,6 +229,7 @@ SET(TESTS
   bounded_queue
   bounds_checked_array
   byteorder
+  cost_estimate
   dbug
   decimal
   dynarray
@@ -237,12 +238,12 @@ SET(TESTS
   mdl
   mdl_mytap
   my_bitmap
+  my_error
   my_regex
   sql_list
   sql_plist
-  thread_utils
   stdcxx
-  cost_estimate
+  thread_utils
   )
 
 # Add tests (link them with gunit library and the server libraries) 
@@ -259,7 +260,6 @@ SET(SERVER_TESTS
   opt_trace
   sql_table
   get_diagnostics
-  my_error
   segfault
   join_tab_sort
 )

=== modified file 'unittest/gunit/my_error-t.cc'
--- a/unittest/gunit/my_error-t.cc	2012-05-02 04:50:53 +0000
+++ b/unittest/gunit/my_error-t.cc	2012-05-03 10:59:36 +0000
@@ -19,6 +19,7 @@
 
 #include "my_sys.h" // my_strerror()
 #include "my_base.h" // HA_ERR_KEY_NOT_FOUND
+#include <string.h>
 
 namespace {
 
@@ -29,11 +30,15 @@ TEST(MyErrorTest, MyStrErrorSystem)
 
   msg= my_strerror(buf, sizeof(buf) - 1, 9999);
   EXPECT_TRUE(!strcasecmp("unknown error", msg) ||
-              !strcasecmp("unknown error 9999", msg));
+              !strcasecmp("unknown error: 9999", msg) ||
+              !strcasecmp("unknown error 9999", msg))
+    << "msg<" << msg << ">";
 
   // try a proper error number
-  msg= my_strerror(buf, sizeof(buf) - 1, 1);
-  EXPECT_STRCASEEQ("Operation not permitted", msg);
+  msg= my_strerror(buf, sizeof(buf) - 1, EPERM);
+  const char *os_msg= strerror(EPERM);
+  EXPECT_STREQ(os_msg, msg)
+    << "msg<" << msg << ">";
 }
 
 TEST(MyErrorTest, MyStrErrorHandlerPlugin)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3780 to 3781) Bug#13983918Tor Didriksen3 May