Skip to content

Commit b19801a

Browse files
committed
Revert "Bug#32100213: X PLUGIN SOURCE DEFINES NGS LIBRARY, STILL IT IS NOT EXTRACTABLE PLUGIN PART"
The push broke compilation on several Linux platforms (required too high cmake version). Approved by Shipra Jain <shipra.x.jain@oracle.com>
1 parent 9c7f118 commit b19801a

File tree

196 files changed

+1007
-1209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+1007
-1209
lines changed

plugin/x/CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ ENDIF()
4343

4444
ADD_DEFINITIONS(-DLOG_COMPONENT_TAG="mysqlx")
4545

46-
INCLUDE(src/source_files.cmake)
47-
LIST(TRANSFORM XPL_SRC PREPEND "src/")
46+
INCLUDE(source_files.cmake)
4847

4948
SET(XPLUGIN_LOG_PROTOBUF 1 CACHE STRING "Enable logging of protobuf messages")
5049

@@ -89,21 +88,21 @@ INCLUDE_DIRECTORIES(
8988
MY_INCLUDE_SYSTEM_DIRECTORIES(LIBEVENT)
9089
MY_INCLUDE_SYSTEM_DIRECTORIES(ICU)
9190

92-
ADD_COMPILE_FLAGS(${XPL_SRC}
91+
ADD_COMPILE_FLAGS(${xplugin_SRC}
9392
COMPILE_FLAGS "${MYSQLX_PROTOCOL_FLAGS}"
9493
)
9594

9695
# assertion failed in function assert_with_dumps() @ ssa.c:621 when using -xO3
9796
IF(MY_COMPILER_IS_SUNPRO)
98-
ADD_COMPILE_FLAGS(${MYSQLX_PROJECT_DIR}/src/ngs/client.cc
97+
ADD_COMPILE_FLAGS(${MYSQLX_PROJECT_DIR}/ngs/src/client.cc
9998
COMPILE_FLAGS "-xO2"
10099
)
101100
ENDIF()
102101

103102
# MYSQL_ADD_PLUGIN may have disabled the plugin.
104103
IF(WITH_MYSQLX)
105104
MYSQL_ADD_PLUGIN(${MYSQLX_PLUGIN_NAME}
106-
${XPL_SRC}
105+
${xplugin_SRC}
107106
DEFAULT
108107
DEPENDENCIES xprotocol_tags
109108
LINK_LIBRARIES
@@ -136,3 +135,10 @@ IF(WIN32)
136135
ADD_DEFINITIONS(-DU_STATIC_IMPLEMENTATION)
137136
ENDIF()
138137

138+
IF(WITH_MYSQLX)
139+
MYSQL_ADD_COMPONENT("${MYSQLX_PLUGIN_NAME}_global_reset"
140+
${xplugin_global_reset_SRC}
141+
MODULE_ONLY
142+
TEST_ONLY
143+
)
144+
ENDIF()

plugin/x/client/CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,20 @@
2323
SET(CLIENT_FULL_LIB_NAME mysqlxclient)
2424
SET(CLIENT_LITE_LIB_NAME mysqlxclient_lite)
2525

26-
INCLUDE(source_files.cmake)
27-
LIST(APPEND CLIENT_SRC "${CMAKE_SOURCE_DIR}/sql-common/net_ns.cc")
26+
SET(CLIENT_SRC
27+
authentication/mysql41_hash.cc
28+
authentication/password_hasher.cc
29+
authentication/sha256_scramble_generator.cc
30+
xprotocol_impl.cc
31+
xrow_impl.cc
32+
xquery_result_impl.cc
33+
xsession_impl.cc
34+
xconnection_impl.cc
35+
xcompression_negotiator.cc
36+
xcompression_impl.cc
37+
xrow.cc
38+
${CMAKE_SOURCE_DIR}/sql-common/net_ns.cc
39+
)
2840

2941
INCLUDE_DIRECTORIES(
3042
${MYSQLX_GENERATE_DIR}

plugin/x/client/source_files.cmake

Lines changed: 0 additions & 36 deletions
This file was deleted.

plugin/x/src/ngs/client.h renamed to plugin/x/ngs/include/ngs/client.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,26 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_CLIENT_H_
26-
#define PLUGIN_X_SRC_NGS_CLIENT_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_H_
2727

2828
#include <atomic>
2929
#include <cstdint>
3030
#include <limits>
3131
#include <memory>
3232
#include <string>
3333

34+
#include "plugin/x/ngs/include/ngs/memory.h"
35+
#include "plugin/x/ngs/include/ngs/protocol/message.h"
36+
#include "plugin/x/ngs/include/ngs/protocol_decoder.h"
37+
#include "plugin/x/ngs/include/ngs/protocol_encoder_compression.h"
3438
#include "plugin/x/src/capabilities/configurator.h"
3539
#include "plugin/x/src/helper/chrono.h"
3640
#include "plugin/x/src/helper/multithread/mutex.h"
3741
#include "plugin/x/src/interface/client.h"
3842
#include "plugin/x/src/interface/protocol_encoder.h"
3943
#include "plugin/x/src/interface/server.h"
4044
#include "plugin/x/src/interface/vio.h"
41-
#include "plugin/x/src/ngs/memory.h"
42-
#include "plugin/x/src/ngs/protocol/message.h"
43-
#include "plugin/x/src/ngs/protocol_decoder.h"
44-
#include "plugin/x/src/ngs/protocol_encoder_compression.h"
4545

4646
#ifndef WIN32
4747
#include <netinet/in.h>
@@ -236,4 +236,4 @@ class Client : public xpl::iface::Client {
236236

237237
} // namespace ngs
238238

239-
#endif // PLUGIN_X_SRC_NGS_CLIENT_H_
239+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_H_

plugin/x/src/ngs/client_list.h renamed to plugin/x/ngs/include/ngs/client_list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_CLIENT_LIST_H_
26-
#define PLUGIN_X_SRC_NGS_CLIENT_LIST_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_LIST_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_LIST_H_
2727

2828
#include <algorithm>
2929
#include <list>
3030
#include <memory>
3131
#include <vector>
3232

33+
#include "plugin/x/ngs/include/ngs/thread.h"
3334
#include "plugin/x/src/helper/multithread/lock_container.h"
3435
#include "plugin/x/src/helper/multithread/rw_lock.h"
3536
#include "plugin/x/src/interface/client.h"
36-
#include "plugin/x/src/ngs/thread.h"
3737

3838
namespace ngs {
3939

@@ -106,4 +106,4 @@ void Client_list::enumerate(const Functor &matcher) {
106106

107107
} // namespace ngs
108108

109-
#endif // PLUGIN_X_SRC_NGS_CLIENT_LIST_H_
109+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_LIST_H_

plugin/x/src/ngs/client_session.h renamed to plugin/x/ngs/include/ngs/client_session.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_CLIENT_SESSION_H_
26-
#define PLUGIN_X_SRC_NGS_CLIENT_SESSION_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_SESSION_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_SESSION_H_
2727

2828
#include <cassert>
2929
#include <cstdint>
3030
#include <memory>
3131

32+
#include "plugin/x/ngs/include/ngs/thread.h"
3233
#include "plugin/x/src/interface/authentication.h"
3334
#include "plugin/x/src/interface/protocol_encoder.h"
3435
#include "plugin/x/src/interface/session.h"
35-
#include "plugin/x/src/ngs/thread.h"
3636

3737
namespace ngs {
3838
class Client;
@@ -106,4 +106,4 @@ class Session : public xpl::iface::Session {
106106

107107
} // namespace ngs
108108

109-
#endif // PLUGIN_X_SRC_NGS_CLIENT_SESSION_H_
109+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_CLIENT_SESSION_H_

plugin/x/src/ngs/command_delegate.h renamed to plugin/x/ngs/include/ngs/command_delegate.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_COMMAND_DELEGATE_H_
26-
#define PLUGIN_X_SRC_NGS_COMMAND_DELEGATE_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_COMMAND_DELEGATE_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_COMMAND_DELEGATE_H_
2727

2828
#include <string>
2929
#include <vector>
@@ -33,7 +33,7 @@
3333
#include "my_compiler.h" // NOLINT(build/include_subdir)
3434
#include "mysql/service_command.h"
3535

36-
#include "plugin/x/src/ngs/error_code.h"
36+
#include "plugin/x/ngs/include/ngs/error_code.h"
3737

3838
namespace ngs {
3939
class Command_delegate {
@@ -538,4 +538,4 @@ class Command_delegate {
538538
};
539539
} // namespace ngs
540540

541-
#endif // PLUGIN_X_SRC_NGS_COMMAND_DELEGATE_H_
541+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_COMMAND_DELEGATE_H_

plugin/x/src/ngs/common_status_variables.h renamed to plugin/x/ngs/include/ngs/common_status_variables.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0,
@@ -22,13 +22,13 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_COMMON_STATUS_VARIABLES_H_
26-
#define PLUGIN_X_SRC_NGS_COMMON_STATUS_VARIABLES_H_
27-
28-
#include <my_inttypes.h> // NOLINT(build/include_subdir)
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_COMMON_STATUS_VARIABLES_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_COMMON_STATUS_VARIABLES_H_
2927

3028
#include <atomic>
3129

30+
#include <my_inttypes.h>
31+
3232
namespace ngs {
3333

3434
class Common_status_variables {
@@ -101,4 +101,4 @@ class Common_status_variables {
101101

102102
} // namespace ngs
103103

104-
#endif // PLUGIN_X_SRC_NGS_COMMON_STATUS_VARIABLES_H_
104+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_COMMON_STATUS_VARIABLES_H_

plugin/x/src/ngs/compression_types.h renamed to plugin/x/ngs/include/ngs/compression_types.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0,
@@ -22,8 +22,8 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_COMPRESSION_TYPES_H_
26-
#define PLUGIN_X_SRC_NGS_COMPRESSION_TYPES_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_COMPRESSION_TYPES_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_COMPRESSION_TYPES_H_
2727

2828
namespace ngs {
2929

@@ -32,4 +32,4 @@ enum class Compression_style { k_none, k_single, k_multiple, k_group };
3232

3333
} // namespace ngs
3434

35-
#endif // PLUGIN_X_SRC_NGS_COMPRESSION_TYPES_H_
35+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_COMPRESSION_TYPES_H_

plugin/x/src/ngs/document_id_generator.h renamed to plugin/x/ngs/include/ngs/document_id_generator.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0,
@@ -22,14 +22,14 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_DOCUMENT_ID_GENERATOR_H_
26-
#define PLUGIN_X_SRC_NGS_DOCUMENT_ID_GENERATOR_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_DOCUMENT_ID_GENERATOR_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_DOCUMENT_ID_GENERATOR_H_
2727

2828
#include <string>
2929

30+
#include "plugin/x/ngs/include/ngs/thread.h"
3031
#include "plugin/x/src/helper/multithread/mutex.h"
3132
#include "plugin/x/src/interface/document_id_generator.h"
32-
#include "plugin/x/src/ngs/thread.h"
3333

3434
namespace ngs {
3535

@@ -48,4 +48,4 @@ class Document_id_generator : public xpl::iface::Document_id_generator {
4848

4949
} // namespace ngs
5050

51-
#endif // PLUGIN_X_SRC_NGS_DOCUMENT_ID_GENERATOR_H_
51+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_DOCUMENT_ID_GENERATOR_H_

plugin/x/src/ngs/error_code.h renamed to plugin/x/ngs/include/ngs/error_code.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_ERROR_CODE_H_
26-
#define PLUGIN_X_SRC_NGS_ERROR_CODE_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_ERROR_CODE_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_ERROR_CODE_H_
2727

2828
#include <stdio.h>
2929
#include <cstdarg>
3030
#include <string>
3131

32-
#include "my_compiler.h" // NOLINT(build/include_subdir)
33-
#include "my_dbug.h" // NOLINT(build/include_subdir)
34-
#include "my_sys.h" // NOLINT(build/include_subdir)
35-
#include "mysqld_error.h" // NOLINT(build/include_subdir)
32+
#include "my_compiler.h"
33+
#include "my_dbug.h"
34+
#include "my_sys.h"
35+
#include "mysqld_error.h"
3636

3737
namespace ngs {
3838

@@ -145,4 +145,4 @@ inline Error_code Fatal(const Error_code &err) {
145145
}
146146
} // namespace ngs
147147

148-
#endif // PLUGIN_X_SRC_NGS_ERROR_CODE_H_
148+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_ERROR_CODE_H_

plugin/x/src/ngs/log.h renamed to plugin/x/ngs/include/ngs/log.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0,
@@ -22,8 +22,8 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_LOG_H_
26-
#define PLUGIN_X_SRC_NGS_LOG_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_LOG_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_LOG_H_
2727

2828
#ifndef NGS_DISABLE_LOGGING
2929

@@ -46,4 +46,4 @@
4646

4747
#endif // NGS_DISABLE_LOGGING
4848

49-
#endif // PLUGIN_X_SRC_NGS_LOG_H_
49+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_LOG_H_

plugin/x/src/ngs/memory.h renamed to plugin/x/ngs/include/ngs/memory.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0,
@@ -22,16 +22,13 @@
2222
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
*/
2424

25-
#ifndef PLUGIN_X_SRC_NGS_MEMORY_H_
26-
#define PLUGIN_X_SRC_NGS_MEMORY_H_
25+
#ifndef PLUGIN_X_NGS_INCLUDE_NGS_MEMORY_H_
26+
#define PLUGIN_X_NGS_INCLUDE_NGS_MEMORY_H_
2727

2828
#include <mysql/plugin.h>
29-
3029
#include <memory>
31-
#include <string>
32-
#include <utility>
3330

34-
#include "my_compiler.h" // NOLINT(build/include_subdir)
31+
#include "my_compiler.h"
3532
#include "plugin/x/src/config/config.h"
3633
#include "plugin/x/src/xpl_performance_schema.h"
3734

@@ -129,4 +126,4 @@ typedef std::basic_string<char, std::char_traits<char>,
129126

130127
} // namespace ngs
131128

132-
#endif // PLUGIN_X_SRC_NGS_MEMORY_H_
129+
#endif // PLUGIN_X_NGS_INCLUDE_NGS_MEMORY_H_

0 commit comments

Comments
 (0)