Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
obproxy
提交
4f40b15c
O
obproxy
项目概览
oceanbase
/
obproxy
大约 2 年 前同步成功
通知
11
Star
100
Fork
70
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obproxy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4f40b15c
编写于
6月 03, 2021
作者:
W
wgs13579
提交者:
guangshu.wgs
6月 07, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
code format for variable+equal
上级
2d514853
变更
54
显示空白变更内容
内联
并排
Showing
54 changed file
with
1860 addition
and
1861 deletion
+1860
-1861
src/common/cache/ob_kv_storecache.h
src/common/cache/ob_kv_storecache.h
+3
-3
src/common/ob_cost_consts_def.h
src/common/ob_cost_consts_def.h
+118
-118
src/common/ob_obj_type.h
src/common/ob_obj_type.h
+15
-15
src/common/ob_string_buf.ipp
src/common/ob_string_buf.ipp
+1
-1
src/lib/alloc/achunk_mgr.h
src/lib/alloc/achunk_mgr.h
+1
-1
src/lib/alloc/alloc_struct.h
src/lib/alloc/alloc_struct.h
+22
-22
src/lib/encrypt/ob_encrypted_helper.cpp
src/lib/encrypt/ob_encrypted_helper.cpp
+1
-1
src/lib/net/tbnetutil.cpp
src/lib/net/tbnetutil.cpp
+0
-3
src/lib/ob_define.h
src/lib/ob_define.h
+505
-505
src/lib/oblog/ob_trace_log.cpp
src/lib/oblog/ob_trace_log.cpp
+1
-1
src/lib/time/ob_time_utility.cpp
src/lib/time/ob_time_utility.cpp
+6
-6
src/lib/timezone/ob_time_convert.cpp
src/lib/timezone/ob_time_convert.cpp
+5
-5
src/lib/utility/serialization.h
src/lib/utility/serialization.h
+61
-61
src/obproxy/cmd/ob_show_config_handler.cpp
src/obproxy/cmd/ob_show_config_handler.cpp
+7
-7
src/obproxy/cmd/ob_show_session_handler.cpp
src/obproxy/cmd/ob_show_session_handler.cpp
+4
-4
src/obproxy/dbconfig/ob_proxy_db_config_info.cpp
src/obproxy/dbconfig/ob_proxy_db_config_info.cpp
+87
-87
src/obproxy/dbconfig/ob_proxy_pb_utils.cpp
src/obproxy/dbconfig/ob_proxy_pb_utils.cpp
+8
-8
src/obproxy/engine/ob_proxy_operator_result.h
src/obproxy/engine/ob_proxy_operator_result.h
+1
-1
src/obproxy/iocore/eventsystem/ob_event.h
src/obproxy/iocore/eventsystem/ob_event.h
+1
-1
src/obproxy/iocore/eventsystem/ob_event_processor.h
src/obproxy/iocore/eventsystem/ob_event_processor.h
+2
-2
src/obproxy/iocore/eventsystem/ob_thread.h
src/obproxy/iocore/eventsystem/ob_thread.h
+1
-1
src/obproxy/iocore/eventsystem/ob_thread_allocator.h
src/obproxy/iocore/eventsystem/ob_thread_allocator.h
+3
-3
src/obproxy/iocore/net/ob_connection.cpp
src/obproxy/iocore/net/ob_connection.cpp
+3
-3
src/obproxy/iocore/net/ob_inet.h
src/obproxy/iocore/net/ob_inet.h
+4
-27
src/obproxy/ob_proxy_main.cpp
src/obproxy/ob_proxy_main.cpp
+3
-3
src/obproxy/obutils/ob_async_common_task.cpp
src/obproxy/obutils/ob_async_common_task.cpp
+1
-1
src/obproxy/obutils/ob_mt_hashtable.h
src/obproxy/obutils/ob_mt_hashtable.h
+3
-3
src/obproxy/obutils/ob_proxy_config_processor.cpp
src/obproxy/obutils/ob_proxy_config_processor.cpp
+35
-35
src/obproxy/obutils/ob_proxy_config_utils.cpp
src/obproxy/obutils/ob_proxy_config_utils.cpp
+4
-4
src/obproxy/obutils/ob_proxy_config_utils.h
src/obproxy/obutils/ob_proxy_config_utils.h
+4
-4
src/obproxy/obutils/ob_proxy_json_config_info.cpp
src/obproxy/obutils/ob_proxy_json_config_info.cpp
+35
-35
src/obproxy/obutils/ob_proxy_sequence_utils.cpp
src/obproxy/obutils/ob_proxy_sequence_utils.cpp
+3
-3
src/obproxy/obutils/ob_proxy_sql_parser.h
src/obproxy/obutils/ob_proxy_sql_parser.h
+6
-6
src/obproxy/obutils/ob_proxy_table_processor.h
src/obproxy/obutils/ob_proxy_table_processor.h
+3
-3
src/obproxy/obutils/ob_proxy_table_processor_utils.cpp
src/obproxy/obutils/ob_proxy_table_processor_utils.cpp
+2
-2
src/obproxy/obutils/ob_resource_pool_processor.cpp
src/obproxy/obutils/ob_resource_pool_processor.cpp
+5
-5
src/obproxy/obutils/ob_server_state_processor.cpp
src/obproxy/obutils/ob_server_state_processor.cpp
+5
-5
src/obproxy/proxy/client/ob_client_vc.cpp
src/obproxy/proxy/client/ob_client_vc.cpp
+2
-2
src/obproxy/proxy/mysql/ob_mysql_sm.h
src/obproxy/proxy/mysql/ob_mysql_sm.h
+2
-2
src/obproxy/proxy/mysqllib/ob_mysql_common_define.h
src/obproxy/proxy/mysqllib/ob_mysql_common_define.h
+22
-22
src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp
src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp
+1
-1
src/obproxy/proxy/route/ob_ldc_struct.h
src/obproxy/proxy/route/ob_ldc_struct.h
+73
-73
src/obproxy/proxy/route/ob_route_utils.cpp
src/obproxy/proxy/route/ob_route_utils.cpp
+9
-9
src/obproxy/stat/ob_stat_processor.cpp
src/obproxy/stat/ob_stat_processor.cpp
+5
-5
src/obproxy/utils/ob_proxy_blowfish.cpp
src/obproxy/utils/ob_proxy_blowfish.cpp
+98
-64
src/obproxy/utils/ob_proxy_lib.h
src/obproxy/utils/ob_proxy_lib.h
+158
-158
src/obproxy/utils/ob_proxy_table_define.cpp
src/obproxy/utils/ob_proxy_table_define.cpp
+23
-24
src/obproxy/utils/ob_proxy_table_define.h
src/obproxy/utils/ob_proxy_table_define.h
+0
-1
src/share/inner_table/ob_inner_table_schema.h
src/share/inner_table/ob_inner_table_schema.h
+1
-1
src/share/inner_table/ob_inner_table_schema_constants.h
src/share/inner_table/ob_inner_table_schema_constants.h
+462
-462
src/share/schema/ob_column_schema.h
src/share/schema/ob_column_schema.h
+14
-14
unittest/obproxy/parser/runner.py
unittest/obproxy/parser/runner.py
+1
-1
unittest/obproxy/test_config_server_processor.cpp
unittest/obproxy/test_config_server_processor.cpp
+19
-26
unittest/obproxy/test_proxy_session_info.cpp
unittest/obproxy/test_proxy_session_info.cpp
+1
-1
未找到文件。
src/common/cache/ob_kv_storecache.h
浏览文件 @
4f40b15c
src/common/ob_cost_consts_def.h
浏览文件 @
4f40b15c
src/common/ob_obj_type.h
浏览文件 @
4f40b15c
src/common/ob_string_buf.ipp
浏览文件 @
4f40b15c
src/lib/alloc/achunk_mgr.h
浏览文件 @
4f40b15c
src/lib/alloc/alloc_struct.h
浏览文件 @
4f40b15c
src/lib/encrypt/ob_encrypted_helper.cpp
浏览文件 @
4f40b15c
src/lib/net/tbnetutil.cpp
浏览文件 @
4f40b15c
...
...
@@ -81,9 +81,6 @@ bool CNetUtil::isLocalAddr(uint32_t ip, bool loopSkip)
return
false
;
}
/**
* 10.0.100.89 => 1499725834
*/
uint32_t
CNetUtil
::
getAddr
(
const
char
*
ip
)
{
if
(
ip
==
NULL
)
return
0
;
...
...
src/lib/ob_define.h
浏览文件 @
4f40b15c
src/lib/oblog/ob_trace_log.cpp
浏览文件 @
4f40b15c
src/lib/time/ob_time_utility.cpp
浏览文件 @
4f40b15c
src/lib/timezone/ob_time_convert.cpp
浏览文件 @
4f40b15c
src/lib/utility/serialization.h
浏览文件 @
4f40b15c
src/obproxy/cmd/ob_show_config_handler.cpp
浏览文件 @
4f40b15c
src/obproxy/cmd/ob_show_session_handler.cpp
浏览文件 @
4f40b15c
src/obproxy/dbconfig/ob_proxy_db_config_info.cpp
浏览文件 @
4f40b15c
src/obproxy/dbconfig/ob_proxy_pb_utils.cpp
浏览文件 @
4f40b15c
src/obproxy/engine/ob_proxy_operator_result.h
浏览文件 @
4f40b15c
src/obproxy/iocore/eventsystem/ob_event.h
浏览文件 @
4f40b15c
src/obproxy/iocore/eventsystem/ob_event_processor.h
浏览文件 @
4f40b15c
src/obproxy/iocore/eventsystem/ob_thread.h
浏览文件 @
4f40b15c
src/obproxy/iocore/eventsystem/ob_thread_allocator.h
浏览文件 @
4f40b15c
src/obproxy/iocore/net/ob_connection.cpp
浏览文件 @
4f40b15c
src/obproxy/iocore/net/ob_inet.h
浏览文件 @
4f40b15c
...
...
@@ -511,10 +511,7 @@ inline bool ops_is_ip_private(const sockaddr &ip)
bool
zret
=
false
;
if
(
ops_is_ip4
(
ip
))
{
in_addr_t
a
=
ops_ip4_addr_cast
(
ip
);
zret
=
((
a
&
htonl
(
0xFF000000
))
==
htonl
(
0x0A000000
))
// 10.0.0.0/8
||
((
a
&
htonl
(
0xFFC00000
))
==
htonl
(
0x64400000
))
// 100.64.0.0/10
||
((
a
&
htonl
(
0xFFF00000
))
==
htonl
(
0xAC100000
))
// 172.16.0.0/12
||
((
a
&
htonl
(
0xFFFF0000
))
==
htonl
(
0xC0A80000
));
// 192.168.0.0/16
zret
=
((
a
&
htonl
(
0xFFFF0000
))
==
htonl
(
0xC0A80000
));
// 192.168.0.0/16
}
else
if
(
ops_is_ip6
(
ip
))
{
in6_addr
a
=
ops_ip6_addr_cast
(
ip
);
zret
=
((
a
.
s6_addr
[
0
]
&
0xFE
)
==
0xFC
);
// fc00::/7
...
...
@@ -527,26 +524,6 @@ inline bool ops_is_ip_private(const ObIpEndpoint &ip)
return
ops_is_ip_private
(
ip
.
sa_
);
}
// Check for Link Local.
// @return @true if ip is link local.
inline
bool
ops_is_ip_linklocal
(
const
sockaddr
&
ip
)
{
bool
zret
=
false
;
if
(
ops_is_ip4
(
ip
))
{
in_addr_t
a
=
ops_ip4_addr_cast
(
ip
);
zret
=
((
a
&
htonl
(
0xFFFF0000
))
==
htonl
(
0xA9FE0000
));
// 169.254.0.0/16
}
else
if
(
ops_is_ip6
(
ip
))
{
in6_addr
a
=
ops_ip6_addr_cast
(
ip
);
zret
=
((
a
.
s6_addr
[
0
]
==
0xFE
)
&&
((
a
.
s6_addr
[
1
]
&
0xC0
)
==
0x80
));
// fe80::/10
}
return
zret
;
}
inline
bool
ops_is_ip_linklocal
(
const
ObIpEndpoint
&
ip
)
{
return
ops_is_ip_linklocal
(
ip
.
sa_
);
}
// Check for being "any" address.
// @return true if ip is the any / unspecified address.
inline
bool
ops_is_ip_any
(
const
sockaddr
&
ip
)
...
...
src/obproxy/ob_proxy_main.cpp
浏览文件 @
4f40b15c
...
...
@@ -146,8 +146,8 @@ void ObProxyMain::print_usage() const
MPRINT
(
" -t,--regression_test TEST_NAME regression test"
);
MPRINT
(
"example:"
);
MPRINT
(
" run without config server:"
);
MPRINT
(
" ./bin/obproxy -p6789 -r'
10.125.224.11:26506;10.125.224.22:26577
' -n test -o enable_cluster_checkout=false,syslog_level=INFO"
);
MPRINT
(
" OR ./bin/obproxy -p6789 -r'
10.125.224.11:26506;10.125.224.22:26577
' -c 'ob_test' -n test -o syslog_level=INFO
\n
"
);
MPRINT
(
" ./bin/obproxy -p6789 -r'
ip:port;ip:port
' -n test -o enable_cluster_checkout=false,syslog_level=INFO"
);
MPRINT
(
" OR ./bin/obproxy -p6789 -r'
ip:port;ip:port
' -c 'ob_test' -n test -o syslog_level=INFO
\n
"
);
MPRINT
(
" run with config server:"
);
MPRINT
(
" ./bin/obproxy -p6789 -e -n test -o obproxy_config_server_url='your config url',syslog_level=INFO
\n
"
);
MPRINT
(
" Non-first start with local config file:"
);
...
...
@@ -155,7 +155,7 @@ void ObProxyMain::print_usage() const
MPRINT
(
" dump config update sql:"
);
MPRINT
(
" ./bin/obproxy -d
\n
"
);
MPRINT
(
" run regression tests:"
);
MPRINT
(
" ./bin/obproxy -p6789 -r
10.125.224.11:26506
-ntest -o obproxy_config_server_url='' -t ''"
);
MPRINT
(
" ./bin/obproxy -p6789 -r
ip:port
-ntest -o obproxy_config_server_url='' -t ''"
);
MPRINT
(
"----------------------------------------------------------------------------------"
);
}
...
...
src/obproxy/obutils/ob_async_common_task.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_mt_hashtable.h
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_config_processor.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_config_utils.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_config_utils.h
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_json_config_info.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_sequence_utils.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_sql_parser.h
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_table_processor.h
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_proxy_table_processor_utils.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_resource_pool_processor.cpp
浏览文件 @
4f40b15c
src/obproxy/obutils/ob_server_state_processor.cpp
浏览文件 @
4f40b15c
src/obproxy/proxy/client/ob_client_vc.cpp
浏览文件 @
4f40b15c
src/obproxy/proxy/mysql/ob_mysql_sm.h
浏览文件 @
4f40b15c
src/obproxy/proxy/mysqllib/ob_mysql_common_define.h
浏览文件 @
4f40b15c
src/obproxy/proxy/mysqllib/ob_proxy_session_info_handler.cpp
浏览文件 @
4f40b15c
src/obproxy/proxy/route/ob_ldc_struct.h
浏览文件 @
4f40b15c
src/obproxy/proxy/route/ob_route_utils.cpp
浏览文件 @
4f40b15c
src/obproxy/stat/ob_stat_processor.cpp
浏览文件 @
4f40b15c
src/obproxy/utils/ob_proxy_blowfish.cpp
浏览文件 @
4f40b15c
...
...
@@ -8,6 +8,25 @@
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*
* *************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#define USING_LOG_PREFIX PROXY
...
...
@@ -21,63 +40,7 @@ namespace oceanbase
{
namespace
obproxy
{
const
char
*
ObBlowFish
::
ENC_KEY_BYTES_PROD_STR
=
"gQzLk5tTcGYlQ47GG29xQxfbHIURCheJ"
;
int
ObBlowFish
::
encode
(
char
*
in
,
const
int64_t
in_len
,
char
*
out
,
const
int64_t
out_len
)
{
int
ret
=
OB_SUCCESS
;
if
(
OB_ISNULL
(
in
)
||
OB_ISNULL
(
out
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
in
),
K
(
out
),
K
(
in_len
),
K
(
out_len
),
K
(
ret
));
}
else
{
char
tmp_out
[
OB_MAX_PASSWORD_LENGTH
];
memset
(
tmp_out
,
0
,
sizeof
(
tmp_out
));
int64_t
in_str_len
=
strlen
(
in
);
int64_t
padding_len
=
BF_BLOCK
-
in_str_len
%
BF_BLOCK
;
if
(
OB_UNLIKELY
(
in_str_len
+
padding_len
>=
in_len
))
{
ret
=
OB_SIZE_OVERFLOW
;
LOG_WARN
(
"in buffer size is not enough"
,
K
(
padding_len
),
K
(
in
),
K
(
in_len
),
K
(
ret
));
}
else
{
for
(
int64_t
i
=
in_str_len
;
i
<
in_str_len
+
padding_len
;
++
i
)
{
in
[
i
]
=
static_cast
<
char
>
(
padding_len
);
}
if
(
OB_FAIL
(
do_bf_ecb_encrypt
(
reinterpret_cast
<
const
unsigned
char
*>
(
in
),
in_str_len
+
padding_len
,
reinterpret_cast
<
unsigned
char
*>
(
tmp_out
),
OB_MAX_PASSWORD_LENGTH
,
BF_ENCRYPT
)))
{
LOG_WARN
(
"fail to do bf ecb encrypt"
,
K
(
in
),
K
(
padding_len
),
K
(
ret
));
}
else
if
(
OB_FAIL
(
covert_string_to_hex
(
tmp_out
,
strlen
(
tmp_out
),
out
,
out_len
)))
{
LOG_WARN
(
"fail to convert str to hex"
,
K
(
ret
));
}
}
}
return
ret
;
}
int
ObBlowFish
::
decode
(
const
char
*
in
,
const
int64_t
in_str_len
,
char
*
out
,
const
int64_t
out_len
)
{
int
ret
=
OB_SUCCESS
;
if
(
OB_ISNULL
(
in
)
||
OB_ISNULL
(
out
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
in
),
K
(
out
),
K
(
in_str_len
),
K
(
out_len
),
K
(
ret
));
}
else
{
char
tmp_out
[
OB_MAX_PASSWORD_LENGTH
];
memset
(
tmp_out
,
0
,
sizeof
(
tmp_out
));
int64_t
tmp_out_len
=
0
;
if
(
OB_FAIL
(
convert_large_str_to_hex
(
in
,
in_str_len
,
tmp_out
,
OB_MAX_PASSWORD_LENGTH
,
tmp_out_len
)))
{
}
else
if
(
OB_FAIL
(
do_bf_ecb_encrypt
(
reinterpret_cast
<
const
unsigned
char
*>
(
tmp_out
),
tmp_out_len
,
reinterpret_cast
<
unsigned
char
*>
(
out
),
out_len
,
BF_DECRYPT
)))
{
LOG_WARN
(
"fail to do bf ecn encrypt"
,
K
(
ret
));
}
else
{
// trim padding number
int64_t
result_len
=
strlen
(
out
);
if
(
out
[
result_len
-
1
]
>=
1
&&
out
[
result_len
-
1
]
<=
8
)
{
int64_t
padding_len
=
out
[
result_len
-
1
];
result_len
=
result_len
-
padding_len
;
memset
(
out
+
result_len
,
0
,
padding_len
);
}
}
}
return
ret
;
}
const
char
*
ObBlowFish
::
ENC_KEY_BYTES_PROD_STR
=
""
;
int
ObBlowFish
::
do_bf_ecb_encrypt
(
const
unsigned
char
*
in
,
const
int64_t
in_str_len
,
unsigned
char
*
out
,
const
int64_t
out_len
,
...
...
@@ -89,13 +52,16 @@ int ObBlowFish::do_bf_ecb_encrypt(const unsigned char *in, const int64_t in_str_
||
OB_UNLIKELY
(
in_str_len
>
out_len
)
||
OB_UNLIKELY
(
BF_ENCRYPT
!=
enc_mode
&&
BF_DECRYPT
!=
enc_mode
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
in
),
K
(
out
),
K
(
in_str_len
),
K
(
out_len
),
K
(
enc_mode
),
K
(
ret
));
LOG_WARN
(
"invalid argument"
,
K
(
in
),
K
(
out
),
K
(
in_str_len
),
K
(
out_len
),
K
(
enc_mode
),
K
(
ret
));
}
else
{
BF_KEY
bf_key
;
BF_set_key
(
&
bf_key
,
static_cast
<
int
>
(
strlen
(
ENC_KEY_BYTES_PROD_STR
)),
reinterpret_cast
<
const
unsigned
char
*>
(
ENC_KEY_BYTES_PROD_STR
));
BF_set_key
(
&
bf_key
,
static_cast
<
int
>
(
strlen
(
ObBlowFish
::
ENC_KEY_BYTES_PROD_STR
)),
reinterpret_cast
<
const
unsigned
char
*>
(
ObBlowFish
::
ENC_KEY_BYTES_PROD_STR
));
int
pos
=
0
;
while
(
pos
!=
in_str_len
)
{
BF_ecb_encrypt
(
reinterpret_cast
<
const
unsigned
char
*>
(
in
+
pos
),
reinterpret_cast
<
unsigned
char
*>
(
out
+
pos
),
&
bf_key
,
enc_mode
);
BF_ecb_encrypt
(
reinterpret_cast
<
const
unsigned
char
*>
(
in
+
pos
),
reinterpret_cast
<
unsigned
char
*>
(
out
+
pos
),
&
bf_key
,
enc_mode
);
pos
+=
BF_BLOCK
;
}
}
...
...
@@ -132,6 +98,7 @@ int ObBlowFish::covert_string_to_hex(const char *str, const int64_t str_len,
if
(
OB_ISNULL
(
str
)
||
OB_ISNULL
(
hex_str
)
||
OB_UNLIKELY
(
hex_len
<=
str_len
*
2
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
hex_str
),
K
(
hex_len
),
K
(
str
),
K
(
str_len
),
K
(
ret
));
}
else
{
for
(
int64_t
i
=
0
;
OB_SUCC
(
ret
)
&&
i
<
str_len
;
++
i
)
{
if
(
OB_UNLIKELY
(
-
1
==
sprintf
(
hex_str
,
"%.2x"
,
static_cast
<
unsigned
char
>
(
str
[
i
]))))
{
...
...
@@ -147,7 +114,8 @@ int ObBlowFish::covert_string_to_hex(const char *str, const int64_t str_len,
}
int
ObBlowFish
::
convert_large_str_to_hex
(
const
char
*
str
,
const
int64_t
str_len
,
char
*
hex_str
,
const
int64_t
hex_len
,
int64_t
&
hex_str_len
)
char
*
hex_str
,
const
int64_t
hex_len
,
int64_t
&
hex_str_len
)
{
int
ret
=
OB_SUCCESS
;
UNUSED
(
hex_len
);
...
...
@@ -155,7 +123,8 @@ int ObBlowFish::convert_large_str_to_hex(const char *str, const int64_t str_len,
const
char
*
last_minus_pos
=
NULL
;
bool
is_negative
=
false
;
while
(
cursor
!=
str
+
str_len
)
{
cursor
=
static_cast
<
const
char
*>
(
memchr
(
reinterpret_cast
<
const
void
*>
(
cursor
),
'-'
,
static_cast
<
int32_t
>
(
str_len
-
(
cursor
-
str
))));
cursor
=
static_cast
<
const
char
*>
(
memchr
(
reinterpret_cast
<
const
void
*>
(
cursor
),
'-'
,
static_cast
<
int32_t
>
(
str_len
-
(
cursor
-
str
))));
if
(
NULL
!=
cursor
)
{
last_minus_pos
=
cursor
;
++
cursor
;
...
...
@@ -165,6 +134,7 @@ int ObBlowFish::convert_large_str_to_hex(const char *str, const int64_t str_len,
}
if
(
NULL
!=
last_minus_pos
&&
last_minus_pos
!=
str
)
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
str
),
K
(
last_minus_pos
),
K
(
ret
));
}
else
{
if
(
NULL
==
last_minus_pos
)
{
cursor
=
str
;
...
...
@@ -235,7 +205,8 @@ int ObBlowFish::convert_large_str_to_hex(const char *str, const int64_t str_len,
return
ret
;
}
void
ObBlowFish
::
destructive_multi_add
(
int64_t
*
x
,
const
int64_t
int_num
,
int64_t
y
,
int64_t
z
)
void
ObBlowFish
::
destructive_multi_add
(
int64_t
*
x
,
const
int64_t
int_num
,
int64_t
y
,
int64_t
z
)
{
int64_t
ylong
=
y
&
0xffffffffL
;
int64_t
zlong
=
z
&
0xffffffffL
;
...
...
@@ -294,7 +265,8 @@ int ObBlowFish::get_bit_count(int var)
return
var
&
255
;
}
int
ObBlowFish
::
get_bit_len
(
int64_t
*
mag
,
int64_t
start_idx
,
int64_t
int_num
,
const
bool
is_negative
)
int
ObBlowFish
::
get_bit_len
(
int64_t
*
mag
,
int64_t
start_idx
,
int64_t
int_num
,
const
bool
is_negative
)
{
int
ret
=
-
1
;
int
mag_len
=
static_cast
<
int
>
(
int_num
-
start_idx
);
...
...
@@ -314,5 +286,67 @@ int ObBlowFish::get_bit_len(int64_t *mag, int64_t start_idx, int64_t int_num, co
return
ret
;
}
int
ObBlowFish
::
encode
(
char
*
in
,
const
int64_t
in_len
,
char
*
out
,
const
int64_t
out_len
)
{
int
ret
=
OB_SUCCESS
;
if
(
OB_ISNULL
(
in
)
||
OB_ISNULL
(
out
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
in
),
K
(
out
),
K
(
in_len
),
K
(
out_len
),
K
(
ret
));
}
else
{
char
tmp_out
[
OB_MAX_PASSWORD_LENGTH
];
memset
(
tmp_out
,
0
,
sizeof
(
tmp_out
));
int64_t
in_str_len
=
strlen
(
in
);
int64_t
padding_len
=
BF_BLOCK
-
in_str_len
%
BF_BLOCK
;
if
(
OB_UNLIKELY
(
in_str_len
+
padding_len
>=
in_len
))
{
ret
=
OB_SIZE_OVERFLOW
;
LOG_WARN
(
"in buffer size is not enough"
,
K
(
padding_len
),
K
(
in
),
K
(
in_len
),
K
(
ret
));
}
else
{
for
(
int64_t
i
=
in_str_len
;
i
<
in_str_len
+
padding_len
;
++
i
)
{
in
[
i
]
=
static_cast
<
char
>
(
padding_len
);
}
if
(
OB_FAIL
(
do_bf_ecb_encrypt
(
reinterpret_cast
<
const
unsigned
char
*>
(
in
),
in_str_len
+
padding_len
,
reinterpret_cast
<
unsigned
char
*>
(
tmp_out
),
OB_MAX_PASSWORD_LENGTH
,
BF_ENCRYPT
)))
{
LOG_WARN
(
"fail to do bf ecb encrypt"
,
K
(
in
),
K
(
padding_len
),
K
(
ret
));
}
else
if
(
OB_FAIL
(
covert_string_to_hex
(
tmp_out
,
strlen
(
tmp_out
),
out
,
out_len
)))
{
LOG_WARN
(
"fail to convert str to hex"
,
K
(
ret
));
}
}
}
return
ret
;
}
int
ObBlowFish
::
decode
(
const
char
*
in
,
const
int64_t
in_str_len
,
char
*
out
,
const
int64_t
out_len
)
{
int
ret
=
OB_SUCCESS
;
if
(
OB_ISNULL
(
in
)
||
OB_ISNULL
(
out
))
{
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"invalid argument"
,
K
(
in
),
K
(
out
),
K
(
in_str_len
),
K
(
out_len
),
K
(
ret
));
}
else
{
char
tmp_out
[
OB_MAX_PASSWORD_LENGTH
];
memset
(
tmp_out
,
0
,
sizeof
(
tmp_out
));
int64_t
tmp_out_len
=
0
;
if
(
OB_FAIL
(
convert_large_str_to_hex
(
in
,
in_str_len
,
tmp_out
,
OB_MAX_PASSWORD_LENGTH
,
tmp_out_len
)))
{
LOG_WARN
(
"failt to convert large str to hex"
,
K
(
in
),
K
(
in_str_len
),
K
(
ret
));
}
else
if
(
OB_FAIL
(
do_bf_ecb_encrypt
(
reinterpret_cast
<
const
unsigned
char
*>
(
tmp_out
),
tmp_out_len
,
reinterpret_cast
<
unsigned
char
*>
(
out
),
out_len
,
BF_DECRYPT
)))
{
LOG_WARN
(
"fail to do bf ecn encrypt"
,
K
(
ret
));
}
else
{
// trim padding number
int64_t
result_len
=
strlen
(
out
);
if
(
out
[
result_len
-
1
]
>=
1
&&
out
[
result_len
-
1
]
<=
8
)
{
int64_t
padding_len
=
out
[
result_len
-
1
];
result_len
=
result_len
-
padding_len
;
memset
(
out
+
result_len
,
0
,
padding_len
);
}
}
}
return
ret
;
}
}
// end namespace obproxy
}
// end namespace oceanbase
src/obproxy/utils/ob_proxy_lib.h
浏览文件 @
4f40b15c
src/obproxy/utils/ob_proxy_table_define.cpp
浏览文件 @
4f40b15c
...
...
@@ -95,10 +95,9 @@ const char *ObProxyTableInfo::PROXY_VIP_TENANT_TABLE_NAME = "ob_all_proxy_vip_te
const
char
*
ObProxyTableInfo
::
PROXY_VIP_TENANT_VERSION_NAME
=
"ob_proxy_vip_tenant_version"
;
const
char
*
ObProxyTableInfo
::
READ_ONLY_USERNAME_USER
=
"proxyro"
;
// do not modify
const
char
*
ObProxyTableInfo
::
READ_ONLY_USERNAME
=
"proxyro@sys"
;
// do not modify
const
char
*
ObProxyTableInfo
::
READ_ONLY_DATABASE
=
"oceanbase"
;
// do not modify
const
char
*
ObProxyTableInfo
::
READ_ONLY_PASSWD_STAGED1
=
"ee0e5138c912aed80b683c05303684be347ce81d"
;
// do not modify
const
char
*
ObProxyTableInfo
::
READ_ONLY_USERNAME_USER
=
"proxyro"
;
const
char
*
ObProxyTableInfo
::
READ_ONLY_USERNAME
=
"proxyro@sys"
;
const
char
*
ObProxyTableInfo
::
READ_ONLY_DATABASE
=
"oceanbase"
;
const
char
*
ObProxyTableInfo
::
TEST_MODE_USERNAME
=
"root@sys"
;
const
char
*
ObProxyTableInfo
::
TEST_MODE_PASSWORD
=
""
;
...
...
src/obproxy/utils/ob_proxy_table_define.h
浏览文件 @
4f40b15c
...
...
@@ -67,7 +67,6 @@ public:
static
const
char
*
READ_ONLY_USERNAME_USER
;
static
const
char
*
READ_ONLY_USERNAME
;
static
const
char
*
READ_ONLY_DATABASE
;
static
const
char
*
READ_ONLY_PASSWD_STAGED1
;
static
const
char
*
TEST_MODE_USERNAME
;
static
const
char
*
TEST_MODE_PASSWORD
;
...
...
src/share/inner_table/ob_inner_table_schema.h
浏览文件 @
4f40b15c
src/share/inner_table/ob_inner_table_schema_constants.h
浏览文件 @
4f40b15c
...
...
@@ -493,22 +493,22 @@ struct PrivilegeRow {
const
char
*
comment_
;
};
const
char
*
const
ALTER_TB_MSG
=
"To alter the table"
;
const
char
*
const
CREATE_DB_TB_MSG
=
"To create new databases and tables"
;
const
char
*
const
CREATE_VIEW_MSG
=
"To create new views"
;
const
char
*
const
CREATE_USER_MSG
=
"To create new users"
;
const
char
*
const
DELETE_ROWS_MSG
=
"To delete existing rows"
;
const
char
*
const
DROP_DB_TB_VIEWS_MSG
=
"To drop databases, tables, and views"
;
const
char
*
const
GRANT_OPTION_MSG
=
"To give to other users those privileges you possess"
;
const
char
*
const
INDEX_MSG
=
"To create or drop indexes"
;
const
char
*
const
INSERT_MSG
=
"To insert data into tables"
;
const
char
*
const
PROCESS_MSG
=
"To view the plain text of currently executing queries"
;
const
char
*
const
SELECT_MSG
=
"To retrieve rows from table"
;
const
char
*
const
SHOW_DB_MSG
=
"To see all databases with SHOW DATABASES"
;
const
char
*
const
SHOW_VIEW_MSG
=
"To see views with SHOW CREATE VIEW"
;
const
char
*
const
SUPER_MSG
=
"To use KILL thread, SET GLOBAL, CHANGE MASTER, etc."
;
const
char
*
const
UPDATE_MSG
=
"To update existing rows"
;
const
char
*
const
USAGE_MSG
=
"No privileges - allow connect only"
;
const
char
*
const
ALTER_TB_MSG
=
"To alter the table"
;
const
char
*
const
CREATE_DB_TB_MSG
=
"To create new databases and tables"
;
const
char
*
const
CREATE_VIEW_MSG
=
"To create new views"
;
const
char
*
const
CREATE_USER_MSG
=
"To create new users"
;
const
char
*
const
DELETE_ROWS_MSG
=
"To delete existing rows"
;
const
char
*
const
DROP_DB_TB_VIEWS_MSG
=
"To drop databases, tables, and views"
;
const
char
*
const
GRANT_OPTION_MSG
=
"To give to other users those privileges you possess"
;
const
char
*
const
INDEX_MSG
=
"To create or drop indexes"
;
const
char
*
const
INSERT_MSG
=
"To insert data into tables"
;
const
char
*
const
PROCESS_MSG
=
"To view the plain text of currently executing queries"
;
const
char
*
const
SELECT_MSG
=
"To retrieve rows from table"
;
const
char
*
const
SHOW_DB_MSG
=
"To see all databases with SHOW DATABASES"
;
const
char
*
const
SHOW_VIEW_MSG
=
"To see views with SHOW CREATE VIEW"
;
const
char
*
const
SUPER_MSG
=
"To use KILL thread, SET GLOBAL, CHANGE MASTER, etc."
;
const
char
*
const
UPDATE_MSG
=
"To update existing rows"
;
const
char
*
const
USAGE_MSG
=
"No privileges - allow connect only"
;
static
const
PrivilegeRow
all_privileges
[]
=
{
{
"Alter"
,
"Tables"
,
ALTER_TB_MSG
},
...
...
src/share/schema/ob_column_schema.h
浏览文件 @
4f40b15c
unittest/obproxy/parser/runner.py
浏览文件 @
4f40b15c
...
...
@@ -45,7 +45,7 @@ class MainHandler():
if
(
os
.
path
.
isfile
(
self
.
opt
.
base_parser
)):
run_cmd
(
"./%s -f %s -r %s"
%
(
self
.
opt
.
base_parser
,
self
.
opt
.
test_case
,
result_file_name
))
else
:
url
=
'http://
10.218.248.181:7788
/obproxy_build/%s'
%
self
.
opt
.
base_parser
url
=
'http://
ip:port
/obproxy_build/%s'
%
self
.
opt
.
base_parser
print
'get base parser from %s'
%
url
run_cmd
(
"wget %s -O %s &>/dev/null && chmod a+x %s"
%
(
url
,
self
.
opt
.
base_parser
,
self
.
opt
.
base_parser
))
if
(
os
.
path
.
isfile
(
self
.
opt
.
base_parser
)):
...
...
unittest/obproxy/test_config_server_processor.cpp
浏览文件 @
4f40b15c
...
...
@@ -210,12 +210,11 @@ TEST_F(TestConfigServerProcessor, test_get_json_config_info)
{
int
ret
=
OB_SUCCESS
;
config_processor_
.
proxy_config_
.
app_name
.
set_value
(
"ob1.kyle.sj"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153:8080/diamond/cgi/a.py?key=unittest_test_config_server.proxy&method=get"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
ret
=
config_processor_
.
refresh_json_config_info
();
ASSERT_EQ
(
OB_SUCCESS
,
ret
);
ASSERT_EQ
(
0
,
memcmp
(
config_processor_
.
json_config_info_
->
data_info_
.
bin_url_
.
ptr
(),
"
http://11.166.86.153:8877
"
,
config_processor_
.
json_config_info_
->
data_info_
.
bin_url_
.
length
()));
""
,
config_processor_
.
json_config_info_
->
data_info_
.
bin_url_
.
length
()));
ASSERT_EQ
(
0
,
memcmp
(
config_processor_
.
json_config_info_
->
data_info_
.
meta_table_info_
.
db_
.
ptr
(),
"oceanbase"
,
config_processor_
.
json_config_info_
->
data_info_
.
meta_table_info_
.
db_
.
length
()));
ASSERT_EQ
(
0
,
memcmp
(
config_processor_
.
json_config_info_
->
data_info_
.
meta_table_info_
.
username_
.
ptr
(),
...
...
@@ -224,8 +223,7 @@ TEST_F(TestConfigServerProcessor, test_get_json_config_info)
"admin"
,
config_processor_
.
json_config_info_
->
data_info_
.
meta_table_info_
.
password_
.
length
()));
ASSERT_EQ
(
1
,
config_processor_
.
json_config_info_
->
data_info_
.
cluster_array_
.
count
());
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153:8899/xxx"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
ret
=
config_processor_
.
refresh_json_config_info
();
ASSERT_EQ
(
OB_CURL_ERROR
,
ret
);
}
...
...
@@ -238,22 +236,19 @@ TEST_F(TestConfigServerProcessor, test_do_fetch_json_config)
ObString
content
;
content
.
assign_buffer
(
buf
,
OB_PROXY_CONFIG_BUFFER_SIZE
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153:8080/diamond/cgi/a.py?key=unittest_test_config_server.proxy&method=get"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
const
char
*
config_url
=
config_processor_
.
proxy_config_
.
obproxy_config_server_url
;
ret
=
config_processor_
.
fetch_by_curl
(
config_url
,
ObConfigServerProcessor
::
CURL_TRANSFER_TIMEOUT
,
static_cast
<
void
*>
(
&
content
),
ObConfigServerProcessor
::
write_data
);
ASSERT_EQ
(
OB_SUCCESS
,
ret
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153/xxx"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
const
char
*
wrong_config_url
=
config_processor_
.
proxy_config_
.
obproxy_config_server_url
;
ret
=
config_processor_
.
fetch_by_curl
(
wrong_config_url
,
ObConfigServerProcessor
::
CURL_TRANSFER_TIMEOUT
,
static_cast
<
void
*>
(
&
content
),
ObConfigServerProcessor
::
write_data
);
ASSERT_EQ
(
OB_CURL_ERROR
,
ret
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153:8888/diamond/cgi/a.py?key=ob1.kyle.sj.test&method=get"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
const
char
*
wrong_http_port
=
config_processor_
.
proxy_config_
.
obproxy_config_server_url
;
ret
=
config_processor_
.
fetch_by_curl
(
wrong_http_port
,
ObConfigServerProcessor
::
CURL_TRANSFER_TIMEOUT
,
static_cast
<
void
*>
(
&
content
),
ObConfigServerProcessor
::
write_data
);
...
...
@@ -263,9 +258,8 @@ TEST_F(TestConfigServerProcessor, test_do_fetch_json_config)
TEST_F
(
TestConfigServerProcessor
,
test_get_newest_cluster_rs_list
)
{
int
ret
=
OB_SUCCESS
;
config_processor_
.
proxy_config_
.
app_name
.
set_value
(
"ob1.kyle.sj"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153:8080/diamond/cgi/a.py?key=unittest_test_config_server.proxy&method=get"
);
config_processor_
.
proxy_config_
.
app_name
.
set_value
(
""
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
ret
=
config_processor_
.
refresh_json_config_info
();
ASSERT_EQ
(
OB_SUCCESS
,
ret
);
...
...
@@ -279,7 +273,7 @@ TEST_F(TestConfigServerProcessor, test_do_fetch_proxy_bin)
{
int
ret
=
OB_SUCCESS
;
const
char
*
save_path
=
"obproxy_new"
;
config_processor_
.
json_config_info_
->
data_info_
.
bin_url_
.
url_
=
ObString
::
make_string
(
"
http://10.125.224.4:9191/method=get
"
);
config_processor_
.
json_config_info_
->
data_info_
.
bin_url_
.
url_
=
ObString
::
make_string
(
""
);
ret
=
config_processor_
.
do_fetch_proxy_bin
(
save_path
,
"obproxy.el6.x86_64.rpm"
);
ASSERT_EQ
(
OB_SUCCESS
,
ret
);
remove
(
save_path
);
...
...
@@ -293,7 +287,7 @@ TEST_F(TestConfigServerProcessor, test_do_fetch_proxy_bin)
ASSERT_EQ
(
OB_ERR_UNEXPECTED
,
ret
);
//test short timeout
const
char
*
bin_url
=
"
http://10.125.224.4:9191/method=get&Version=big.obproxy.el6.x86_64.rpm
"
;
const
char
*
bin_url
=
""
;
int
fd
=
0
;
if
((
fd
=
::
open
(
save_path
,
O_WRONLY
|
O_CREAT
,
...
...
@@ -307,7 +301,7 @@ TEST_F(TestConfigServerProcessor, test_do_fetch_proxy_bin)
remove
(
save_path
);
//test wrong url
const
char
*
wrong_bin_url
=
"
http://10.125.224.4:9191/method=get&Version=/test_dir/obproxy.el6.x86_64.rpm
"
;
const
char
*
wrong_bin_url
=
""
;
int64_t
fetch_timeout
=
config_processor_
.
proxy_config_
.
fetch_proxy_bin_timeout
/
1000000
;
//us --> s
if
(
fetch_timeout
<=
0
)
{
ret
=
OB_INVALID_ARGUMENT
;
...
...
@@ -324,13 +318,13 @@ TEST_F(TestConfigServerProcessor, test_do_fetch_proxy_bin)
TEST_F
(
TestConfigServerProcessor
,
test_get_idc_url
)
{
const
char
*
buf1
=
"
http://11.166.86.153:8080/oceanbase_obconfig/obtest_jianhua.sjh_10.125.224.4_ob1
"
;
const
char
*
buf2
=
"
http://ocp-api.alipay.com/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=zhitao.rzt&ObRegion=rhz_obtrans60
"
;
const
char
*
buf3
=
"
http://ocp-api.alipay.com/services?action=obrootserviceinfo&user_id=alibaba&uid=zhitao.rzt&obregion=rhz_obtrans60
"
;
const
char
*
buf4
=
"
HTTP://OCP-API.ALIPAY.COM/SERVICES?ACTION=OBROOTSERVICEINFO&USER_ID=ALIBABA&UID=ZHITAO.RZT&OBREGION=RHZ_OBTRANS60
"
;
const
char
*
expect_buf1
=
"
http://11.166.86.153:8080/oceanbase_obconfig/obtest_jianhua.sjh_10.125.224.4_ob1_idc_list
"
;
const
char
*
expect_buf2
=
"
http://ocp-api.alipay.com/services?Action=ObIDCRegionInfo&User_ID=alibaba&UID=zhitao.rzt&ObRegion=rhz_obtrans60
"
;
const
char
*
expect_buf3
=
"
http://ocp-api.alipay.com/services?action=ObIDCRegionInfo&user_id=alibaba&uid=zhitao.rzt&obregion=rhz_obtrans60
"
;
const
char
*
buf1
=
""
;
const
char
*
buf2
=
""
;
const
char
*
buf3
=
""
;
const
char
*
buf4
=
""
;
const
char
*
expect_buf1
=
""
;
const
char
*
expect_buf2
=
""
;
const
char
*
expect_buf3
=
""
;
const
char
*
expect_buf4
=
"HTTP://OCP-API.ALIPAY.COM/SERVICES?ACTION=ObIDCRegionInfo&USER_ID=ALIBABA&UID=ZHITAO.RZT&OBREGION=RHZ_OBTRANS60"
;
const
int64_t
max_size
=
256
;
char
common_buf
[
256
];
...
...
@@ -364,8 +358,7 @@ TEST_F(TestConfigServerProcessor, test_get_idc_list)
{
int
ret
=
OB_SUCCESS
;
config_processor_
.
proxy_config_
.
app_name
.
set_value
(
"ob1.kyle.sj"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
"http://11.166.86.153:8080/diamond/cgi/a.py?key=unittest_test_config_server.proxy&method=get"
);
config_processor_
.
proxy_config_
.
obproxy_config_server_url
.
set_value
(
""
);
ret
=
config_processor_
.
refresh_json_config_info
();
ASSERT_EQ
(
OB_SUCCESS
,
ret
);
...
...
unittest/obproxy/test_proxy_session_info.cpp
浏览文件 @
4f40b15c
...
...
@@ -49,7 +49,7 @@ TEST_F(TestProxySessionInfo, basic_func)
{
ObServerSessionInfo
session
;
session
.
reset
();
ObAddr
server
(
static_cast
<
ObAddr
::
VER
>
(
4
),
"
10.232.4.4
"
,
3300
);
ObAddr
server
(
static_cast
<
ObAddr
::
VER
>
(
4
),
""
,
3300
);
session
.
version_
.
sys_var_version_
=
100
;
session
.
version_
.
hot_sys_var_version_
=
100
;
session
.
version_
.
user_var_version_
=
1000
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录