Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2e0492a6
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2e0492a6
编写于
1月 17, 2023
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: stmt insert for 64k
上级
9cfaba12
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
6 deletion
+9
-6
src/client/src/tscPrepare.c
src/client/src/tscPrepare.c
+3
-3
tests/system-test/1-insert/stmt_error.py
tests/system-test/1-insert/stmt_error.py
+6
-3
未找到文件。
src/client/src/tscPrepare.c
浏览文件 @
2e0492a6
...
...
@@ -723,7 +723,7 @@ static FORCE_INLINE int doBindParam(STableDataBlocks* pBlock, char* data, SParam
if ((*bind->length) > (uintptr_t)param->bytes) {
return TSDB_CODE_TSC_INVALID_VALUE;
}
short size = (shor
t)*bind->length;
uint16_t size = (uint16_
t)*bind->length;
STR_WITH_SIZE_TO_VARSTR(data + param->offset, bind->buffer, size);
return TSDB_CODE_SUCCESS;
}
...
...
@@ -777,7 +777,7 @@ static FORCE_INLINE int doBindParam(STableDataBlocks* pBlock, char* data, SParam
return
TSDB_CODE_TSC_INVALID_VALUE
;
}
shor
t
size
=
0
;
uint16_
t
size
=
0
;
switch
(
param
->
type
)
{
case
TSDB_DATA_TYPE_BOOL
:
case
TSDB_DATA_TYPE_TINYINT
:
...
...
@@ -808,7 +808,7 @@ static FORCE_INLINE int doBindParam(STableDataBlocks* pBlock, char* data, SParam
tscError
(
"column length is too big"
);
return
TSDB_CODE_TSC_INVALID_VALUE
;
}
size
=
(
shor
t
)
*
pBind
->
length
;
size
=
(
uint16_
t
)
*
pBind
->
length
;
STR_WITH_SIZE_TO_VARSTR
(
data
+
param
->
offset
,
pBind
->
buffer
,
size
);
return
TSDB_CODE_SUCCESS
;
...
...
tests/system-test/1-insert/stmt_error.py
浏览文件 @
2e0492a6
...
...
@@ -45,7 +45,7 @@ class TDTestCase:
conn
.
execute
(
"create table if not exists log(ts timestamp, bo bool, nil tinyint, ti tinyint, si smallint, ii int,
\
bi bigint, tu tinyint unsigned, su smallint unsigned, iu int unsigned, bu bigint unsigned,
\
ff float, dd double, bb binary(
100
), nn nchar(100), tt timestamp)"
,
ff float, dd double, bb binary(
65059
), nn nchar(100), tt timestamp)"
,
)
conn
.
load_table_info
(
"log"
)
...
...
@@ -65,7 +65,10 @@ class TDTestCase:
params
[
10
].
bigint_unsigned
(
9
)
params
[
11
].
float
(
10.1
)
params
[
12
].
double
(
10.11
)
params
[
13
].
binary
(
"hello"
)
binaryStr6w
=
'123456789'
for
i
in
range
(
1301
):
binaryStr6w
+=
"1234567890abcdefghij1234567890abcdefghij12345hello"
params
[
13
].
binary
(
binaryStr6w
)
params
[
14
].
nchar
(
"stmt"
)
params
[
15
].
timestamp
(
1626861392589
,
PrecisionEnum
.
Milliseconds
)
...
...
@@ -88,7 +91,7 @@ class TDTestCase:
#float == may not work as expected
# assert row[10] == c_float(10.1)
assert
row
[
12
]
==
10.11
assert
row
[
13
]
==
"hello"
assert
row
[
13
]
[
65054
:]
==
"hello"
assert
row
[
14
]
==
"stmt"
conn
.
execute
(
"drop database if exists %s"
%
dbname
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录