Compare commits
18 Commits
aosc-gener
...
generic
Author | SHA1 | Date | |
---|---|---|---|
4ec698df73 | |||
ae49f132d3 | |||
09e6cc72c2 | |||
bcefd5e339 | |||
94858c5c2d | |||
c7ef533a07 | |||
3429e6c634 | |||
de106cfb1e | |||
a511f608de | |||
eea37359b9 | |||
9930bc7f54 | |||
1ef09886f1 | |||
4c82b44170 | |||
27c51b728f | |||
8a32fe3dbc | |||
3291e3630b | |||
6ef295d44e | |||
802c80b009 |
@ -65,6 +65,9 @@ cmake_dependent_option(
|
||||
"NOT OB_BUILD_RPM;NOT OB_BUILD_LIBOBLOG" ON
|
||||
)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcmodel=large")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcmodel=large")
|
||||
|
||||
message(STATUS "This is BINARY dir " ${PROJECT_BINARY_DIR})
|
||||
message(STATUS "This is SOURCE dir " ${PROJECT_SOURCE_DIR})
|
||||
|
||||
|
70
build2.sh
Executable file
70
build2.sh
Executable file
@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
cmake_flags=(
|
||||
# CMAKE_BUILD_TYPE
|
||||
# values: Release/Debug
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
# CMAKE_VERBOSE_MAKEFILE
|
||||
# ON: verbose build output, OFF: silent build output
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
|
||||
-DOB_BUILD_RPM=OFF
|
||||
|
||||
# OB_USE_CLANG
|
||||
# ON: use clang, OFF: use gcc
|
||||
-DOB_USE_CLANG=ON
|
||||
|
||||
# OB_USE_LLVM_LIBTOOLS
|
||||
# ON: use lld & llvm-objcopy, OFF: use ld & objcopy
|
||||
-DOB_USE_LLVM_LIBTOOLS=ON
|
||||
|
||||
-DOB_COMPRESS_DEBUG_SECTIONS=OFF
|
||||
-DOB_STATIC_LINK_LGPL_DEPS=OFF
|
||||
|
||||
-DOB_USE_CCACHE=OFF
|
||||
-DOB_ENABLE_PCH=ON
|
||||
-DOB_ENALBE_UNITY=ON
|
||||
-DOB_MAX_UNITY_BATCH_SIZE=30
|
||||
-DOB_USE_ASAN=OFF
|
||||
|
||||
-DOB_RELEASEID=1
|
||||
)
|
||||
|
||||
# check the depends library
|
||||
for i in openssl RapidJSON libisal; do
|
||||
pkg-config --exists $i
|
||||
if [ $? -ne 0 ];then
|
||||
echo "Please install $i"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
# use split build directory for gcc/clang (release/debug)
|
||||
BUILD_DIR=build
|
||||
eval "export `echo "${cmake_flags[@]}" | sed 's/\-D//g'`"
|
||||
if [ $OB_USE_CLANG == "ON" ]; then
|
||||
BUILD_DIR="${BUILD_DIR}.clang"
|
||||
elif [ $OB_USE_CLANG == "OFF" ]; then
|
||||
BUILD_DIR="${BUILD_DIR}.gcc"
|
||||
fi
|
||||
|
||||
if [ $OB_USE_LLVM_LIBTOOLS == "ON" ]; then
|
||||
BUILD_DIR="${BUILD_DIR}.lld"
|
||||
elif [ $OB_USE_LLVM_LIBTOOLS == "OFF" ]; then
|
||||
BUILD_DIR="${BUILD_DIR}.ld"
|
||||
fi
|
||||
|
||||
if [ $CMAKE_BUILD_TYPE == "Release" ];then
|
||||
BUILD_DIR="${BUILD_DIR}.release"
|
||||
elif [ $CMAKE_BUILD_TYPE == "Debug" ];then
|
||||
BUILD_DIR="${BUILD_DIR}.debug"
|
||||
fi
|
||||
eval "unset `echo "${cmake_flags[@]}" | sed 's/\-D//g' | sed 's/=[0-9a-zA-Z]*/ /g'`"
|
||||
|
||||
[ -d $BUILD_DIR ] || mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
|
||||
cmake "${cmake_flags[@]}" ..
|
||||
|
||||
make -j`nproc` 2>&1 | tee build.log
|
@ -5,11 +5,13 @@ message(STATUS "DETECT BUILD ARCH: " ${ARCHITECTURE})
|
||||
ob_define(DEVTOOLS_DIR "${CMAKE_SOURCE_DIR}/deps/3rd/usr/local/oceanbase/devtools")
|
||||
ob_define(DEP_DIR "${CMAKE_SOURCE_DIR}/deps/3rd/usr/local/oceanbase/deps/devel")
|
||||
|
||||
ob_define(OB_RELEASEID 1)
|
||||
ob_define(OB_SO_CACHE OFF)
|
||||
|
||||
ob_define(OB_USE_CLANG ON)
|
||||
ob_define(OB_USE_LLVM_LIBTOOLS ON)
|
||||
ob_define(OB_COMPRESS_DEBUG_SECTIONS OFF)
|
||||
ob_define(OB_STATIC_LINK_LGPL_DEPS ON)
|
||||
|
||||
ob_define(OB_STATIC_LINK_LGPL_DEPS OFF)
|
||||
ob_define(OB_USE_CCACHE OFF)
|
||||
ob_define(OB_ENABLE_PCH ON)
|
||||
ob_define(OB_ENABLE_LIB_PCH ${OB_ENABLE_PCH})
|
||||
@ -18,10 +20,9 @@ ob_define(OB_ENABLE_UNITY ON)
|
||||
ob_define(OB_MAX_UNITY_BATCH_SIZE 30)
|
||||
ob_define(OB_USE_ASAN OFF)
|
||||
|
||||
ob_define(OB_RELEASEID 1)
|
||||
|
||||
set(OBJCOPY_BIN "${DEVTOOLS_DIR}/bin/objcopy")
|
||||
set(LD_BIN "${DEVTOOLS_DIR}/bin/ld")
|
||||
set(OBJCOPY_BIN "${DEVTOOLS_DIR}/bin/llvm-objcopy")
|
||||
set(LD_BIN "${DEVTOOLS_DIR}/bin/ld.lld")
|
||||
|
||||
# share compile cache between different directories
|
||||
set(DEBUG_PREFIX "-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=.")
|
||||
@ -40,16 +41,34 @@ if(${ARCHITECTURE} STREQUAL "sw_64")
|
||||
endif()
|
||||
|
||||
if (OB_USE_LLVM_LIBTOOLS)
|
||||
# create ld symlink to ld.lld for gcc
|
||||
if(EXISTS "${DEVTOOLS_DIR}/bin/ld.lld")
|
||||
execute_process(COMMAND cmake -E create_symlink
|
||||
"${DEVTOOLS_DIR}/bin/ld.lld" # Old name
|
||||
"${CMAKE_SOURCE_DIR}/deps/3rd/compile/ld" # New name
|
||||
)
|
||||
elseif(EXISTS "/usr/bin/ld.lld")
|
||||
execute_process(COMMAND cmake -E create_symlink
|
||||
"/usr/bin/ld.lld" # Old name
|
||||
"${CMAKE_SOURCE_DIR}/deps/3rd/compile/ld" # New name
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OB_USE_LLVM_LIBTOOLS)
|
||||
# use llvm-ar llvm-ranlib llvm-objcopy ld.lld...
|
||||
set(_CMAKE_TOOLCHAIN_PREFIX llvm-)
|
||||
set(_CMAKE_TOOLCHAIN_LOCATION "${DEVTOOLS_DIR}/bin")
|
||||
set(LD_BIN "${DEVTOOLS_DIR}/bin/ld.lld")
|
||||
set(OBJCOPY_BIN "${DEVTOOLS_DIR}/bin/llvm-objcopy")
|
||||
find_program(LD_BIN ld.lld PATHS "${DEVTOOLS_DIR}/bin")
|
||||
find_program(OBJCOPY_BIN llvm-objcopy PATHS "${DEVTOOLS_DIR}/bin")
|
||||
else()
|
||||
find_program(LD_BIN ld PATHS "${CMAKE_SOURCE_DIR}/deps/3rd/compile" "${DEVTOOLS_DIR}/bin" "/usr/bin")
|
||||
find_program(OBJCOPY_BIN objcopy PATHS "${DEVTOOLS_DIR}/bin" "/usr/bin")
|
||||
endif()
|
||||
|
||||
if (OB_USE_CCACHE)
|
||||
find_program(OB_CCACHE ccache
|
||||
PATHS "${DEVTOOLS_DIR}/bin"
|
||||
PATHS "${DEVTOOLS_DIR}/bin" "/usr/bin"
|
||||
NO_DEFAULT_PATH)
|
||||
if (NOT OB_CCACHE)
|
||||
message(WARNING "CCACHE NOT FOUND, COMPILE CACHE MAY NOT WORK.")
|
||||
@ -65,15 +84,14 @@ endif()
|
||||
|
||||
if (OB_USE_CLANG)
|
||||
find_program(OB_CC clang
|
||||
PATHS "${DEVTOOLS_DIR}/bin"
|
||||
PATHS "${DEVTOOLS_DIR}/bin" "/usr/bin"
|
||||
NO_DEFAULT_PATH)
|
||||
find_program(OB_CXX clang++
|
||||
PATHS "${DEVTOOLS_DIR}/bin"
|
||||
PATHS "${DEVTOOLS_DIR}/bin" "/usr/bin"
|
||||
NO_DEFAULT_PATH)
|
||||
set(BUILD_OPT "${BUILD_OPT} --gcc-toolchain=${DEVTOOLS_DIR} -fcolor-diagnostics")
|
||||
set(BUILD_OPT "${BUILD_OPT} --gcc-toolchain=${DEVTOOLS_DIR} -fcolor-diagnostics -ffunction-sections -fdata-sections")
|
||||
# just make embedded clang and ccache happy...
|
||||
set(BUILD_OPT "${BUILD_OPT} -I${DEVTOOLS_DIR}/lib/clang/11.0.1/include")
|
||||
set(LD_OPT "${LD_OPT} -Wl,-z,noexecstack")
|
||||
set(LD_OPT "${LD_OPT} -Wl,-z,noexecstack -Wl,--gc-sections ")
|
||||
|
||||
if (OB_USE_ASAN)
|
||||
ob_define(CMAKE_ASAN_FLAG "-fstack-protector-strong -fsanitize=address -fno-optimize-sibling-calls")
|
||||
@ -97,13 +115,13 @@ else() # not clang, use gcc (such as gcc52 in x86_64)
|
||||
|
||||
if(NOT DEFINED OB_CC)
|
||||
find_program(OB_CC gcc
|
||||
PATHS "${DEVTOOLS_DIR}/bin"
|
||||
PATHS "${DEVTOOLS_DIR}/bin" "/usr/bin"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED OB_CXX)
|
||||
find_program(OB_CC g++
|
||||
PATHS "${DEVTOOLS_DIR}/bin"
|
||||
PATHS "${DEVTOOLS_DIR}/bin" "/usr/bin"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
@ -137,9 +155,9 @@ elseif(${ARCHITECTURE} STREQUAL "aarch64")
|
||||
set(MTUNE_CFLAGS "-mtune=generic" )
|
||||
set(ARCH_LDFLAGS "-l:libatomic.a")
|
||||
elseif(${ARCHITECTURE} STREQUAL "loongarch64")
|
||||
set(MARCH_CFLAGS "-march=la464" "-mcmodel=large")
|
||||
set(MTUNE_CFLAGS "-mabi=lp64d")
|
||||
set(ARCH_LDFLAGS "-latomic")
|
||||
set(MARCH_CFLAGS "-march=la464")
|
||||
set(MTUNE_CFLAGS "-mabi=lp64")
|
||||
set(ARCH_LDFLAGS "-l:libatomic.a")
|
||||
elseif(${ARCHITECTURE} STREQUAL "sw_64")
|
||||
set(ARCH_LDFLAGS "-latomic -llzma")
|
||||
else()
|
||||
|
1
deps/3rd/compile/ld
vendored
1
deps/3rd/compile/ld
vendored
@ -1 +0,0 @@
|
||||
../usr/local/oceanbase/devtools/bin/ld.lld
|
2
deps/easy/CMakeLists.txt
vendored
2
deps/easy/CMakeLists.txt
vendored
@ -43,7 +43,7 @@ target_compile_options(easy_base
|
||||
INTERFACE
|
||||
-D_GLIBCXX_USE_CXX11_ABI=0 -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
|
||||
${MARCH_CFLAGS} ${MTUNE_CFLAGS}
|
||||
$<$<COMPILE_LANGUAGE:C>:-g -Wall -Werror -fPIC ${EASY_CC_WNO}>
|
||||
$<$<COMPILE_LANGUAGE:C>:-g -Wall -fPIC ${EASY_CC_WNO}>
|
||||
)
|
||||
|
||||
target_link_libraries(easy_base
|
||||
|
19
deps/easy/src/io/easy_ssl.c
vendored
19
deps/easy/src/io/easy_ssl.c
vendored
@ -184,7 +184,10 @@ int easy_ssl_cleanup()
|
||||
ERR_free_strings();
|
||||
// SSL_COMP_free();
|
||||
// sk_SSL_COMP_free (SSL_COMP_get_compression_methods());
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
// openssl-1.1 doesn't seem to export this symbol, confirmed on Archlinux
|
||||
CRYPTO_mem_leaks_fp(stderr);
|
||||
#endif
|
||||
easy_free((char*)easy_ssl_lock_cs);
|
||||
|
||||
return EASY_OK;
|
||||
@ -429,9 +432,11 @@ static int easy_ssl_handshake(easy_connection_t* c)
|
||||
c->read = easy_ssl_read;
|
||||
c->write = easy_ssl_write;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
if (c->sc->connection->s3) {
|
||||
c->sc->connection->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS;
|
||||
}
|
||||
#endif
|
||||
|
||||
return EASY_OK;
|
||||
}
|
||||
@ -1765,14 +1770,22 @@ static int easy_ssl_dhparam(easy_ssl_ctx_t* ssl, char* file)
|
||||
return EASY_ERROR;
|
||||
}
|
||||
|
||||
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
|
||||
dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
|
||||
BIGNUM* p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
|
||||
BIGNUM* g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
|
||||
|
||||
if (dh->p == NULL || dh->g == NULL) {
|
||||
if (p == NULL || g == NULL
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
|| !DH_set0_pqg(dh, p, NULL, g)
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
|
||||
) {
|
||||
easy_ssl_error(EASY_LOG_ERROR, "BN_bin2bn() failed");
|
||||
DH_free(dh);
|
||||
return EASY_ERROR;
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
dh->p = p;
|
||||
dh->g = g;
|
||||
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
||||
|
||||
SSL_CTX_set_tmp_dh(ssl->ctx, dh);
|
||||
|
||||
|
2
deps/logmessage
vendored
2
deps/logmessage
vendored
Submodule deps/logmessage updated: 4f9e63f635...163dfc97a6
5
deps/oblib/src/CMakeLists.txt
vendored
5
deps/oblib/src/CMakeLists.txt
vendored
@ -3,6 +3,7 @@ add_library(oblib_base_base INTERFACE)
|
||||
message(STATUS "check deps for oblib")
|
||||
|
||||
get_property(EASY_INCLUDE_DIRS GLOBAL PROPERTY "EASY_INCLUDE_DIRS" )
|
||||
|
||||
target_include_directories(
|
||||
oblib_base_base INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@ -21,8 +22,8 @@ if (OB_USE_CLANG)
|
||||
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION
|
||||
-Wall -Wextra -Wformat -Wno-deprecated
|
||||
-fno-omit-frame-pointer ${MARCH_CFLAGS} ${MTUNE_CFLAGS}
|
||||
-Wno-address-of-packed-member -Wno-sign-compare -Werror
|
||||
-Wno-inconsistent-missing-override
|
||||
-Wno-address-of-packed-member -Wno-sign-compare
|
||||
-Wno-inconsistent-missing-override
|
||||
-fno-delete-null-pointer-checks
|
||||
-Wno-delete-non-virtual-dtor -Wno-dynamic-class-memaccess
|
||||
-Wno-format-security -Wno-reserved-user-defined-literal -Wno-sometimes-uninitialized
|
||||
|
1
deps/oblib/src/lib/charset/ob_charset.cpp
vendored
1
deps/oblib/src/lib/charset/ob_charset.cpp
vendored
@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#define USING_LOG_PREFIX LIB_CHARSET
|
||||
#include <math.h>
|
||||
#include "lib/charset/ob_charset.h"
|
||||
#include "lib/utility/serialization.h"
|
||||
#include "lib/ob_define.h"
|
||||
|
1
deps/oblib/src/lib/json_type/ob_json_bin.h
vendored
1
deps/oblib/src/lib/json_type/ob_json_bin.h
vendored
@ -460,6 +460,7 @@ private:
|
||||
uint64_t new_val_entry_offset, uint64_t count, uint8_t var_type, int64_t st_pos,
|
||||
ObJsonBuffer &result, ObJBVerType cur_vertype, ObJBVerType dest_vertype) const;
|
||||
|
||||
//#define JB_PATH_NODE_LEN sizeof(struct ObJBNodeMeta)
|
||||
|
||||
void stack_update(ObJsonBuffer& stack, uint32_t idx, const ObJBNodeMeta& new_value);
|
||||
int stack_copy(ObJsonBuffer& src, ObJsonBuffer& dst);
|
||||
|
@ -13,7 +13,7 @@
|
||||
#ifndef __COMMON_OB_MYSQL_CONNECTION__
|
||||
#define __COMMON_OB_MYSQL_CONNECTION__
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/mysqlclient/ob_isql_connection.h"
|
||||
#include "lib/mysqlclient/ob_mysql_statement.h"
|
||||
#include "lib/container/ob_se_array.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#ifndef __COMMON_OB_MYSQL_CONNECTION_POOL__
|
||||
#define __COMMON_OB_MYSQL_CONNECTION_POOL__
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/container/ob_se_array.h"
|
||||
#include "lib/task/ob_timer.h"
|
||||
#include "lib/list/ob_list.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#define USING_LOG_PREFIX LIB_MYSQLC
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/ob_define.h"
|
||||
#include "lib/allocator/ob_malloc.h"
|
||||
#include "lib/mysqlclient/ob_mysql_prepared_statement.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#ifndef __OB_COMMON_SQLCLIENT_MYSQL_PREPARED_PARAM__
|
||||
#define __OB_COMMON_SQLCLIENT_MYSQL_PREPARED_PARAM__
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/string/ob_string.h"
|
||||
#include "lib/mysqlclient/ob_mysql_connection.h"
|
||||
#include "lib/mysqlclient/ob_mysql_result.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#define USING_LOG_PREFIX LIB_MYSQLC
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/ob_define.h"
|
||||
#include "lib/allocator/ob_malloc.h"
|
||||
#include "lib/mysqlclient/ob_mysql_prepared_result.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#ifndef __OB_COMMON_SQLCLIENT_OB_MYSQL_PREPARED_RESULT__
|
||||
#define __OB_COMMON_SQLCLIENT_OB_MYSQL_PREPARED_RESULT__
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/string/ob_string.h"
|
||||
#include "lib/mysqlclient/ob_mysql_connection.h"
|
||||
#include "lib/mysqlclient/ob_mysql_result.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#define USING_LOG_PREFIX LIB_MYSQLC
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/string/ob_string.h"
|
||||
#include "lib/mysqlclient/ob_mysql_connection.h"
|
||||
#include "lib/mysqlclient/ob_mysql_prepared_param.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#ifndef __OB_COMMON_SQLCLIENT_OB_MYSQL_PREPARED_STATEMENT__
|
||||
#define __OB_COMMON_SQLCLIENT_OB_MYSQL_PREPARED_STATEMENT__
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/string/ob_string.h"
|
||||
#include "lib/allocator/ob_malloc.h"
|
||||
#include "lib/mysqlclient/ob_mysql_connection.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#define USING_LOG_PREFIX LIB_MYSQLC
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/ob_define.h"
|
||||
#include "lib/mysqlclient/ob_mysql_result.h"
|
||||
#include "lib/mysqlclient/ob_mysql_statement.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#ifndef __OB_COMMON_SQLCLIENT_OB_MYSQL_RESULT__
|
||||
#define __OB_COMMON_SQLCLIENT_OB_MYSQL_RESULT__
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/mysqlclient/ob_mysql_result.h"
|
||||
#include "rpc/obmysql/ob_mysql_global.h"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#define USING_LOG_PREFIX LIB_MYSQLC
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/mysqlclient/ob_mysql_connection.h"
|
||||
#include "lib/mysqlclient/ob_mysql_result.h"
|
||||
#include "lib/mysqlclient/ob_mysql_statement.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#ifndef __COMMON_OB_SERVER_CONNECTION_POOL__
|
||||
#define __COMMON_OB_SERVER_CONNECTION_POOL__
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/lock/ob_spin_lock.h"
|
||||
#include "lib/mysqlclient/ob_connection_allocator.h"
|
||||
#include "lib/mysqlclient/ob_mysql_connection.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#ifndef OCEANBASE_SINGLE_MYSQL_CONNECTION_POOL_H_
|
||||
#define OCEANBASE_SINGLE_MYSQL_CONNECTION_POOL_H_
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include "lib/container/ob_se_array.h"
|
||||
#include "lib/list/ob_list.h"
|
||||
#include "lib/allocator/ob_cached_allocator.h"
|
||||
|
@ -314,8 +314,8 @@ else()
|
||||
PRIVATE
|
||||
-Wl,-z,notext
|
||||
"${ob_objects}" "${oblib_object_libraries}"
|
||||
-static-libgcc
|
||||
-static-libstdc++
|
||||
-lgcc
|
||||
-lstdc++
|
||||
ob_version
|
||||
ob_sql_server_parser_objects
|
||||
oblib easy)
|
||||
@ -340,6 +340,8 @@ target_link_libraries(observer
|
||||
ob_main
|
||||
-Wl,--start-group
|
||||
oceanbase_static
|
||||
-lgcc
|
||||
-lstdc++
|
||||
${link_malloc_hook}
|
||||
${LGPL_DEPS}
|
||||
oblib
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "lib/charset/ob_dtoa.h"
|
||||
#include "common/ob_field.h"
|
||||
#include "share/schema/ob_schema_getter_guard.h"
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
using namespace oceanbase::common;
|
||||
using namespace oceanbase::obmysql;
|
||||
|
@ -7476,7 +7476,7 @@ int ObDDLService::truncate_table_in_trans(const ObTableSchema &orig_table_schema
|
||||
}
|
||||
|
||||
bool is_truncate_table = false;
|
||||
bool recycle_cnt = 0;
|
||||
int recycle_cnt = 0;
|
||||
for (int64_t i = 0; i < table_schemas.count() && OB_SUCC(ret); i++) {
|
||||
if (0 == i) {
|
||||
is_truncate_table = true; // record create table with opertion type TRUNCATE_TABLE_CREATE
|
||||
|
@ -478,4 +478,10 @@ ob_server_add_pchs(share
|
||||
ob_common_rpc_proxy.h
|
||||
)
|
||||
|
||||
SET(GEN_ERRNO_SCRIPT ${CMAKE_SOURCE_DIR}/src/share/gen_errno.pl)
|
||||
execute_process(
|
||||
COMMAND perl ${GEN_ERRNO_SCRIPT}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/share
|
||||
)
|
||||
|
||||
ob_server_add_target(ob_share)
|
||||
|
@ -310,6 +310,11 @@ print $fh_cpp '/**
|
||||
#define NULL 0
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#define ER_KEY_COLUMN_DOES_NOT_EXITS -5211
|
||||
#define ER_DROP_PARTITION_NON_EXISTENT -5303
|
||||
#define ER_BLOB_CANT_HAVE_DEFAULT -5994
|
||||
|
||||
using namespace oceanbase::common;
|
||||
|
||||
// fix ob_error.cpp file requires at least 20g memory for release(-O2) compilation
|
||||
|
@ -13,13 +13,15 @@
|
||||
#ifndef _OBMYSQL_ERRNO_H_
|
||||
#define _OBMYSQL_ERRNO_H_
|
||||
|
||||
#include <mariadb/mysqld_error.h>
|
||||
#include <mysql/mysqld_error.h>
|
||||
|
||||
#define ER_AES_INVALID_IV 1882
|
||||
#define ER_OVERSIZE_NEED_RETRY 1887
|
||||
#define ER_AGGREGATE_ORDER_FOR_UNION 3028
|
||||
#define ER_INCORRECT_TYPE 3064
|
||||
#define ER_ACCOUNT_HAS_BEEN_LOCKED 3118
|
||||
#if !defined(ER_ACCOUNT_HAS_BEEN_LOCKED)
|
||||
# define ER_ACCOUNT_HAS_BEEN_LOCKED 3118
|
||||
#endif
|
||||
#define ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN 3105
|
||||
#define ER_DEPENDENT_BY_GENERATED_COLUMN 3108
|
||||
|
||||
|
14750
src/share/ob_errno.cpp
14750
src/share/ob_errno.cpp
File diff suppressed because it is too large
Load Diff
4187
src/share/ob_errno.h
4187
src/share/ob_errno.h
File diff suppressed because it is too large
Load Diff
@ -1172,8 +1172,9 @@ ob_server_add_pchs(sql
|
||||
|
||||
ob_server_add_target(ob_sql)
|
||||
|
||||
SET(GEN_PARSER_SCRIPT ${CMAKE_SOURCE_DIR}/src/sql/parser/gen_parser.sh)
|
||||
execute_process(
|
||||
COMMAND bash gen_parser.sh
|
||||
COMMAND bash ${GEN_PARSER_SCRIPT}
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/sql/parser
|
||||
OUTPUT_FILE _gen_parser.output
|
||||
ERROR_FILE _gen_parser.error)
|
||||
|
@ -8,17 +8,9 @@ set +x
|
||||
CURDIR="$(dirname $(readlink -f "$0"))"
|
||||
export PATH=$CURDIR/../../../deps/3rd/usr/local/oceanbase/devtools/bin:$PATH
|
||||
export BISON_PKGDATADIR=$CURDIR/../../../deps/3rd/usr/local/oceanbase/devtools/share/bison
|
||||
BISON_VERSION=`bison -V| grep 'bison (GNU Bison)'|awk '{ print $4;}'`
|
||||
NEED_VERSION='2.4.1'
|
||||
|
||||
if [ "$BISON_VERSION" != "$NEED_VERSION" ]; then
|
||||
echo "bison version not match, please use bison-$NEED_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# generate sql_parser
|
||||
bison -v -Werror -d ../../../src/sql/parser/sql_parser_mysql_mode.y -o ../../../src/sql/parser/sql_parser_mysql_mode_tab.c
|
||||
bison -v -d ../../../src/sql/parser/sql_parser_mysql_mode.y -o ../../../src/sql/parser/sql_parser_mysql_mode_tab.c
|
||||
BISON_RETURN="$?"
|
||||
if [ $BISON_RETURN -ne 0 ]
|
||||
then
|
||||
|
@ -9100,7 +9100,7 @@ table_factor %prec LOWER_COMMA
|
||||
natural_join_type:
|
||||
NATURAL outer_join_type
|
||||
{
|
||||
$$ = $2
|
||||
$$ = $2;
|
||||
}
|
||||
| NATURAL opt_inner JOIN
|
||||
{
|
||||
@ -12894,7 +12894,7 @@ FILE_ID opt_equal_mark INTNUM
|
||||
opt_file_id:
|
||||
file_id
|
||||
{
|
||||
$$ = $1
|
||||
$$ = $1;
|
||||
}
|
||||
|
|
||||
{
|
||||
|
@ -1,18 +1,28 @@
|
||||
message(STATUS "OB_BUILD_LIBOBLOG ${OB_BUILD_LIBOBLOG}")
|
||||
if (OB_BUILD_LIBOBLOG)
|
||||
find_package(Git QUIET)
|
||||
if (GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --remote
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if (NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(FATAL_ERROR "git submodule update --init --remote failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
|
||||
if( NOT EXISTS "${PROJECT_SOURCE_DIR}/deps/logmessage/.git" )
|
||||
message("not exists ${PROJECT_SOURCE_DIR}/deps/logmessage/.git")
|
||||
find_package(Git QUIET)
|
||||
if (GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --remote
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
RESULT_VARIABLE GIT_SUBMOD_RESULT)
|
||||
if (NOT GIT_SUBMOD_RESULT EQUAL "0")
|
||||
message(SEND_ERROR "git submodule update --init --remote failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
|
||||
endif()
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/deps/logmessage ${PROJECT_BINARY_DIR}/deps/logmessage EXCLUDE_FROM_ALL)
|
||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
else()
|
||||
message(SEND_ERROR "The git submodules are not available. Please run
|
||||
git submodule update --init --recursive"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/deps/logmessage ${PROJECT_BINARY_DIR}/deps/logmessage EXCLUDE_FROM_ALL)
|
||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/deps/logmessage ${PROJECT_BINARY_DIR}/deps/logmessage EXCLUDE_FROM_ALL)
|
||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
else()
|
||||
message("cannot find executable git")
|
||||
endif()
|
||||
endif()
|
||||
|
@ -110,7 +110,7 @@ set(SRC_LIST
|
||||
add_library(obcdc_objects OBJECT ${SRC_LIST})
|
||||
target_link_libraries(obcdc_objects PUBLIC obcdc_base)
|
||||
target_compile_definitions(obcdc_objects PRIVATE ENABLE_DEBUG_LOG)
|
||||
target_compile_options(obcdc_objects PRIVATE -Werror)
|
||||
#target_compile_options(obcdc_objects PRIVATE -Werror)
|
||||
|
||||
disable_pch(obcdc_objects)
|
||||
set(LGPL_DEPS "-L${DEP_DIR}/lib/mariadb -l:libmariadbclient.a -laio")
|
||||
|
@ -13,8 +13,8 @@
|
||||
#ifndef OCEANBASE_LIBOBLOG_OB_LOG_MYSQL_CONNECTOR_H_
|
||||
#define OCEANBASE_LIBOBLOG_OB_LOG_MYSQL_CONNECTOR_H_
|
||||
|
||||
#include <mariadb/mysql.h>
|
||||
#include <mariadb/errmsg.h>
|
||||
#include <mysql/mysql.h>
|
||||
#include <mysql/errmsg.h>
|
||||
|
||||
#include "share/ob_define.h" // OB_MAX_*
|
||||
#include "lib/utility/ob_print_utils.h" // TO_STRING_KV
|
||||
|
Reference in New Issue
Block a user