Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
829cfdec
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
You need to sign in or sign up before continuing.
提交
829cfdec
编写于
5月 05, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
5月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CP] fix table location generate wrong key_exprs
上级
cb3e9eac
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
34 addition
and
47 deletion
+34
-47
src/sql/optimizer/ob_table_location.cpp
src/sql/optimizer/ob_table_location.cpp
+17
-11
tools/docker/standalone/Dockerfile
tools/docker/standalone/Dockerfile
+3
-3
tools/docker/standalone/boot/_boot
tools/docker/standalone/boot/_boot
+14
-31
tools/docker/standalone/boot/boot-tmp.yaml
tools/docker/standalone/boot/boot-tmp.yaml
+0
-2
未找到文件。
src/sql/optimizer/ob_table_location.cpp
浏览文件 @
829cfdec
...
@@ -4594,12 +4594,6 @@ int ObTableLocation::record_insert_part_info(ObInsertStmt& insert_stmt, ObSQLSes
...
@@ -4594,12 +4594,6 @@ int ObTableLocation::record_insert_part_info(ObInsertStmt& insert_stmt, ObSQLSes
const
ObIArray
<
ObRawExpr
*>*
value_vector
=
NULL
;
const
ObIArray
<
ObRawExpr
*>*
value_vector
=
NULL
;
const
int64_t
part_column_count
=
partition_columns
.
count
();
const
int64_t
part_column_count
=
partition_columns
.
count
();
if
(
NULL
!=
table_columns
&&
table_columns
->
count
()
>
1
)
{
if
(
0
==
table_columns
->
at
(
0
)
->
get_table_name
().
case_compare
(
"sg1"
))
{
LOG_DEBUG
(
"shaoge table"
);
}
}
ObSEArray
<
ObColumnRefRawExpr
*
,
4
>
value_desc_heap_table
;
ObSEArray
<
ObColumnRefRawExpr
*
,
4
>
value_desc_heap_table
;
ObSEArray
<
ObRawExpr
*
,
4
>
value_vector_heap_table
;
ObSEArray
<
ObRawExpr
*
,
4
>
value_vector_heap_table
;
if
(
insert_stmt
.
get_part_generated_col_dep_cols
().
count
()
==
0
)
{
if
(
insert_stmt
.
get_part_generated_col_dep_cols
().
count
()
==
0
)
{
...
@@ -4628,11 +4622,23 @@ int ObTableLocation::record_insert_part_info(ObInsertStmt& insert_stmt, ObSQLSes
...
@@ -4628,11 +4622,23 @@ int ObTableLocation::record_insert_part_info(ObInsertStmt& insert_stmt, ObSQLSes
}
}
}
else
{
}
else
{
for
(
int64_t
value_idx
=
0
;
OB_SUCC
(
ret
)
&&
value_idx
<
value_desc_count
;
++
value_idx
)
{
for
(
int64_t
value_idx
=
0
;
OB_SUCC
(
ret
)
&&
value_idx
<
value_desc_count
;
++
value_idx
)
{
// Value with subquery can't be calculated, remove it from value_need_idx.
// Previous code already guarantee that part key not contain subquery.
bool
has_subquery
=
false
;
for
(
int64_t
j
=
value_idx
;
OB_SUCC
(
ret
)
&&
!
has_subquery
&&
j
<
value_count
;
j
+=
value_desc_count
)
{
ObRawExpr
*
expr
=
value_vector
->
at
(
j
);
if
(
OB_ISNULL
(
expr
))
{
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"get null expr"
,
K
(
ret
),
K
(
j
));
}
else
if
(
expr
->
has_flag
(
CNT_SUB_QUERY
)
||
expr
->
has_flag
(
CNT_EXEC_PARAM
))
{
has_subquery
=
true
;
}
}
if
(
OB_SUCC
(
ret
)
&&
!
has_subquery
)
{
if
(
OB_ISNULL
(
value_desc
->
at
(
value_idx
)))
{
if
(
OB_ISNULL
(
value_desc
->
at
(
value_idx
)))
{
ret
=
OB_ERR_UNEXPECTED
;
ret
=
OB_ERR_UNEXPECTED
;
LOG_WARN
(
"value desc expr is null"
);
LOG_WARN
(
"value desc expr is null"
);
}
else
{
}
else
if
(
OB_FAIL
(
value_need_idx
.
push_back
(
value_idx
)))
{
if
(
OB_FAIL
(
value_need_idx
.
push_back
(
value_idx
)))
{
LOG_WARN
(
"Failed to add value idx"
,
K
(
ret
));
LOG_WARN
(
"Failed to add value idx"
,
K
(
ret
));
}
}
}
}
...
...
tools/docker/standalone/Dockerfile
浏览文件 @
829cfdec
FROM
oceanbase/centos7:latest
FROM
oceanbase/centos7:latest
RUN
yum-config-manager
--add-repo
https://mirrors.aliyun.com/oceanbase/OceanBase.repo
&&
\
RUN
yum-config-manager
--add-repo
https://mirrors.aliyun.com/oceanbase/OceanBase.repo
&&
\
yum
install
-y
ob-deploy
-1.2.1
obclient ob-sysbench wget libaio
&&
\
yum
install
-y
ob-deploy obclient ob-sysbench wget libaio
&&
\
mkdir
/root/pkg
&&
\
mkdir
/root/pkg
&&
\
cd
/root/pkg
&&
\
cd
/root/pkg
&&
\
wget https://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/oceanbase-ce-3.1.
3-10000292022032916
.el7.x86_64.rpm
-q
&&
\
wget https://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/oceanbase-ce-3.1.
2-10000392021123010
.el7.x86_64.rpm
-q
&&
\
wget https://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/oceanbase-ce-libs-3.1.
3-10000292022032916
.el7.x86_64.rpm
-q
&&
\
wget https://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/oceanbase-ce-libs-3.1.
2-10000392021123010
.el7.x86_64.rpm
-q
&&
\
rm
-rf
/usr/obd/mirror/remote/
*
&&
\
rm
-rf
/usr/obd/mirror/remote/
*
&&
\
obd mirror clone
*
.rpm
&&
\
obd mirror clone
*
.rpm
&&
\
obd mirror list
local
&&
\
obd mirror list
local
&&
\
...
...
tools/docker/standalone/boot/_boot
浏览文件 @
829cfdec
...
@@ -5,49 +5,32 @@ source _env
...
@@ -5,49 +5,32 @@ source _env
STAMP
=
"
$(
date
+%s
)
"
STAMP
=
"
$(
date
+%s
)
"
# return 0 if mini_mode is nil or 'no'/'false'/0
# 0 means true and 1 for false in bash
function
is_mini_mode
()
{
if
test
-z
${
MINI_MODE
}
then
return
1
fi
# convert MINI_MODE to upper case string(can work in bash 4.x)
mini_mode
=
${
MINI_MODE
^^
}
if
[
"x
${
mini_mode
}
"
==
"xNO"
]
||
[
"x
${
mini_mode
}
"
==
"xFALSE"
]
||
[
"x
${
mini_mode
}
"
==
"x0"
]
;
then
return
1
fi
return
0
}
[[
-f
boot.yaml
]]
&&
echo
"find boot.yaml, skip configuring..."
||
{
[[
-f
boot.yaml
]]
&&
echo
"find boot.yaml, skip configuring..."
||
{
echo
"generate boot.yaml ..."
echo
"generate boot.yaml ..."
TMPFILE
=
"boot.
${
STAMP
}
.yaml"
TMPFILE
=
"boot.
${
STAMP
}
.yaml"
if
[[
$MINI_MODE
==
1
]]
if
is_mini_mode
then
then
echo
"oceanbase-ce docker in mini mode"
cp
-f
boot-mini-tmp.yaml
$TMPFILE
cp
-f
boot-mini-tmp.yaml
$TMPFILE
else
else
cp
-f
boot-tmp.yaml
$TMPFILE
cp
-f
boot-tmp.yaml
$TMPFILE
fi
fi
sed
-i
"s|@OB_HOME_PATH@|
${
OB_HOME_PATH
}
|g"
$TMPFILE
sed
-i
"s|@OB_HOME_PATH@|
${
OB_HOME_PATH
}
|g"
$TMPFILE
sed
-i
"s|@OB_MYSQL_PORT@|
${
OB_MYSQL_PORT
}
|g"
$TMPFILE
sed
-i
"s|@OB_MYSQL_PORT@|
${
OB_MYSQL_PORT
}
|g"
$TMPFILE
sed
-i
"s|@OB_RPC_PORT@|
${
OB_RPC_PORT
}
|g"
$TMPFILE
sed
-i
"s|@OB_RPC_PORT@|
${
OB_RPC_PORT
}
|g"
$TMPFILE
sed
-i
"s|@OB_ROOT_PASSWORD@|
${
OB_ROOT_PASSWORD
}
|g"
$TMPFILE
sed
-i
"s|@OB_ROOT_PASSWORD@|
${
OB_ROOT_PASSWORD
}
|g"
$TMPFILE
[
"
${
OB_DATA_DIR
}
"
]
&&
echo
" data_dir:
${
OB_DATA_DIR
}
"
>>
$TMPFILE
[
"
${
OB_DATA_DIR
}
"
]
&&
echo
" data_dir:
${
OB_DATA_DIR
}
"
>>
$TMPFILE
[
"
${
OB_REDO_DIR
}
"
]
&&
echo
" redo_dir:
${
OB_REDO_DIR
}
"
>>
$TMPFILE
[
"
${
OB_REDO_DIR
}
"
]
&&
echo
" redo_dir:
${
OB_REDO_DIR
}
"
>>
$TMPFILE
echo
"create boot dirs and deploy ob cluster ..."
echo
"create boot dirs and deploy ob cluster ..."
mkdir
-p
$OB_HOME_PATH
mkdir
-p
$OB_HOME_PATH
if
[[
$MINI_MODE
==
1
]]
obd cluster autodeploy
"
${
OB_CLUSTER_NAME
}
"
-c
$TMPFILE
\
then
&&
obd cluster tenant create
"
${
OB_CLUSTER_NAME
}
"
-n
${
OB_TENANT_NAME
}
\
obd cluster deploy
"
${
OB_CLUSTER_NAME
}
"
-c
$TMPFILE
&&
obd cluster tenant create
"
${
OB_CLUSTER_NAME
}
"
-n
${
OB_TENANT_NAME
}
&&
obd cluster start
"
${
OB_CLUSTER_NAME
}
"
&&
obclient
-h127
.1
-uroot
@
${
OB_TENANT_NAME
}
-A
-P
${
OB_MYSQL_PORT
}
< init_tenant_user.sql
&&
mv
-f
$TMPFILE
boot.yaml
&&
obclient
-h127
.1
-uroot
@
${
OB_TENANT_NAME
}
-A
-P
${
OB_MYSQL_PORT
}
< init_tenant_user.sql
\
else
&&
mv
-f
$TMPFILE
boot.yaml
\
obd cluster autodeploy
"
${
OB_CLUSTER_NAME
}
"
-c
$TMPFILE
&&
obd cluster tenant create
"
${
OB_CLUSTER_NAME
}
"
-n
${
OB_TENANT_NAME
}
&&
obclient
-h127
.1
-uroot
@
${
OB_TENANT_NAME
}
-A
-P
${
OB_MYSQL_PORT
}
< init_tenant_user.sql
&&
mv
-f
$TMPFILE
boot.yaml
&&
echo
"start ob cluster ..."
\
fi
&&
echo
"boot success!"
\
&&
exec
/sbin/init
}
}
[[
-f
boot.yaml
]]
&&
{
echo
"start ob cluster ..."
obd cluster start
$OB_CLUSTER_NAME
}
&&
echo
"boot success!"
&&
exec
/sbin/init
tools/docker/standalone/boot/boot-tmp.yaml
浏览文件 @
829cfdec
...
@@ -7,5 +7,3 @@ oceanbase-ce:
...
@@ -7,5 +7,3 @@ oceanbase-ce:
mysql_port
:
@
OB_MYSQL_PORT@
# default: 2881
mysql_port
:
@
OB_MYSQL_PORT@
# default: 2881
rpc_port
:
@
OB_RPC_PORT@
# default: 2882
rpc_port
:
@
OB_RPC_PORT@
# default: 2882
root_password
:
@
OB_ROOT_PASSWORD@
# default: null
root_password
:
@
OB_ROOT_PASSWORD@
# default: null
datafile_size
:
10G
clog_disk_usage_limit_percentage
:
98
# default: 80
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录