parent
f8943b8c74
commit
75b887d7cb
3 changed files with 70 additions and 1 deletions
|
@ -16,6 +16,10 @@ self = stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-ERw6ypGJfkUwOds5GkdSZeAg/ZIcuXMHwACEqI5NYQQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./mysql-5.7-add-protobuf-3.8+-support.patch
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString stdenv.isDarwin ''
|
||||
ln -s /bin/ps $TMPDIR/ps
|
||||
export PATH=$PATH:$TMPDIR
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
diff --git a/cmake/build_configurations/compiler_options.cmake b/cmake/build_configurations/compiler_options.cmake
|
||||
index a935227e523..b4ebd61c5c1 100644
|
||||
--- a/cmake/build_configurations/compiler_options.cmake
|
||||
+++ b/cmake/build_configurations/compiler_options.cmake
|
||||
@@ -43,7 +43,7 @@ IF(UNIX)
|
||||
|
||||
# Default GCC flags
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
- SET(COMMON_C_FLAGS "-fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
|
||||
+ SET(COMMON_C_FLAGS "-fno-omit-frame-pointer -fno-strict-aliasing")
|
||||
# Disable inline optimizations for valgrind testing to avoid false positives
|
||||
IF(WITH_VALGRIND)
|
||||
STRING_PREPEND(COMMON_C_FLAGS "-fno-inline ")
|
||||
@@ -68,7 +68,7 @@ IF(UNIX)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
- SET(COMMON_CXX_FLAGS "-fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
|
||||
+ SET(COMMON_CXX_FLAGS "-fno-omit-frame-pointer -fno-strict-aliasing")
|
||||
# GCC 6 has C++14 as default, set it explicitly to the old default.
|
||||
EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE GXX_VERSION)
|
||||
diff --git a/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc b/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc
|
||||
index 5dc91ba269c..3a45284859f 100644
|
||||
--- a/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc
|
||||
+++ b/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc
|
||||
@@ -629,12 +629,12 @@ class ErrorDumper : public ::google::protobuf::io::ErrorCollector
|
||||
std::stringstream m_out;
|
||||
|
||||
public:
|
||||
- virtual void AddError(int line, int column, const string & message)
|
||||
+ virtual void AddError(int line, int column, const std::string & message)
|
||||
{
|
||||
m_out << "ERROR in message: line " << line+1 << ": column " << column << ": " << message<<"\n";
|
||||
}
|
||||
|
||||
- virtual void AddWarning(int line, int column, const string & message)
|
||||
+ virtual void AddWarning(int line, int column, const std::string & message)
|
||||
{
|
||||
m_out << "WARNING in message: line " << line+1 << ": column " << column << ": " << message<<"\n";
|
||||
}
|
||||
diff --git a/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h b/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h
|
||||
index 90f7cc77a39..cf6c607a818 100644
|
||||
--- a/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h
|
||||
+++ b/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h
|
||||
@@ -36,7 +36,6 @@
|
||||
#include <google/protobuf/io/tokenizer.h>
|
||||
#include <google/protobuf/io/zero_copy_stream.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
-#include <google/protobuf/wire_format_lite_inl.h>
|
||||
#include <google/protobuf/dynamic_message.h>
|
||||
|
||||
#include "mysqlx_connection.pb.h"
|
||||
diff --git a/rapid/plugin/x/ngs/src/protocol_decoder.cc b/rapid/plugin/x/ngs/src/protocol_decoder.cc
|
||||
index 298b6a6884c..fae21d18f78 100644
|
||||
--- a/rapid/plugin/x/ngs/src/protocol_decoder.cc
|
||||
+++ b/rapid/plugin/x/ngs/src/protocol_decoder.cc
|
||||
@@ -123,7 +123,7 @@ Error_code Message_decoder::parse(Request &request)
|
||||
google::protobuf::io::CodedInputStream stream(reinterpret_cast<const uint8_t*>(request.buffer()),
|
||||
static_cast<int>(request.buffer_size()));
|
||||
// variable 'mysqlx_max_allowed_packet' has been checked when buffer was filling by data
|
||||
- stream.SetTotalBytesLimit(static_cast<int>(request.buffer_size()), -1 /*no warnings*/);
|
||||
+ stream.SetTotalBytesLimit(static_cast<int>(request.buffer_size()));
|
||||
// Protobuf limits the number of nested objects when decoding messages
|
||||
// lets set the value in explicit way (to ensure that is set accordingly with
|
||||
// out stack size)
|
|
@ -23621,7 +23621,6 @@ with pkgs;
|
|||
inherit (darwin) cctools developer_cmds;
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
||||
boost = boost159;
|
||||
protobuf = protobuf3_7;
|
||||
openssl = openssl_1_1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue