From 4177759770dc7f89f0bbe689b3c1e7fd0e40d6e6 Mon Sep 17 00:00:00 2001 From: wenxingsen Date: Fri, 20 May 2022 14:31:30 +0800 Subject: [PATCH] add no_untiy entrance for build.sh and fix build error without unity --- build.sh | 6 ++++++ deps/oblib/src/lib/json_type/ob_json_bin.cpp | 2 +- deps/oblib/src/lib/oblog/ob_async_log_struct.cpp | 1 - src/observer/mysql/obsm_utils.cpp | 1 + src/share/backup/ob_backup_archive_log_round_stat.cpp | 3 +++ src/share/backup/ob_backup_backuppiece_operator.cpp | 1 + src/share/backup/ob_backup_backuppiece_operator.h | 1 + src/share/backup/ob_backup_backupset_operator.h | 7 ++----- src/share/backup/ob_physical_restore_table_operator.cpp | 2 ++ src/share/schema/ob_schema_printer.h | 1 + 10 files changed, 18 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index 897b1bb847..ec4b45074a 100755 --- a/build.sh +++ b/build.sh @@ -112,9 +112,15 @@ function build xrelease) do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo ;; + xrelease_no_unity) + do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_ENABLE_UNITY=OFF -DOB_ENABLE_PCH=OFF + ;; xdebug) do_build "$@" -DCMAKE_BUILD_TYPE=Debug ;; + xdebug_no_unity) + do_build "$@" -DCMAKE_BUILD_TYPE=Debug -DOB_ENABLE_UNITY=OFF -DOB_ENABLE_PCH=OFF + ;; xrpm) do_build "$@" -DOB_BUILD_RPM=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_USE_CCACHE=OFF -DOB_COMPRESS_DEBUG_SECTIONS=ON -DOB_STATIC_LINK_LGPL_DEPS=OFF ;; diff --git a/deps/oblib/src/lib/json_type/ob_json_bin.cpp b/deps/oblib/src/lib/json_type/ob_json_bin.cpp index ecc360c1ce..b66acad5a6 100644 --- a/deps/oblib/src/lib/json_type/ob_json_bin.cpp +++ b/deps/oblib/src/lib/json_type/ob_json_bin.cpp @@ -4325,7 +4325,7 @@ int ObJsonVar::read_var(const char *data, uint8_t type, int64_t *var) uint64_t ObJsonVar::var_int2uint(int64_t var) { ObJsonBinLenSize size = static_cast(ObJsonVar::get_var_type(var)); - uint64 val = 0; + uint64_t val = 0; switch (size) { case JBLS_UINT8: { val = static_cast(static_cast(var)); diff --git a/deps/oblib/src/lib/oblog/ob_async_log_struct.cpp b/deps/oblib/src/lib/oblog/ob_async_log_struct.cpp index 31cf9e4349..2e5562ad56 100644 --- a/deps/oblib/src/lib/oblog/ob_async_log_struct.cpp +++ b/deps/oblib/src/lib/oblog/ob_async_log_struct.cpp @@ -13,7 +13,6 @@ #include "ob_async_log_struct.h" #include "lib/objectpool/ob_concurrency_objpool.h" -using namespace obutil; namespace oceanbase { namespace common { ObPLogItem::ObPLogItem() diff --git a/src/observer/mysql/obsm_utils.cpp b/src/observer/mysql/obsm_utils.cpp index 62a8e32d59..1fb418ce29 100644 --- a/src/observer/mysql/obsm_utils.cpp +++ b/src/observer/mysql/obsm_utils.cpp @@ -16,6 +16,7 @@ #include "lib/charset/ob_dtoa.h" #include "common/ob_field.h" #include "share/schema/ob_schema_getter_guard.h" +#include using namespace oceanbase::common; using namespace oceanbase::obmysql; diff --git a/src/share/backup/ob_backup_archive_log_round_stat.cpp b/src/share/backup/ob_backup_archive_log_round_stat.cpp index e831995251..4fd08928dc 100644 --- a/src/share/backup/ob_backup_archive_log_round_stat.cpp +++ b/src/share/backup/ob_backup_archive_log_round_stat.cpp @@ -15,6 +15,9 @@ #include "share/backup/ob_backup_path.h" #include "lib/lock/ob_lock_guard.h" #include +#include "lib/container/ob_array.h" +#include "lib/container/ob_array_iterator.h" + using namespace oceanbase::common; using namespace oceanbase::lib; diff --git a/src/share/backup/ob_backup_backuppiece_operator.cpp b/src/share/backup/ob_backup_backuppiece_operator.cpp index 992e6325d2..4fdd75b42c 100644 --- a/src/share/backup/ob_backup_backuppiece_operator.cpp +++ b/src/share/backup/ob_backup_backuppiece_operator.cpp @@ -13,6 +13,7 @@ #define USING_LOG_PREFIX SHARE #include "share/backup/ob_backup_backuppiece_operator.h" #include "share/inner_table/ob_inner_table_schema_constants.h" +#include "lib/mysqlclient/ob_mysql_proxy.h" using namespace oceanbase::share; diff --git a/src/share/backup/ob_backup_backuppiece_operator.h b/src/share/backup/ob_backup_backuppiece_operator.h index 7c9e12aed3..ffa846c94c 100644 --- a/src/share/backup/ob_backup_backuppiece_operator.h +++ b/src/share/backup/ob_backup_backuppiece_operator.h @@ -16,6 +16,7 @@ #include "share/backup/ob_backup_struct.h" #include "share/ob_dml_sql_splicer.h" #include "lib/string/ob_sql_string.h" +#include "lib/mysqlclient/ob_mysql_result.h" namespace oceanbase { namespace share { diff --git a/src/share/backup/ob_backup_backupset_operator.h b/src/share/backup/ob_backup_backupset_operator.h index 42f2fbc220..8d568b0bfc 100644 --- a/src/share/backup/ob_backup_backupset_operator.h +++ b/src/share/backup/ob_backup_backupset_operator.h @@ -1,8 +1,4 @@ // Copyright 2020 Alibaba Inc. All Rights Reserved -// Author: -// yanfeng -// Normalizer: -// yanfeng #ifndef OCEANBASE_SHARE_BACKUP_OB_BACKUP_BACKUPSET_OPERATOR_H_ #define OCEANBASE_SHARE_BACKUP_OB_BACKUP_BACKUPSET_OPERATOR_H_ @@ -10,6 +6,7 @@ #include "share/ob_dml_sql_splicer.h" #include "share/backup/ob_backup_struct.h" #include "lib/string/ob_sql_string.h" +#include "lib/mysqlclient/ob_mysql_result.h" namespace oceanbase { namespace share { @@ -114,7 +111,7 @@ public: static int delete_task_item(const ObTenantBackupBackupsetTaskItem& task_item, common::ObISQLClient& client); static int get_max_succeed_task(const uint64_t tenant_id, const int64_t copy_id, ObTenantBackupBackupsetTaskItem& item, common::ObISQLClient& client); - // 支持换backup backup dest + // support to replace backup backup dest static int get_same_backup_set_id_tasks(const bool is_tenant_level, const uint64_t tenant_id, const int64_t backup_set_id, common::ObIArray& items, common::ObISQLClient& client); diff --git a/src/share/backup/ob_physical_restore_table_operator.cpp b/src/share/backup/ob_physical_restore_table_operator.cpp index 6fa2f86bc1..a9d6e4bd99 100644 --- a/src/share/backup/ob_physical_restore_table_operator.cpp +++ b/src/share/backup/ob_physical_restore_table_operator.cpp @@ -22,6 +22,8 @@ #include "rootserver/ob_rs_job_table_operator.h" #include "share/backup/ob_backup_path.h" #include +#include "lib/container/ob_array.h" +#include "lib/container/ob_array_iterator.h" using namespace oceanbase::common; using namespace oceanbase::share; diff --git a/src/share/schema/ob_schema_printer.h b/src/share/schema/ob_schema_printer.h index f14241c6ea..fd491304d8 100644 --- a/src/share/schema/ob_schema_printer.h +++ b/src/share/schema/ob_schema_printer.h @@ -16,6 +16,7 @@ #include "share/ob_define.h" #include "lib/container/ob_iarray.h" #include "share/schema/ob_schema_struct.h" +#include "common/sql_mode/ob_sql_mode.h" namespace oceanbase { namespace common { -- GitLab