diff options
Diffstat (limited to 'storage/perfschema/unittest')
-rw-r--r-- | storage/perfschema/unittest/CMakeLists.txt | 11 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs-t.cc | 6 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_account-oom-t.cc | 3 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_host-oom-t.cc | 3 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_instr-oom-t.cc | 3 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_instr-t.cc | 7 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_instr_class-oom-t.cc | 3 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_instr_class-t.cc | 4 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_server_stubs.cc (renamed from storage/perfschema/unittest/stub_server_misc.h) | 11 | ||||
-rw-r--r-- | storage/perfschema/unittest/pfs_user-oom-t.cc | 3 |
10 files changed, 31 insertions, 23 deletions
diff --git a/storage/perfschema/unittest/CMakeLists.txt b/storage/perfschema/unittest/CMakeLists.txt index 6add43de7f9..e8b11e807bf 100644 --- a/storage/perfschema/unittest/CMakeLists.txt +++ b/storage/perfschema/unittest/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,5 +23,10 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ADD_DEFINITIONS(-DMYSQL_SERVER ${SSL_DEFINES}) -MY_ADD_TESTS(pfs_instr_class pfs_instr_class-oom pfs_instr pfs_instr-oom pfs_account-oom pfs_host-oom pfs_timer pfs_user-oom pfs - EXT "cc" LINK_LIBRARIES perfschema mysys) +ADD_CONVENIENCE_LIBRARY(pfs_server_stubs pfs_server_stubs.cc) + +ADD_DEPENDENCIES(pfs_server_stubs GenError) + +MY_ADD_TESTS(pfs_instr_class pfs_instr_class-oom pfs_instr pfs_instr-oom + pfs_account-oom pfs_host-oom pfs_timer pfs_user-oom pfs + EXT "cc" LINK_LIBRARIES perfschema mysys pfs_server_stubs) diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index 9211443bcca..6121fac098f 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,6 @@ #include "stub_print_error.h" #include "stub_pfs_defaults.h" -#include "stub_server_misc.h" /* test helpers, to simulate the setup */ @@ -112,6 +111,7 @@ void test_bootstrap() param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; param.m_session_connect_attrs_sizing= 0; + param.m_max_digest_length= 0; boot= initialize_performance_schema(& param); ok(boot != NULL, "boot"); @@ -170,6 +170,7 @@ PSI * load_perfschema() param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; param.m_session_connect_attrs_sizing= 0; + param.m_max_digest_length= 0; /* test_bootstrap() covered this, assuming it just works */ boot= initialize_performance_schema(& param); @@ -1514,6 +1515,7 @@ void test_event_name_index() param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; param.m_session_connect_attrs_sizing= 0; + param.m_max_digest_length= 0; param.m_mutex_sizing= 0; param.m_rwlock_sizing= 0; diff --git a/storage/perfschema/unittest/pfs_account-oom-t.cc b/storage/perfschema/unittest/pfs_account-oom-t.cc index 2343e8378ad..f715325401d 100644 --- a/storage/perfschema/unittest/pfs_account-oom-t.cc +++ b/storage/perfschema/unittest/pfs_account-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,6 @@ #include <tap.h> #include "stub_pfs_global.h" -#include "stub_server_misc.h" #include <string.h> /* memset */ diff --git a/storage/perfschema/unittest/pfs_host-oom-t.cc b/storage/perfschema/unittest/pfs_host-oom-t.cc index 5b823ce4eac..56597bdda74 100644 --- a/storage/perfschema/unittest/pfs_host-oom-t.cc +++ b/storage/perfschema/unittest/pfs_host-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,6 @@ #include <tap.h> #include "stub_pfs_global.h" -#include "stub_server_misc.h" #include <string.h> /* memset */ diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc index 18c0029776d..25caaa6241f 100644 --- a/storage/perfschema/unittest/pfs_instr-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,6 @@ #include <tap.h> #include "stub_pfs_global.h" -#include "stub_server_misc.h" #include <string.h> /* memset */ diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc index fab22b203d3..81df38340df 100644 --- a/storage/perfschema/unittest/pfs_instr-t.cc +++ b/storage/perfschema/unittest/pfs_instr-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,8 +23,6 @@ #include <memory.h> -#include "stub_server_misc.h" - void test_no_instruments() { int rc; @@ -62,6 +60,7 @@ void test_no_instruments() param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; param.m_session_connect_attrs_sizing= 0; + param.m_max_digest_length= 0; init_event_name_sizing(& param); rc= init_instruments(& param); @@ -121,6 +120,7 @@ void test_no_instances() param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; param.m_session_connect_attrs_sizing= 0; + param.m_max_digest_length= 0; init_event_name_sizing(& param); rc= init_instruments(& param); @@ -261,6 +261,7 @@ void test_with_instances() param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; param.m_session_connect_attrs_sizing= 0; + param.m_max_digest_length= 0; init_event_name_sizing(& param); rc= init_instruments(& param); diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc index 264d6126336..1b098ee356e 100644 --- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,7 +20,6 @@ #include <tap.h> #include "stub_pfs_global.h" -#include "stub_server_misc.h" void test_oom() { diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc index 706c5724a80..06e3200a8d2 100644 --- a/storage/perfschema/unittest/pfs_instr_class-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,6 @@ #include <pfs_global.h> #include <tap.h> -#include "stub_server_misc.h" - void test_no_registration() { int rc; diff --git a/storage/perfschema/unittest/stub_server_misc.h b/storage/perfschema/unittest/pfs_server_stubs.cc index 946da533727..a8f417e390b 100644 --- a/storage/perfschema/unittest/stub_server_misc.h +++ b/storage/perfschema/unittest/pfs_server_stubs.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,12 +17,19 @@ Minimal code to be able to link a unit test. */ +#include "my_global.h" +#include "m_ctype.h" +#include "sql_class.h" +#include "sql_show.h" + +struct sql_digest_storage; + volatile bool ready_to_exit= false; uint lower_case_table_names= 0; CHARSET_INFO *files_charset_info= NULL; -extern "C" void compute_md5_hash(char *, const char *, int) +void compute_digest_md5(const sql_digest_storage *, unsigned char *) { } diff --git a/storage/perfschema/unittest/pfs_user-oom-t.cc b/storage/perfschema/unittest/pfs_user-oom-t.cc index 3cb80e1b7f9..6c936ba8ffb 100644 --- a/storage/perfschema/unittest/pfs_user-oom-t.cc +++ b/storage/perfschema/unittest/pfs_user-oom-t.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,6 @@ #include <tap.h> #include "stub_pfs_global.h" -#include "stub_server_misc.h" #include <string.h> /* memset */ |