reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -35,7 +35,7 @@ namespace schema {
// 2. create OceanBase system table schema in mysql server.
//
class DBInitializer {
public:
public:
DBInitializer()
{}
virtual ~DBInitializer();
@ -59,7 +59,7 @@ class DBInitializer {
return common::ObServerConfig::get_instance();
}
private:
private:
struct DBConfig {
std::string host_;
int port_;

View File

@ -24,7 +24,7 @@ namespace share {
namespace schema {
class MockMultiVersionSchemaServiceForFallback : public ObMultiVersionSchemaService {
public:
public:
MockMultiVersionSchemaServiceForFallback()
{
baseline_schema_version_ = 0;

View File

@ -19,7 +19,7 @@ namespace oceanbase {
namespace share {
namespace schema {
class MockObSchemaFetcher : public ObSchemaFetcher {
public:
public:
MOCK_METHOD2(init, int(ObSchemaService*, common::ObISQLClient*));
MOCK_METHOD5(fetch_schema, int(ObSchemaType, uint64_t, int64_t, common::ObIAllocator&, ObSchema*&));
MOCK_METHOD4(fetch_tenant_schema, int(uint64_t, int64_t, common::ObIAllocator&, ObTenantSchema*&));

View File

@ -32,7 +32,7 @@ namespace share {
namespace schema {
class MockObTableSchema : public ObTableSchema {
public:
public:
MockObTableSchema(common::ObIAllocator* allocator) : ObTableSchema(allocator)
{}
MockObTableSchema()
@ -52,7 +52,7 @@ class MockSchemaService : public ObMultiVersionSchemaService {
typedef common::hash::ObHashMap<ObSchemaCacheKey, const ObSchemaCacheValue*, common::hash::NoPthreadDefendMode>
NoSwapCache;
public:
public:
MockSchemaService()
{}
virtual ~MockSchemaService()
@ -311,7 +311,7 @@ class MockSchemaService : public ObMultiVersionSchemaService {
return ret;
}
private:
private:
int convert_to_simple_schema(const ObTenantSchema& schema, ObSimpleTenantSchema& simple_schema)
{
int ret = OB_SUCCESS;
@ -441,7 +441,7 @@ class MockSchemaService : public ObMultiVersionSchemaService {
return ret;
}
private:
private:
ObSchemaMgr mgr_;
NoSwapCache cache_;
};

View File

@ -342,7 +342,7 @@ bool operator<(const ObDatabaseSchema& lv, const ObDatabaseSchema& rv)
};
class ObSchemaTestUtils {
public:
public:
static void assert_view_equal(const ObViewSchema& l_view, const ObViewSchema& r_view);
static void assert_expire_condition_equal(const ObString& l_ec, const ObString& r_ec);
static void assert_tg_equal(const ObTablegroupSchema& l_tg, const ObTablegroupSchema& r_tg);

View File

@ -87,7 +87,7 @@ namespace schema {
table_priv.set_schema_version(schema_version);
class SchemaTestUtils {
public:
public:
SchemaTestUtils()
{}
virtual ~SchemaTestUtils()
@ -140,7 +140,7 @@ class SchemaTestUtils {
a.get_priv_set() == b.get_priv_set() && a.get_schema_version() == b.get_schema_version();
}
private:
private:
};
} // namespace schema

View File

@ -123,7 +123,7 @@ static uint64_t& TID = FakePartPropertyGetter::TID();
static int64_t& PID = FakePartPropertyGetter::PID();
class ObFakeCB : public ObIStatusChangeCallback {
public:
public:
ObFakeCB()
{}
int wakeup_balancer()
@ -151,7 +151,7 @@ class ObFakeCB : public ObIStatusChangeCallback {
}
};
class MockLocalityManager : public ObILocalityManager {
public:
public:
struct ServerInfo {
ServerInfo() : server_(), is_local_(false)
{}
@ -185,7 +185,7 @@ class MockLocalityManager : public ObILocalityManager {
};
class ObFakeServerChangeCB : public ObIServerChangeCallback {
public:
public:
ObFakeServerChangeCB()
{}
virtual ~ObFakeServerChangeCB()
@ -204,17 +204,17 @@ class ObFakeServerChangeCB : public ObIServerChangeCallback {
}
class TestDDL : public ::testing::Test {
public:
public:
TestDDL();
virtual ~TestDDL();
virtual void SetUp();
virtual void TearDown();
private:
private:
// disallow copy
DISALLOW_COPY_AND_ASSIGN(TestDDL);
protected:
protected:
// function members
void fill_tenant_schema(const uint64_t tenant_id, const char* tenant_name, ObTenantSchema& tenant_schema);
int create_tenant(ObMySQLTransaction& trans, const uint64_t tenant_id);
@ -261,7 +261,7 @@ class TestDDL : public ::testing::Test {
void do_print_tenant_schema(const uint64_t tenant_id, std::ofstream& of_tenant);
void do_print_schema(ObStmt* stmt, std::ofstream& of_tmp);
protected:
protected:
// table id
// uint64_t next_user_table_id_;
hash::ObHashMap<uint64_t, uint64_t> next_user_table_id_map_;

View File

@ -21,7 +21,7 @@ namespace schema {
using namespace common;
class TestFallbackSchemaMgr : public ::testing::Test {
public:
public:
virtual void SetUp()
{}
virtual void TearDown()
@ -58,7 +58,7 @@ TEST_F(TestFallbackSchemaMgr, fallback_schema_for_liboblog)
static int64_t global_version = 1;
class Worker : public share::ObThreadPool {
public:
public:
void run1()
{

View File

@ -26,12 +26,12 @@ using namespace common;
namespace share {
namespace schema {
class TestPrivMgr : public ::testing::Test {
public:
public:
virtual void SetUp();
virtual void TearDown()
{}
protected:
protected:
ObPrivMgr priv_mgr_;
};

View File

@ -31,7 +31,7 @@ namespace share {
namespace schema {
class GetBatchSchemasFuncs0 {
public:
public:
// return non schema
int get_batch_tenants(const int64_t schema_version, ObArray<uint64_t>& tenant_ids, ObISQLClient& client,
ObIArray<ObTenantSchema>& tenant_infos)
@ -102,7 +102,7 @@ class GetBatchSchemasFuncs0 {
};
class GetBatchSchemasFuncs1 {
public:
public:
// return one schema
int get_batch_tenants(const int64_t schema_version, ObArray<uint64_t>& tenant_ids, ObISQLClient& client,
ObIArray<ObTenantSchema>& tenant_infos)
@ -197,11 +197,11 @@ class GetBatchSchemasFuncs1 {
};
class TestSchemaCache : public ::testing::Test {
public:
public:
virtual void SetUp();
virtual void TearDown();
private:
private:
GetBatchSchemasFuncs0 get_batch_schemas_funcs0;
GetBatchSchemasFuncs1 get_batch_schemas_funcs1;
};
@ -399,7 +399,7 @@ using ::testing::_;
using ::testing::Invoke;
using ::testing::Return;
class MockSchemaServiceSQLImpl : public ObSchemaServiceSQLImpl {
public:
public:
MOCK_METHOD4(get_batch_tenants, int(const int64_t, ObArray<uint64_t>&, ObISQLClient&, ObIArray<ObTenantSchema>&));
MOCK_METHOD4(get_batch_users, int(const int64_t, ObArray<uint64_t>&, ObISQLClient&, ObIArray<ObUserInfo>&));
MOCK_METHOD4(get_batch_databases, int(const int64_t, ObArray<uint64_t>&, ObISQLClient&, ObIArray<ObDatabaseSchema>&));

View File

@ -110,7 +110,7 @@ static void consume(ObSchemaMgrCache* mgr_cache)
}
class Consumer : public share::ObThreadPool {
public:
public:
void run1()
{
@ -120,7 +120,7 @@ class Consumer : public share::ObThreadPool {
};
class Refresher : public share::ObThreadPool {
public:
public:
void run1()
{
@ -164,7 +164,7 @@ TEST_F(TestSchemaMgrCache, multithread_put_and_get)
}
class Refresher2 : public share::ObThreadPool {
public:
public:
void run1()
{

View File

@ -30,7 +30,7 @@ using namespace common;
const int64_t BUFF_SIZE = 10240;
class TestSchemaService : public ::testing::Test {
public:
public:
virtual void SetUp()
{}
virtual void TearDown()

View File

@ -41,7 +41,7 @@ using namespace std;
#define IO_CNT 1
class QHandler : public ObiReqQHandler {
public:
public:
QHandler(ObMultiVersionSchemaService* schema_service) : mp_(schema_service)
{
mp_.init();
@ -72,14 +72,14 @@ class QHandler : public ObiReqQHandler {
return true;
}
private:
private:
ObGetAllSchemaP mp_;
ObRpcSessionHandler shandler_;
ObRpcReqContext ctx_;
};
class ObTestDeliver : public rpc::frame::ObReqDeliver {
public:
public:
ObTestDeliver(ObMultiVersionSchemaService* schema_service) : handler_(schema_service)
{}
int init()
@ -101,13 +101,13 @@ class ObTestDeliver : public rpc::frame::ObReqDeliver {
queue_.wait();
}
protected:
protected:
ObReqQueueThread queue_;
QHandler handler_;
};
class TestSchemaServiceRpcProxy : public ::testing::Test {
public:
public:
TestSchemaServiceRpcProxy() : port_(3100), handler_(server_), server_(&schema_service_), transport_(NULL)
{}
@ -199,7 +199,7 @@ class TestSchemaServiceRpcProxy : public ::testing::Test {
return transport_->send(req, res);
}
protected:
protected:
int port_;
rpc::frame::ObNetEasy net_;
obrpc::ObRpcHandler handler_;

View File

@ -32,10 +32,10 @@ namespace share {
namespace schema {
class TestSchemaUtils : public ::testing::Test {
public:
public:
virtual void SetUp();
private:
private:
};
void TestSchemaUtils::SetUp()

View File

@ -25,7 +25,7 @@ namespace share {
namespace schema {
using namespace common;
class TestServerSchemaService : public ::testing::Test {
public:
public:
virtual void SetUp();
virtual void TearDown()
{}

View File

@ -26,7 +26,7 @@ class ObOldTableSchemaParam {
typedef common::ObFixedArray<ObColumnParam*, common::ObIAllocator> Columns;
OB_UNIS_VERSION_V(1);
public:
public:
explicit ObOldTableSchemaParam(common::ObIAllocator& allocator);
virtual ~ObOldTableSchemaParam();
void reset();

View File

@ -27,7 +27,7 @@ using namespace common;
namespace share {
namespace schema {
class TestTableIterator : public ::testing::Test {
public:
public:
virtual void SetUp();
virtual void TearDown()
{}