3288 Tor Didriksen 2011-07-22
WL#5257 post-push fix, make sqlgunitlib self-contained.
opt_trace.cc contains a dependency on system_charset_info,
so the library contained an external dependency, and did not link on windows.
Solution: link opt_trace-t with the server libraries instead.
modified:
sql/CMakeLists.txt
unittest/gunit/CMakeLists.txt
unittest/gunit/opt_trace-t.cc
3287 Marc Alff 2011-07-22
Fixed build break in unit tests.
modified:
unittest/gunit/test_mdl_context_owner.h
=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt 2011-07-20 10:29:12 +0000
+++ b/sql/CMakeLists.txt 2011-07-22 07:21:40 +0000
@@ -207,7 +207,7 @@ ADD_LIBRARY(slave ${SLAVE_SOURCE})
ADD_DEPENDENCIES(slave GenError)
ADD_LIBRARY(sqlgunitlib
filesort_utils.cc mdl.cc sql_list.cc sql_string.cc thr_malloc.cc
- opt_trace.cc)
+ )
ADD_DEPENDENCIES(sqlgunitlib GenError)
=== modified file 'unittest/gunit/CMakeLists.txt'
--- a/unittest/gunit/CMakeLists.txt 2011-07-20 14:40:52 +0000
+++ b/unittest/gunit/CMakeLists.txt 2011-07-22 07:21:40 +0000
@@ -212,7 +212,6 @@ SET(TESTS
mdl_mytap
my_bitmap
my_regex
- opt_trace
sql_list
sql_plist
thread_utils
@@ -223,6 +222,7 @@ SET(SERVER_TESTS
item
my_decimal
opt_range
+ opt_trace
)
FOREACH(test ${TESTS})
=== modified file 'unittest/gunit/opt_trace-t.cc'
--- a/unittest/gunit/opt_trace-t.cc 2011-07-19 15:11:15 +0000
+++ b/unittest/gunit/opt_trace-t.cc 2011-07-22 07:21:40 +0000
@@ -25,12 +25,11 @@
#include <opt_trace.h>
#include <mysys_err.h> // for testing of OOM
+#include "mysqld.h" // system_charset_info
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> // for WEXITSTATUS
#endif
-CHARSET_INFO *system_charset_info= &my_charset_utf8_general_ci;
-
namespace {
const ulonglong all_features= Opt_trace_context::default_features;
@@ -86,6 +85,10 @@ class TraceContentTest : public ::testin
public:
Opt_trace_context trace;
protected:
+ static void SetUpTestCase()
+ {
+ system_charset_info= &my_charset_utf8_general_ci;
+ }
virtual void SetUp()
{
error_handler_hook= my_error_handler;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (tor.didriksen:3287 to 3288) WL#5257 | Tor Didriksen | 22 Jul |