Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d33d693e
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d33d693e
编写于
10月 08, 2020
作者:
F
freemine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove obsoletes, ignore->ignored for better understanding
上级
12eafdd8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
83 deletion
+11
-83
src/connector/odbc/src/todbc.c
src/connector/odbc/src/todbc.c
+0
-72
src/connector/odbc/tests/main.c
src/connector/odbc/tests/main.c
+11
-11
未找到文件。
src/connector/odbc/src/todbc.c
浏览文件 @
d33d693e
...
...
@@ -729,14 +729,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.b)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -770,14 +762,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.v1)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -811,14 +795,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.v2)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -852,14 +828,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.v4)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -893,14 +861,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.v8)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -934,14 +894,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.f4)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -975,14 +927,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.f8)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -1016,14 +960,6 @@ SQLRETURN SQL_API SQLBindParameter(
}
// LengthPrecision ignored;
// ParameterScale ignored;
// if (LengthPrecision != sizeof(v.v8)) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] not matching length precision", ParameterNumber);
// return SQL_ERROR;
// }
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -1060,10 +996,6 @@ SQLRETURN SQL_API SQLBindParameter(
return
SQL_ERROR
;
}
// ParameterScale ignored;
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
@@ -1100,10 +1032,6 @@ SQLRETURN SQL_API SQLBindParameter(
return
SQL_ERROR
;
}
// ParameterScale ignored;
// if (ParameterScale != 0) {
// SET_ERROR(sql, "HY000", TSDB_CODE_COM_OPS_NOT_SUPPORT, "parameter [@%d] scale not supported yet", ParameterNumber);
// return SQL_ERROR;
// }
param_bind_t
*
ar
=
(
param_bind_t
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
params
:
realloc
(
sql
->
params
,
ParameterNumber
*
sizeof
(
*
ar
)));
TAOS_BIND
*
binds
=
(
TAOS_BIND
*
)(
sql
->
n_params
>=
ParameterNumber
?
sql
->
binds
:
realloc
(
sql
->
binds
,
ParameterNumber
*
sizeof
(
*
binds
)));
if
(
!
ar
||
!
binds
)
{
...
...
src/connector/odbc/tests/main.c
浏览文件 @
d33d693e
...
...
@@ -58,7 +58,7 @@ static int do_insert(SQLHSTMT stmt, data_t data) {
SQLLEN
lblob
;
const
char
*
statement
=
"insert into t values (?, ?, ?, ?, ?, ?, ?, ?, ?,?)"
;
int
ignore
=
0
;
int
ignore
d
=
0
;
do
{
fprintf
(
stderr
,
"prepare [%s]
\n
"
,
statement
);
...
...
@@ -66,46 +66,46 @@ static int do_insert(SQLHSTMT stmt, data_t data) {
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 1 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
1
,
SQL_PARAM_INPUT
,
SQL_C_SBIGINT
,
SQL_TIMESTAMP
,
ignore
,
ignore
,
&
data
.
ts
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
1
,
SQL_PARAM_INPUT
,
SQL_C_SBIGINT
,
SQL_TIMESTAMP
,
ignore
d
,
ignored
,
&
data
.
ts
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 2 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
2
,
SQL_PARAM_INPUT
,
SQL_C_BIT
,
SQL_BIT
,
ignore
,
ignore
,
&
data
.
b
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
2
,
SQL_PARAM_INPUT
,
SQL_C_BIT
,
SQL_BIT
,
ignore
d
,
ignored
,
&
data
.
b
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 3 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
3
,
SQL_PARAM_INPUT
,
SQL_C_TINYINT
,
SQL_TINYINT
,
ignore
,
ignore
,
&
data
.
v1
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
3
,
SQL_PARAM_INPUT
,
SQL_C_TINYINT
,
SQL_TINYINT
,
ignore
d
,
ignored
,
&
data
.
v1
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 4 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
4
,
SQL_PARAM_INPUT
,
SQL_C_SHORT
,
SQL_SMALLINT
,
ignore
,
ignore
,
&
data
.
v2
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
4
,
SQL_PARAM_INPUT
,
SQL_C_SHORT
,
SQL_SMALLINT
,
ignore
d
,
ignored
,
&
data
.
v2
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 5 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
5
,
SQL_PARAM_INPUT
,
SQL_C_LONG
,
SQL_INTEGER
,
ignore
,
ignore
,
&
data
.
v4
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
5
,
SQL_PARAM_INPUT
,
SQL_C_LONG
,
SQL_INTEGER
,
ignore
d
,
ignored
,
&
data
.
v4
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 6 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
6
,
SQL_PARAM_INPUT
,
SQL_C_SBIGINT
,
SQL_BIGINT
,
ignore
,
ignore
,
&
data
.
v8
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
6
,
SQL_PARAM_INPUT
,
SQL_C_SBIGINT
,
SQL_BIGINT
,
ignore
d
,
ignored
,
&
data
.
v8
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 7 [%s]
\n
"
,
statement
);
r
=
SQLBindParameter
(
stmt
,
7
,
SQL_PARAM_INPUT
,
SQL_C_FLOAT
,
SQL_FLOAT
,
ignore
,
ignore
,
&
data
.
f4
,
ignore
,
NULL
);
r
=
SQLBindParameter
(
stmt
,
7
,
SQL_PARAM_INPUT
,
SQL_C_FLOAT
,
SQL_FLOAT
,
ignore
d
,
ignored
,
&
data
.
f4
,
ignored
,
NULL
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 8 [%s]
\n
"
,
statement
);
SQLLEN
l8
=
SQL_NULL_DATA
;
r
=
SQLBindParameter
(
stmt
,
8
,
SQL_PARAM_INPUT
,
SQL_C_DOUBLE
,
SQL_DOUBLE
,
ignore
,
ignore
,
&
data
.
f8
,
ignore
,
&
l8
);
r
=
SQLBindParameter
(
stmt
,
8
,
SQL_PARAM_INPUT
,
SQL_C_DOUBLE
,
SQL_DOUBLE
,
ignore
d
,
ignored
,
&
data
.
f8
,
ignored
,
&
l8
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 9 [%s]
\n
"
,
statement
);
lbin
=
SQL_NTS
;
r
=
SQLBindParameter
(
stmt
,
9
,
SQL_PARAM_INPUT
,
SQL_C_BINARY
,
SQL_VARBINARY
,
sizeof
(
data
.
bin
)
-
1
,
ignore
,
&
data
.
bin
,
ignore
,
&
lbin
);
r
=
SQLBindParameter
(
stmt
,
9
,
SQL_PARAM_INPUT
,
SQL_C_BINARY
,
SQL_VARBINARY
,
sizeof
(
data
.
bin
)
-
1
,
ignore
d
,
&
data
.
bin
,
ignored
,
&
lbin
);
if
(
r
)
break
;
fprintf
(
stderr
,
"bind 10 [%s]
\n
"
,
statement
);
lblob
=
SQL_NTS
;
r
=
SQLBindParameter
(
stmt
,
10
,
SQL_PARAM_INPUT
,
SQL_C_CHAR
,
SQL_VARCHAR
,
sizeof
(
data
.
blob
)
-
1
,
ignore
,
&
data
.
blob
,
ignore
,
&
lblob
);
r
=
SQLBindParameter
(
stmt
,
10
,
SQL_PARAM_INPUT
,
SQL_C_CHAR
,
SQL_VARCHAR
,
sizeof
(
data
.
blob
)
-
1
,
ignore
d
,
&
data
.
blob
,
ignored
,
&
lblob
);
if
(
r
)
break
;
fprintf
(
stderr
,
"execute [%s]
\n
"
,
statement
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录