Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
soremi
oceanbase
提交
477f4cd1
O
oceanbase
项目概览
soremi
/
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,发现更多精彩内容 >>
提交
477f4cd1
编写于
11月 02, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
11月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BUGFIX]repeat return error when input length is larger than max_allow_packet
上级
88ec965b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
7 deletion
+4
-7
src/sql/engine/expr/ob_expr_repeat.cpp
src/sql/engine/expr/ob_expr_repeat.cpp
+2
-2
tools/deploy/mysql_test/test_suite/static_engine/r/mysql/expr_repeat.result
..._test/test_suite/static_engine/r/mysql/expr_repeat.result
+1
-5
tools/deploy/mysql_test/test_suite/static_engine/t/expr_repeat.test
...oy/mysql_test/test_suite/static_engine/t/expr_repeat.test
+1
-0
未找到文件。
src/sql/engine/expr/ob_expr_repeat.cpp
浏览文件 @
477f4cd1
...
...
@@ -147,8 +147,8 @@ int ObExprRepeat::repeat(ObString &output,
if
((
length
>
max_result_size
/
count
)
||
(
length
>
INT_MAX
/
count
))
{
LOG_WARN
(
"Result of repeat was larger than max_allow_packet_size"
,
K
(
ret
),
K
(
length
),
K
(
count
),
K
(
max_result_size
));
LOG_USER_WARN
(
OB_ERR_FUNC_RESULT_TOO_LARGE
,
"repeat"
,
static_cast
<
int
>
(
max_result_size
))
;
is_null
=
true
;
ret
=
OB_ERR_FUNC_RESULT_TOO_LARGE
;
LOG_USER_ERROR
(
OB_ERR_FUNC_RESULT_TOO_LARGE
,
"repeat"
,
static_cast
<
int
>
(
max_result_size
))
;
}
else
{
//avoid realloc
if
(
1
==
count
)
{
...
...
tools/deploy/mysql_test/test_suite/static_engine/r/mysql/expr_repeat.result
浏览文件 @
477f4cd1
...
...
@@ -80,9 +80,5 @@ select repeat(1.414, 2);
+------------------+
select repeat("abc", 200000000);
+--------------------------+
| repeat("abc", 200000000) |
+--------------------------+
| NULL |
+--------------------------+
ERROR HY000: Result of repeat() was larger than max_allowed_packet (4194304) - truncated
tools/deploy/mysql_test/test_suite/static_engine/t/expr_repeat.test
浏览文件 @
477f4cd1
...
...
@@ -30,6 +30,7 @@ select repeat("abc", NULL);
select
repeat
(
1.414
,
1
);
select
repeat
(
1.414
,
2
);
--
error
1301
select
repeat
(
"abc"
,
200000000
);
--
enable_warnings
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录