提交 7693950d 编写于 作者: S Shengliang Guan

Merge remote-tracking branch 'origin/3.0' into fix/tsim

---
title: 配置参数
description: 'TDengine 客户端和服务配置列表'
description: "TDengine 客户端和服务配置列表"
---
## 为服务端指定配置文件
......@@ -21,8 +21,6 @@ taosd -C
TDengine 系统的前台交互客户端应用程序为 taos,以及应用驱动,它可以与 taosd 共享同一个配置文件 taos.cfg,也可以使用单独指定配置文件。运行 taos 时,使用参数-c 指定配置文件目录,如 taos -c /home/cfg,表示使用/home/cfg/目录下的 taos.cfg 配置文件中的参数,缺省目录是/etc/taos。更多 taos 的使用方法请见帮助信息 `taos --help`
**2.0.10.0 之后版本支持命令行以下参数显示当前客户端参数的配置**
```bash
taos -C
```
......@@ -47,19 +45,19 @@ taos --dump-config
### firstEp
| 属性 | 说明 |
| -------- | --------------------------------------------------------------- |
| 适用范围 | 服务端和客户端均适用 |
| 属性 | 说明 |
| -------- | -------------------------------------------------------------- |
| 适用范围 | 服务端和客户端均适用 |
| 含义 | taosd 或者 taos 启动时,主动连接的集群中首个 dnode 的 endpoint |
| 缺省值 | localhost:6030 |
| 缺省值 | localhost:6030 |
### secondEp
| 属性 | 说明 |
| -------- | -------------------------------------------------------------------------------------- |
| 适用范围 | 服务端和客户端均适用 |
| 属性 | 说明 |
| -------- | ------------------------------------------------------------------------------------- |
| 适用范围 | 服务端和客户端均适用 |
| 含义 | taosd 或者 taos 启动时,如果 firstEp 连接不上,尝试连接集群中第二个 dnode 的 endpoint |
| 缺省值 | 无 |
| 缺省值 | 无 |
### fqdn
......@@ -77,7 +75,6 @@ taos --dump-config
| 适用范围 | 仅服务端适用 |
| 含义 | taosd 启动后,对外服务的端口号 |
| 缺省值 | 6030 |
| 补充说明 | RESTful 服务在 2.4.0.0 之前(不含)由 taosd 提供,默认端口为 6041; 在 2.4.0.0 及后续版本由 taosAdapter,默认端口为 6041 |
:::note
确保集群中所有主机在端口 6030 上的 TCP 协议能够互通。(详细的端口情况请参见下表)
......@@ -87,8 +84,8 @@ taos --dump-config
| TCP | 6030 | 客户端与服务端之间通讯,多节点集群的节点间通讯。 | 由配置文件设置 serverPort 决定。 |
| TCP | 6041 | 客户端与服务端之间的 RESTful 通讯。 | 随 serverPort 端口变化。注意 taosAdapter 配置或有不同,请参考相应[文档](/reference/taosadapter/)。 |
| TCP | 6043 | TaosKeeper 监控服务端口。 | 随 TaosKeeper 启动参数设置变化。 |
| TCP | 6044 | 支持 StatsD 的数据接入端口。 | 随 taosAdapter 启动参数设置变化(2.3.0.1+以上版本)。 |
| UDP | 6045 | 支持 collectd 数据接入端口。 | 随 taosAdapter 启动参数设置变化(2.3.0.1+以上版本)。 |
| TCP | 6044 | 支持 StatsD 的数据接入端口。 | 随 taosAdapter 启动参数设置变化|
| UDP | 6045 | 支持 collectd 数据接入端口。 | 随 taosAdapter 启动参数设置变化 |
| TCP | 6060 | 企业版内 Monitor 服务的网络端口。 | |
### maxShellConns
......@@ -104,28 +101,28 @@ taos --dump-config
### monitor
| 属性 | 说明 |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | 服务器内部的系统监控开关。监控主要负责收集物理节点的负载状况,包括 CPU、内存、硬盘、网络带宽的监控记录,监控信息将通过 HTTP 协议发送给由 `monitorFqdn``monitorProt` 指定的 TaosKeeper 监控服务 |
| 取值范围 | 0:关闭监控服务, 1:激活监控服务。 |
| 缺省值 | 1 |
| 取值范围 | 0:关闭监控服务, 1:激活监控服务。 |
| 缺省值 | 1 |
### monitorFqdn
| 属性 | 说明 |
| -------- | -------------------------------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | -------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | TaosKeeper 监控服务的 FQDN |
| 缺省值 | 无 |
| 缺省值 | 无 |
### monitorPort
| 属性 | 说明 |
| -------- | -------------------------------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | --------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | TaosKeeper 监控服务的端口号 |
| 缺省值 | 6043 |
| 缺省值 | 6043 |
### monitorInterval
......@@ -134,10 +131,9 @@ taos --dump-config
| 适用范围 | 仅服务端适用 |
| 含义 | 监控数据库记录系统参数(CPU/内存)的时间间隔 |
| 单位 | 秒 |
| 取值范围 | 1-200000 |
| 取值范围 | 1-200000 |
| 缺省值 | 30 |
### telemetryReporting
| 属性 | 说明 |
......@@ -149,25 +145,43 @@ taos --dump-config
## 查询相关
### queryBufferSize
### queryPolicy
| 属性 | 说明 |
| -------- | ----------------------------- |
| 适用范围 | 仅客户端适用 |
| 含义 | 查询语句的执行策略 |
| 单位 | 无 |
| 缺省值 | 1 |
| 补充说明 | 1: 只使用 vnode,不使用 qnode |
2: 没有扫描算子的子任务在 qnode 执行,带扫描算子的子任务在 vnode 执行
3: vnode 只运行扫描算子,其余算子均在 qnode 执行 |
### querySmaOptimize
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 仅客户端适用 |
| 含义 | sma index 的优化策略 |
| 单位 | 无 |
| 缺省值 | 0 |
| 补充说明 |
0: 表示不使用 sma index,永远从原始数据进行查询
1: 表示使用 sma index,对符合的语句,直接从预计算的结果进行查询 |
| 属性 | 说明 |
| -------- | ------------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | 为所有并发查询占用保留的内存大小。 |
| 单位 | MB |
| 缺省值 | 无 |
| 补充说明 | 计算规则可以根据实际应用可能的最大并发数和表的数字相乘,再乘 170 。<br/>(2.0.15 以前的版本中,此参数的单位是字节) |
### maxNumOfDistinctRes
| 属性 | 说明 |
| -------- | -------------------------------- |
| -------- | -------------------------------- | --- |
| 适用范围 | 仅服务端适用 |
| 含义 | 允许返回的 distinct 结果最大行数 |
| 取值范围 | 默认值为 10 万,最大值 1 亿 |
| 缺省值 | 10 万 |
| 补充说明 | 2.3 版本新增。 | |
## 区域相关
......@@ -306,12 +320,12 @@ charset 的有效值是 UTF-8。
### supportVnodes
| 属性 | 说明 |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | dnode 支持的最大 vnode 数目 |
| 取值范围 | 0-4096 |
| 缺省值 | 256 |
| 属性 | 说明 |
| -------- | --------------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | dnode 支持的最大 vnode 数目 |
| 取值范围 | 0-4096 |
| 缺省值 | 256 |
## 时间相关
......@@ -366,7 +380,6 @@ charset 的有效值是 UTF-8。
| 单位 | bytes |
| 取值范围 | 0: 对所有查询结果均进行压缩 >0: 查询结果中任意列大小超过该值的消息才进行压缩 -1: 不压缩 |
| 缺省值 | -1 |
| 补充说明 | 2.3.0.0 版本新增。 |
## 日志相关
......@@ -464,7 +477,7 @@ charset 的有效值是 UTF-8。
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 服务端和客户端均适用 |
| 含义 | query 模块的日志开关 |
| 含义 | query 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
......@@ -481,7 +494,7 @@ charset 的有效值是 UTF-8。
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 仅服务端适用 |
| 适用范围 | 仅服务端适用 |
| 含义 | dnode 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | 135 |
......@@ -490,29 +503,29 @@ charset 的有效值是 UTF-8。
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 仅服务端适用 |
| 适用范围 | 仅服务端适用 |
| 含义 | vnode 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
### mDebugFlag
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | mnode 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | 135 |
### wDebugFlag
| 属性 | 说明 |
| -------- | ------------------ |
| 适用范围 | 仅服务端适用 |
| 含义 | mnode 模块的日志开关 |
| 含义 | wal 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | 135 |
### wDebugFlag
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | wal 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | 135 |
### sDebugFlag
| 属性 | 说明 |
......@@ -533,57 +546,86 @@ charset 的有效值是 UTF-8。
### tqDebugFlag
| 属性 | 说明 |
| -------- | ------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | ----------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | tq 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
| 取值范围 | 同上 |
| 缺省值 | |
### fsDebugFlag
| 属性 | 说明 |
| -------- | ------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | ----------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | fs 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
| 取值范围 | 同上 |
| 缺省值 | |
### udfDebugFlag
| 属性 | 说明 |
| -------- | ---------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | ------------------ |
| 适用范围 | 仅服务端适用 |
| 含义 | UDF 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
| 取值范围 | 同上 |
| 缺省值 | |
### smaDebugFlag
| 属性 | 说明 |
| -------- | ---------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | ------------------ |
| 适用范围 | 仅服务端适用 |
| 含义 | sma 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
| 取值范围 | 同上 |
| 缺省值 | |
### idxDebugFlag
| 属性 | 说明 |
| -------- | ---------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | -------------------- |
| 适用范围 | 仅服务端适用 |
| 含义 | index 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
| 取值范围 | 同上 |
| 缺省值 | |
### tdbDebugFlag
| 属性 | 说明 |
| -------- | ---------------------- |
| 适用范围 | 仅服务端适用 |
| 属性 | 说明 |
| -------- | ------------------ |
| 适用范围 | 仅服务端适用 |
| 含义 | tdb 模块的日志开关 |
| 取值范围 | 同上 |
| 缺省值 | |
| 取值范围 | 同上 |
| 缺省值 | |
## Schemaless 相关
### smlChildTableName
| 属性 | 说明 |
| -------- | ------------------------- |
| 适用范围 | 仅客户端适用 |
| 含义 | schemaless 自定义的子表名 |
| 类型 | 字符串 |
| 缺省值 | 无 |
### smlTagName
| 属性 | 说明 |
| -------- | ------------------------------------ |
| 适用范围 | 仅客户端适用 |
| 含义 | schemaless tag 为空时默认的 tag 名字 |
| 类型 | 字符串 |
| 缺省值 | _tag_null |
### smlDataFormat
| 属性 | 说明 |
| -------- | ----------------------------- |
| 适用范围 | 仅客户端适用 |
| 含义 | schemaless 列数据是否顺序一致 |
| 值域 | 0:不一致;1: 一致 |
| 缺省值 | 1 |
## 其他
......@@ -596,3 +638,12 @@ charset 的有效值是 UTF-8。
| 取值范围 | 0:否,1:是 |
| 缺省值 | 1 |
| 补充说明 | 不同的启动方式,生成 core 文件的目录如下:1、systemctl start taosd 启动:生成的 core 在根目录下 <br/> 2、手动启动,就在 taosd 执行目录下。 |
### udf
| 属性 | 说明 |
| -------- | ------------------ |
| 适用范围 | 仅服务端适用 |
| 含义 | 是否启动 udf 服务 |
| 取值范围 | 0: 不启动;1:启动 |
| 缺省值 | 1 |
......@@ -175,7 +175,7 @@ int32_t tsdbCacheInsertLastrow(SLRUCache *pCache, STsdb *pTsdb, tb_uid_t uid, ST
cacheRow = (STSRow *)taosLRUCacheValue(pCache, h);
if (row->ts >= cacheRow->ts) {
if (row->ts == cacheRow->ts) {
STSRow *mergedRow;
STSRow *mergedRow = NULL;
SRowMerger merger = {0};
STSchema *pTSchema = metaGetTbTSchema(pTsdb->pVnode->pMeta, uid, -1);
......
......@@ -97,7 +97,7 @@
# TD-17738 ./test.sh -f tsim/parser/col_arithmetic_operation.sim
# TD-17661 ./test.sh -f tsim/parser/columnValue.sim
./test.sh -f tsim/parser/commit.sim
# TD-17661 ./test.sh -f tsim/parser/condition.sim
./test.sh -f tsim/parser/condition.sim
./test.sh -f tsim/parser/constCol.sim
#./test.sh -f tsim/parser/create_db.sim
./test.sh -f tsim/parser/create_mt.sim
......
......@@ -132,7 +132,7 @@ if $rows != 28 then
return -1
endi
sql select ts,c1,c7 from stb1 where c7 = false
sql select ts,c1,c7 from stb1 where c7 = false order by ts
if $rows != 14 then
return -1
endi
......@@ -173,7 +173,7 @@ if $data32 != 0 then
return -1
endi
sql select ts,c1,c7 from stb1 where c7 = true
sql select ts,c1,c7 from stb1 where c7 = true order by ts
if $rows != 14 then
return -1
endi
......@@ -215,7 +215,7 @@ if $data32 != 1 then
endi
sql select * from stb1 where c8 = '51' or c8 = '4'
sql select * from stb1 where c8 = '51' or c8 = '4' order by ts
if $rows != 2 then
return -1
endi
......@@ -350,7 +350,7 @@ sql select * from stb1 where c1 > 50 and (c1 > 53 and c1 < 51 or c1 > 54)
if $rows != 4 then
return -1
endi
sql select * from stb1 where (c1 > 50 and c1 > 53) or (c1 < 51 and c1 > 54)
sql select * from stb1 where (c1 > 50 and c1 > 53) or (c1 < 51 and c1 > 54) order by ts
if $rows != 5 then
return -1
endi
......@@ -401,7 +401,7 @@ endi
if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 and (c1 > 53 or c1 < 51 and c1 > 54)
sql select * from stb1 where c1 > 50 and (c1 > 53 or c1 < 51 and c1 > 54) order by ts
if $rows != 5 then
return -1
endi
......@@ -420,11 +420,11 @@ endi
if $data40 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53) and (c1 < 51 and c1 > 54)
sql select * from stb1 where (c1 > 50 or c1 > 53) and (c1 < 51 and c1 > 54) order by ts
if $rows != 0 then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51 and c1 > 54)
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51 and c1 > 54) order by ts
if $rows != 8 then
return -1
endi
......@@ -443,7 +443,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53 and c1 < 51) and c1 > 54
sql select * from stb1 where (c1 > 50 or c1 > 53 and c1 < 51) and c1 > 54 order by ts
if $rows != 4 then
return -1
endi
......@@ -459,7 +459,7 @@ endi
if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51) and c1 > 54
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51) and c1 > 54 order by ts
if $rows != 8 then
return -1
endi
......@@ -478,7 +478,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 and c1 > 53) or (c1 < 51 or c1 > 54)
sql select * from stb1 where (c1 > 50 and c1 > 53) or (c1 < 51 or c1 > 54) order by ts
if $rows != 25 then
return -1
endi
......@@ -497,7 +497,7 @@ endi
if $data40 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 and (c1 > 53 or c1 < 51 or c1 > 54)
sql select * from stb1 where c1 > 50 and (c1 > 53 or c1 < 51 or c1 > 54) order by ts
if $rows != 5 then
return -1
endi
......@@ -516,7 +516,7 @@ endi
if $data40 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 and c1 > 53 or c1 < 51) or c1 > 54
sql select * from stb1 where (c1 > 50 and c1 > 53 or c1 < 51) or c1 > 54 order by ts
if $rows != 25 then
return -1
endi
......@@ -535,7 +535,7 @@ endi
if $data40 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 and (c1 > 53 or c1 < 51) or c1 > 54
sql select * from stb1 where c1 > 50 and (c1 > 53 or c1 < 51) or c1 > 54 order by ts
if $rows != 5 then
return -1
endi
......@@ -554,7 +554,7 @@ endi
if $data40 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53) and (c1 < 51 or c1 > 54)
sql select * from stb1 where (c1 > 50 or c1 > 53) and (c1 < 51 or c1 > 54) order by ts
if $rows != 4 then
return -1
endi
......@@ -570,7 +570,7 @@ endi
if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51 or c1 > 54)
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51 or c1 > 54) order by ts
if $rows != 8 then
return -1
endi
......@@ -589,7 +589,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53 and c1 < 51) or c1 > 54
sql select * from stb1 where (c1 > 50 or c1 > 53 and c1 < 51) or c1 > 54 order by ts
if $rows != 8 then
return -1
endi
......@@ -608,7 +608,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51) or c1 > 54
sql select * from stb1 where c1 > 50 or (c1 > 53 and c1 < 51) or c1 > 54 order by ts
if $rows != 8 then
return -1
endi
......@@ -627,7 +627,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53) or (c1 < 51 and c1 > 54)
sql select * from stb1 where (c1 > 50 or c1 > 53) or (c1 < 51 and c1 > 54) order by ts
if $rows != 8 then
return -1
endi
......@@ -646,7 +646,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53 or c1 < 51) and c1 > 54
sql select * from stb1 where (c1 > 50 or c1 > 53 or c1 < 51) and c1 > 54 order by ts
if $rows != 4 then
return -1
endi
......@@ -662,7 +662,7 @@ endi
if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51 and c1 > 54)
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51 and c1 > 54) order by ts
if $rows != 8 then
return -1
endi
......@@ -681,7 +681,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51) and c1 > 54
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51) and c1 > 54 order by ts
if $rows != 8 then
return -1
endi
......@@ -700,7 +700,7 @@ endi
if $data40 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where c1 > 62 or (c1 > 53 or c1 < 51) and c1 > 54
sql select * from stb1 where c1 > 62 or (c1 > 53 or c1 < 51) and c1 > 54 order by ts
if $rows != 4 then
return -1
endi
......@@ -716,7 +716,7 @@ endi
if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53) or (c1 < 51 or c1 > 54)
sql select * from stb1 where (c1 > 50 or c1 > 53) or (c1 < 51 or c1 > 54) order by ts
if $rows != 28 then
return -1
endi
......@@ -735,7 +735,7 @@ endi
if $data40 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51 or c1 > 54)
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51 or c1 > 54) order by ts
if $rows != 28 then
return -1
endi
......@@ -754,7 +754,7 @@ endi
if $data40 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where (c1 > 50 or c1 > 53 or c1 < 51) or c1 > 54
sql select * from stb1 where (c1 > 50 or c1 > 53 or c1 < 51) or c1 > 54 order by ts
if $rows != 28 then
return -1
endi
......@@ -773,7 +773,7 @@ endi
if $data40 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51) or c1 > 54
sql select * from stb1 where c1 > 50 or (c1 > 53 or c1 < 51) or c1 > 54 order by ts
if $rows != 28 then
return -1
endi
......@@ -792,7 +792,7 @@ endi
if $data40 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select ts,c1 from stb1 where (c1 > 60 or c1 < 10 or (c1 > 20 and c1 < 30)) and ts > '2021-05-05 18:19:00.000' and ts < '2021-05-05 18:19:25.000' and c1 != 21 and c1 != 22
sql select ts,c1 from stb1 where (c1 > 60 or c1 < 10 or (c1 > 20 and c1 < 30)) and ts > '2021-05-05 18:19:00.000' and ts < '2021-05-05 18:19:25.000' and c1 != 21 and c1 != 22 order by ts
if $rows != 6 then
return -1
endi
......@@ -834,7 +834,7 @@ if $data51 != 61 then
endi
sql select * from stb1 where (c1 > 40 or c1 < 20) and (c2 < 53 or c2 >= 63) and c3 > 1 and c3 < 5
sql select * from stb1 where (c1 > 40 or c1 < 20) and (c2 < 53 or c2 >= 63) and c3 > 1 and c3 < 5 order by ts
if $rows != 3 then
return -1
endi
......@@ -857,7 +857,7 @@ if $data21 != 4 then
return -1
endi
sql select * from stb1 where (c1 > 52 or c1 < 10) and (c2 > 1 and c2 < 61)
sql select * from stb1 where (c1 > 52 or c1 < 10) and (c2 > 1 and c2 < 61) order by ts
if $rows != 5 then
return -1
endi
......@@ -892,7 +892,7 @@ if $data41 != 54 then
return -1
endi
sql select * from stb1 where (c3 > 52 or c3 < 10) and (c4 > 1 and c4 < 61) and (c5 = 2 or c6 = 3.0 or c6 = 4.0 or c6 = 53);
sql select * from stb1 where (c3 > 52 or c3 < 10) and (c4 > 1 and c4 < 61) and (c5 = 2 or c6 = 3.0 or c6 = 4.0 or c6 = 53) order by ts
if $rows != 4 then
return -1
endi
......@@ -1003,7 +1003,7 @@ if $data01 != NULL then
endi
#xxx
sql select * from stb1 where c8 like '1';
sql select * from stb1 where c8 like '1' order by ts;
if $rows != 1 then
return -1
endi
......@@ -1012,7 +1012,7 @@ if $data00 != @21-05-05 18:19:00.000@ then
endi
#xxx
sql select * from stb1 where c8 like '1%' and c8 like '%1';
sql select * from stb1 where c8 like '1%' and c8 like '%1' order by ts;
if $rows != 2 then
return -1
endi
......@@ -1024,7 +1024,7 @@ if $data10 != @21-05-05 18:19:04.000@ then
endi
#xxx
sql select * from stb1 where c8 like '1' and c8 like '2';
sql select * from stb1 where c8 like '1' and c8 like '2' order by ts;
if $rows != 0 then
return -1
endi
......@@ -1040,7 +1040,7 @@ if $data01 != NULL then
return -1
endi
sql select * from stb1 where c1 is not null;
sql select * from stb1 where c1 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1050,7 +1050,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c2 is not null;
sql select * from stb1 where c2 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1060,7 +1060,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c3 is not null;
sql select * from stb1 where c3 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1070,7 +1070,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c4 is not null;
sql select * from stb1 where c4 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1080,7 +1080,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c5 is not null;
sql select * from stb1 where c5 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1090,7 +1090,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c6 is not null;
sql select * from stb1 where c6 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1100,7 +1100,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c7 is not null;
sql select * from stb1 where c7 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1110,7 +1110,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c8 is not null;
sql select * from stb1 where c8 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1120,7 +1120,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c9 is not null;
sql select * from stb1 where c9 is not null order by ts;
if $rows != 28 then
return -1
endi
......@@ -1130,7 +1130,7 @@ endi
if $data01 != 1 then
return -1
endi
sql select * from stb1 where c1 > 63 or c1 is null;
sql select * from stb1 where c1 > 63 or c1 is null order by ts;
if $rows != 2 then
return -1
endi
......@@ -1146,7 +1146,7 @@ endi
if $data11 != NULL then
return -1
endi
sql select * from stb1 where c1 is null and c2 is null;
sql select * from stb1 where c1 is null and c2 is null order by ts;
if $rows != 1 then
return -1
endi
......@@ -1156,11 +1156,11 @@ endi
if $data01 != NULL then
return -1
endi
sql select * from stb1 where c1 is null and c2 is null and c3 is not null;
sql select * from stb1 where c1 is null and c2 is null and c3 is not null order by ts;
if $rows != 0 then
return -1
endi
sql select * from stb1 where c1 is null and c2 is null and ts > '2021-05-05 18:19:00.000' and ts < '2021-05-05 18:19:28.000';
sql select * from stb1 where c1 is null and c2 is null and ts > '2021-05-05 18:19:00.000' and ts < '2021-05-05 18:19:28.000' order by ts;
if $rows != 0 then
return -1
endi
......@@ -1175,7 +1175,7 @@ if $rows != 29 then
return -1
endi
sql select * from stb1 where (c1 is null or c1 > 40) and c1 < 44;
sql select * from stb1 where (c1 is null or c1 > 40) and c1 < 44 order by ts;
if $rows != 3 then
return -1
endi
......@@ -1189,7 +1189,7 @@ if $data20 != @21-05-05 18:19:18.000@ then
return -1
endi
sql select * from stb1 where c1 in (11,21,31,41) and c1 in (11,42);
sql select * from stb1 where c1 in (11,21,31,41) and c1 in (11,42) order by ts;
if $rows != 1 then
return -1
endi
......@@ -1197,7 +1197,7 @@ if $data00 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where c8 in ('11','21','31','41') and c8 in ('11','42');
sql select * from stb1 where c8 in ('11','21','31','41') and c8 in ('11','42') order by ts;
if $rows != 1 then
return -1
endi
......@@ -1205,7 +1205,7 @@ if $data00 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where (c1 > 60 and c2 > 40) or (c1 > 62 and c2 > 50);
sql select * from stb1 where (c1 > 60 and c2 > 40) or (c1 > 62 and c2 > 50) order by ts;
if $rows != 4 then
return -1
endi
......@@ -1222,7 +1222,7 @@ if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 = 3 or c1 = 5 or c1 >= 44 and c1 <= 52;
sql select * from stb1 where c1 = 3 or c1 = 5 or c1 >= 44 and c1 <= 52 order by ts;
if $rows != 4 then
return -1
endi
......@@ -1239,7 +1239,7 @@ if $data30 != @21-05-05 18:19:21.000@ then
return -1
endi
sql select * from stb1 where c8 LIKE '%1';
sql select * from stb1 where c8 LIKE '%1' order by ts;
if $rows != 7 then
return -1
endi
......@@ -1264,7 +1264,7 @@ endi
if $data60 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where c9 LIKE '%1';
sql select * from stb1 where c9 LIKE '%1' order by ts;
if $rows != 7 then
return -1
endi
......@@ -1289,7 +1289,7 @@ endi
if $data60 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where (c8 LIKE '%1' or c9 like '_2') and (c5 > 50 or c6 > 30) and ( c8 like '3_' or c9 like '4_') and (c4 <= 31 or c4 >= 42);
sql select * from stb1 where (c8 LIKE '%1' or c9 like '_2') and (c5 > 50 or c6 > 30) and ( c8 like '3_' or c9 like '4_') and (c4 <= 31 or c4 >= 42) order by ts;
if $rows != 2 then
return -1
endi
......@@ -1300,7 +1300,7 @@ if $data10 != @21-05-05 18:19:17.000@ then
return -1
endi
sql select * from stb1 where c1 in (1,3);
sql select * from stb1 where c1 in (1,3) order by ts;
if $rows != 2 then
return -1
endi
......@@ -1311,7 +1311,7 @@ if $data10 != @21-05-05 18:19:02.000@ then
return -1
endi
sql select * from stb1 where c3 in (11,22);
sql select * from stb1 where c3 in (11,22) order by ts;
if $rows != 2 then
return -1
endi
......@@ -1322,7 +1322,7 @@ if $data10 != @21-05-05 18:19:09.000@ then
return -1
endi
sql select * from stb1 where c4 in (3,33);
sql select * from stb1 where c4 in (3,33) order by ts;
if $rows != 2 then
return -1
endi
......@@ -1338,7 +1338,7 @@ if $rows != 0 then
return -1
endi
sql select * from stb1 where c5 in (3,33) and c8 in ('33','54');
sql select * from stb1 where c5 in (3,33) and c8 in ('33','54') order by ts;
if $rows != 1 then
return -1
endi
......@@ -1346,7 +1346,7 @@ if $data00 != @21-05-05 18:19:14.000@ then
return -1
endi
sql select * from stb1 where c5 in (3,33) or c8 in ('22','54');
sql select * from stb1 where c5 in (3,33) or c8 in ('22','54') order by ts;
if $rows != 4 then
return -1
endi
......@@ -1363,7 +1363,7 @@ if $data30 != @21-05-05 18:19:23.000@ then
return -1
endi
sql select * from stb1 where (c9 in ('3','1','2','4','5') or c9 in ('33','11','22','44','55')) and c9 in ('1','3','11','13');
sql select * from stb1 where (c9 in ('3','1','2','4','5') or c9 in ('33','11','22','44','55')) and c9 in ('1','3','11','13') order by ts;
if $rows != 3 then
return -1
endi
......@@ -1377,7 +1377,7 @@ if $data20 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb2 where (u1 in (1) or u2 in (5,6)) and (u3 in (3,6) or u4 in (7,8)) and ts2 in ('2021-05-05 18:28:02.000','2021-05-05 18:28:15.000','2021-05-05 18:28:01.000');
sql select * from stb2 where (u1 in (1) or u2 in (5,6)) and (u3 in (3,6) or u4 in (7,8)) and ts2 in ('2021-05-05 18:28:02.000','2021-05-05 18:28:15.000','2021-05-05 18:28:01.000') order by ts;
if $rows != 2 then
return -1
endi
......@@ -1388,7 +1388,7 @@ if $data10 != @21-05-05 18:19:01.000@ then
return -1
endi
sql select * from stb2 where u2 in (2) and u3 in (1,2,3) and u4 in (1,2,4,5) and u1 > 3 and u1 < 6 and u1 != 4;
sql select * from stb2 where u2 in (2) and u3 in (1,2,3) and u4 in (1,2,4,5) and u1 > 3 and u1 < 6 and u1 != 4 order by ts;
if $rows != 1 then
return -1
endi
......@@ -1396,7 +1396,7 @@ if $data00 != @21-05-05 18:19:08.000@ then
return -1
endi
sql select avg(c1) from tb1 where (c1 > 12 or c2 > 10) and (c3 < 12 or c3 > 13);
sql select avg(c1) from tb1 where (c1 > 12 or c2 > 10) and (c3 < 12 or c3 > 13) ;
if $rows != 1 then
return -1
endi
......@@ -1408,22 +1408,16 @@ sql select count(c1),sum(c3) from tb1 where ((c7 = true and c6 > 2) or (c1 > 10
if $rows != 2 then
return -1
endi
if $data00 != @21-05-05 18:19:00.000@ then
return -1
endi
if $data01 != 3 then
if $data00 != 3 then
return -1
endi
if $data02 != 14 then
if $data01 != 14 then
return -1
endi
if $data10 != @21-05-05 18:19:05.000@ then
if $data10 != 3 then
return -1
endi
if $data11 != 3 then
return -1
endi
if $data12 != 39 then
if $data11 != 39 then
return -1
endi
......@@ -1447,14 +1441,14 @@ if $rows != 0 then
return -1
endi
sql select * from stb1 where c2 in (0,1);
sql select * from stb1 where c2 in (0,1) order by ts;
if $rows != 1 then
return -1
endi
if $data00 != @21-05-05 18:19:00.000@ then
return -1
endi
sql select * from stb1 where c6 in (0,2,3,1);
sql select * from stb1 where c6 in (0,2,3,1) order by ts;
if $rows != 3 then
return -1
endi
......@@ -1467,7 +1461,7 @@ endi
if $data20 != @21-05-05 18:19:02.000@ then
return -1
endi
sql select ts,c1 from (select * from stb1 where (c1 > 60 or c1 < 10) and (c7 = true or c5 > 2 and c5 < 63)) where (c3 > 61 or c3 < 3);
sql select ts,c1 from (select * from stb1 where (c1 > 60 or c1 < 10) and (c7 = true or c5 > 2 and c5 < 63)) where (c3 > 61 or c3 < 3) order by ts;
if $rows != 3 then
return -1
endi
......@@ -1481,66 +1475,66 @@ if $data20 != @21-05-05 18:19:25.000@ then
return -1
endi
#sql select a.* from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50 order by ts;
#sql select a.* from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50;
sql select a.ts from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50;
if $rows != 4 then
return -1
endi
if $data00 != @21-05-05 18:19:20.000@ then
return -1
endi
if $data10 != @21-05-05 18:19:21.000@ then
return -1
endi
if $data20 != @21-05-05 18:19:24.000@ then
return -1
endi
if $data30 != @21-05-05 18:19:25.000@ then
return -1
endi
#sql select a.ts,a.c1,a.c8,a.c9 from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50 and b.c1 < 60;
sql select a.ts,a.c1,a.c8 from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50 and b.c1 < 60;
if $rows != 2 then
return -1
endi
if $data00 != @21-05-05 18:19:20.000@ then
return -1
endi
if $data10 != @21-05-05 18:19:21.000@ then
return -1
endi
sql select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and (a.c1 < 10 or a.c1 > 30) and (b.u1 < 5 or b.u1 > 5);
if $rows != 4 then
return -1
endi
if $data00 != @21-05-05 18:19:00.000@ then
return -1
endi
if $data10 != @21-05-05 18:19:02.000@ then
return -1
endi
if $data20 != @21-05-05 18:19:12.000@ then
return -1
endi
if $data30 != @21-05-05 18:19:14.000@ then
return -1
endi
sql select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and a.c1 < 30 and b.u1 > 1 and a.c1 > 10 and b.u1 < 8 and b.u1<>5;
if $rows != 3 then
return -1
endi
if $data00 != @21-05-05 18:19:04.000@ then
return -1
endi
if $data10 != @21-05-05 18:19:06.000@ then
return -1
endi
if $data20 != @21-05-05 18:19:10.000@ then
return -1
endi
#if $rows != 4 then
# return -1
#endi
#if $data00 != @21-05-05 18:19:20.000@ then
# return -1
#endi
#if $data10 != @21-05-05 18:19:21.000@ then
# return -1
#endi
#if $data20 != @21-05-05 18:19:24.000@ then
# return -1
#endi
#if $data30 != @21-05-05 18:19:25.000@ then
# return -1
#endi
#sql select a.ts,a.c1,a.c8,a.c9 from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50 and b.c1 < 60 order by ts;
#sql select a.ts,a.c1,a.c8 from (select * from stb1 where c7=true) a, (select * from stb1 where c1 > 30) b where a.ts=b.ts and a.c1 > 50 and b.c1 < 60 order by ts;
#if $rows != 2 then
# return -1
#endi
#if $data00 != @21-05-05 18:19:20.000@ then
# return -1
#endi
#if $data10 != @21-05-05 18:19:21.000@ then
# return -1
#endi
#
#sql select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and (a.c1 < 10 or a.c1 > 30) and (b.u1 < 5 or b.u1 > 5) order by ts;
#if $rows != 4 then
# return -1
#endi
#if $data00 != @21-05-05 18:19:00.000@ then
# return -1
#endi
#if $data10 != @21-05-05 18:19:02.000@ then
# return -1
#endi
#if $data20 != @21-05-05 18:19:12.000@ then
# return -1
#endi
#if $data30 != @21-05-05 18:19:14.000@ then
# return -1
#endi
#
#sql select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and a.c1 < 30 and b.u1 > 1 and a.c1 > 10 and b.u1 < 8 and b.u1<>5 order by ts;
#if $rows != 3 then
# return -1
#endi
#if $data00 != @21-05-05 18:19:04.000@ then
# return -1
#endi
#if $data10 != @21-05-05 18:19:06.000@ then
# return -1
#endi
#if $data20 != @21-05-05 18:19:10.000@ then
# return -1
#endi
sql select * from stb1 where c1 is null and c1 is not null;
if $rows != 0 then
......@@ -1560,7 +1554,7 @@ if $rows != 0 then
return -1
endi
sql select * from stb1 where (c1 > 20 or c1 < 25) and (c1 > 62 or c1 < 3);
sql select * from stb1 where (c1 > 20 or c1 < 25) and (c1 > 62 or c1 < 3) order by ts;
if $rows != 4 then
return -1
endi
......@@ -1577,7 +1571,7 @@ if $data30 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 > 11 and c1 != 11 and c1 != 14 and c1 < 14;
sql select * from stb1 where c1 > 11 and c1 != 11 and c1 != 14 and c1 < 14 order by ts;
if $rows != 2 then
return -1
endi
......@@ -1587,7 +1581,7 @@ endi
if $data10 != @21-05-05 18:19:06.000@ then
return -1
endi
sql select * from stb1 where (c1 > 60 or c1 < 4 or c1 > 10 and c1 < 20 and c1 != 13 or c1 < 2 or c1 > 50)
sql select * from stb1 where (c1 > 60 or c1 < 4 or c1 > 10 and c1 < 20 and c1 != 13 or c1 < 2 or c1 > 50) order by ts
if $rows != 14 then
return -1
endi
......@@ -1604,7 +1598,7 @@ if $data30 != @21-05-05 18:19:04.000@ then
return -1
endi
sql select * from stb1 where c1 > 62 or c1 >= 62;
sql select * from stb1 where c1 > 62 or c1 >= 62 order by ts;
if $rows != 3 then
return -1
endi
......@@ -1618,7 +1612,7 @@ if $data20 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 > 62 and c1 >= 62;
sql select * from stb1 where c1 > 62 and c1 >= 62 order by ts;
if $rows != 2 then
return -1
endi
......@@ -1629,7 +1623,7 @@ if $data10 != @21-05-05 18:19:27.000@ then
return -1
endi
sql select * from stb1 where c1 >= 62 and c1 != 62;
sql select * from stb1 where c1 >= 62 and c1 != 62 order by ts;
if $rows != 2 then
return -1
endi
......@@ -1653,7 +1647,7 @@ if $data00 != @21-05-05 18:19:25.000@ then
return -1
endi
sql select * from stb1 where c1 > 62 and c1 != 62;
sql select * from stb1 where c1 > 62 and c1 != 62 order by ts;
if $rows != 2 then
return -1
endi
......@@ -1713,12 +1707,12 @@ if $rows != 0 then
return -1
endi
sql select * from stb1 where c2 >= 3 and c2 <= 3;
sql select * from stb1 where c2 >= 3 and c2 <= 3 order by ts;
if $data00 != @21-05-05 18:19:02.000@ then
return -1
endi
sql select * from stb1 where (c2 in (1,2,3,4) or c2 in (11,12,13,14)) and c2 != 11 and c2 >2 and c2 != 14;
sql select * from stb1 where (c2 in (1,2,3,4) or c2 in (11,12,13,14)) and c2 != 11 and c2 >2 and c2 != 14 order by ts;
if $rows != 4 then
return -1
endi
......@@ -1760,7 +1754,7 @@ if $data20 != @21-05-05 18:19:03.000@ then
return -1
endi
sql select * from (select * from stb1 where c2 > 10 and c6 < 40) where c9 in ('11','21','31');
sql select * from (select * from stb1 where c2 > 10 and c6 < 40) where c9 in ('11','21','31') order by ts;
if $rows != 3 then
return -1
endi
......@@ -1774,7 +1768,7 @@ if $data20 != @21-05-05 18:19:12.000@ then
return -1
endi
sql select * from stb1 where c1 > 40 and c2 > 50 and c3 > 62 or c1 < 2 and c2 < 3;
sql select * from stb1 where c1 > 40 and c2 > 50 and c3 > 62 or c1 < 2 and c2 < 3 order by ts;
if $rows != 3 then
return -1
endi
......@@ -1803,7 +1797,7 @@ if $rows != 29 then
return -1
endi
sql select * from stb1 where (c1 > 60 and c2 < 63) or (c1 >62 and c3 < 30) or (c1 is null and c2 is null);
sql select * from stb1 where (c1 > 60 and c2 < 63) or (c1 >62 and c3 < 30) or (c1 is null and c2 is null) order by ts;
if $rows != 3 then
return -1
endi
......@@ -1817,7 +1811,7 @@ if $data20 != @21-05-05 18:19:28.000@ then
return -1
endi
sql select * from stb1 where c1 between 60 and 9999999999;
sql select * from stb1 where c1 between 60 and 9999999999 order by ts;
if $rows != 4 then
return -1
endi
......@@ -1873,7 +1867,7 @@ sql select * from stb1 where c5 in (9999999999);
if $rows != 0 then
return -1
endi
sql select * from stb1 where c5 in (-9999999999,3,4,9999999999);
sql select * from stb1 where c5 in (-9999999999,3,4,9999999999) order by ts;
if $rows != 2 then
return -1
endi
......@@ -1884,7 +1878,7 @@ if $data10 != @21-05-05 18:19:03.000@ then
return -1
endi
sql select * from stb3 where c1 > 3 and c1 < 2;
sql select * from stb3 where c1 > 3 and c1 < 2 order by ts;
if $rows != 0 then
return -1
endi
......@@ -1936,7 +1930,7 @@ if $data70 != @21-04-06 18:19:03.000@ then
endi
sql select * from stb3 where c1 > 11;
sql select * from stb3 where c1 > 11 order by ts;
if $rows != 4 then
return -1
endi
......@@ -1953,12 +1947,12 @@ if $data30 != @21-05-06 18:19:28.000@ then
return -1
endi
sql select * from stb3 where c1 is not null or c1 is null;
sql select * from stb3 where c1 is not null or c1 is null order by ts;
if $rows != 14 then
return -1
endi
sql select ts,c1 from stb4 where c1 = 200;
sql select ts,c1 from stb4 where c1 = 200 order by ts;
if $rows != 1 then
return -1
endi
......@@ -1973,7 +1967,7 @@ endi
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= 200 and c2 > 500 and c3 < 800 and c4 between 33 and 37 and c4 != 35 and c2 < 555 and c1 < 339 and c1 in (331,333,335);
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= 200 and c2 > 500 and c3 < 800 and c4 between 33 and 37 and c4 != 35 and c2 < 555 and c1 < 339 and c1 in (331,333,335) order by ts;
if $rows != 3 then
return -1
endi
......@@ -1987,7 +1981,7 @@ if $data20 != @21-07-10 01:00:00.334@ then
return -1
endi
sql select ts,c1,c2,c3,c4 from stb4 where c1 > -3 and c1 < 5;
sql select ts,c1,c2,c3,c4 from stb4 where c1 > -3 and c1 < 5 order by ts;
if $rows != 4 then
return -1
endi
......@@ -2004,7 +1998,7 @@ if $data30 != @21-07-10 01:00:00.003@ then
return -1
endi
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= 2 and c1 < 5;
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= 2 and c1 < 5 order by ts;
if $rows != 3 then
return -1
endi
......@@ -2018,12 +2012,12 @@ if $data20 != @21-07-10 01:00:00.003@ then
return -1
endi
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= -3 and c1 < 1300;
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= -3 and c1 < 1300 order by ts;
if $rows != 1299 then
return -1
endi
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= 1298 and c1 < 1300 or c2 > 210 and c2 < 213;
sql select ts,c1,c2,c3,c4 from stb4 where c1 >= 1298 and c1 < 1300 or c2 > 210 and c2 < 213 order by ts;
if $rows != 4 then
return -1
endi
......@@ -2056,7 +2050,7 @@ if $rows != 1099 then
endi
sql select ts,c1,c2,c3,c4 from stb4 where c1 in(10,100, 1100,3300) and c1 != 10;
sql select ts,c1,c2,c3,c4 from stb4 where c1 in(10,100, 1100,3300) and c1 != 10 order by ts;
if $rows != 3 then
return -1
endi
......@@ -2072,14 +2066,15 @@ endi
print "ts test"
sql_error select ts,c1,c7 from stb1 where ts != '2021-05-05 18:19:27'
sql_error select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:03.000' or ts < '2021-05-05 18:19:02.000';
sql_error select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:03.000' and ts > '2021-05-05 18:19:20.000' and ts != '2021-05-05 18:19:22.000';
sql select ts,c1,c7 from stb1 where ts != '2021-05-05 18:19:27'
sql select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:03.000' or ts < '2021-05-05 18:19:02.000';
sql select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:03.000' and ts > '2021-05-05 18:19:20.000' and ts != '2021-05-05 18:19:22.000';
sql_error select * from stb1 where ts2 like '2021-05-05%';
sql_error select ts,c1,c2 from stb1 where (ts > '2021-05-05 18:19:25.000' or ts < '2021-05-05 18:19:05.000') and ts > '2021-05-05 18:19:01.000' and ts < '2021-05-05 18:19:27.000';
sql_error select ts,c1,c2 from stb1 where (ts > '2021-05-05 18:19:20.000' or ts < '2021-05-05 18:19:05.000') and ts != '2021-05-05 18:19:25.000';
sql_error select ts,c1,c2 from stb1 where ((ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:15.000' and ts <= '2021-05-05 18:19:20.000') or (ts >= '2021-05-05 18:19:11.000' and ts <= '2021-05-05 18:19:14.000'));
sql_error select ts,c1,c2 from stb1 where ts >= '2021-05-05 18:19:25.000' or ts < '2021-05-05 18:19:24.000';
sql select ts,c1,c2 from stb1 where (ts > '2021-05-05 18:19:25.000' or ts < '2021-05-05 18:19:05.000') and ts > '2021-05-05 18:19:01.000' and ts < '2021-05-05 18:19:27.000';
sql select ts,c1,c2 from stb1 where (ts > '2021-05-05 18:19:20.000' or ts < '2021-05-05 18:19:05.000') and ts != '2021-05-05 18:19:25.000';
sql select ts,c1,c2 from stb1 where ((ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:15.000' and ts <= '2021-05-05 18:19:20.000') or (ts >= '2021-05-05 18:19:11.000' and ts <= '2021-05-05 18:19:14.000'));
sql select ts,c1,c2 from stb1 where ts >= '2021-05-05 18:19:25.000' or ts < '2021-05-05 18:19:24.000';
sql select * from stb1 where ts is null;
if $rows != 0 then
return -1
......@@ -2125,7 +2120,7 @@ sql select ts,c1,c2 from stb1 where ts >= '2021-05-05 18:19:25.000' or ts < '202
if $rows != 29 then
return -1
endi
sql select ts,c1,c2 from stb1 where ts >= '2021-05-05 18:19:25.000' or ts > '2021-05-05 18:19:27.000';
sql select ts,c1,c2 from stb1 where ts >= '2021-05-05 18:19:25.000' or ts > '2021-05-05 18:19:27.000' order by ts;
if $rows != 4 then
return -1
endi
......@@ -2152,7 +2147,7 @@ if $rows != 29 then
return -1
endi
sql select ts,c1,c2 from stb1 where ((ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.999') or (ts >= '2021-05-05 18:19:15.000' and ts <= '2021-05-05 18:19:20.000') or (ts >= '2021-05-05 18:19:11.000' and ts <= '2021-05-05 18:19:14.999'));
sql select ts,c1,c2 from stb1 where ((ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.999') or (ts >= '2021-05-05 18:19:15.000' and ts <= '2021-05-05 18:19:20.000') or (ts >= '2021-05-05 18:19:11.000' and ts <= '2021-05-05 18:19:14.999')) order by ts;
if $rows != 16 then
return -1
endi
......@@ -2160,7 +2155,7 @@ if $data00 != @21-05-05 18:19:05.000@ then
return -1
endi
sql select ts,c1,c2 from stb1 where (ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:12.000' and ts <= '2021-05-05 18:19:14.000') or (ts >= '2021-05-05 18:19:08.000' and ts <= '2021-05-05 18:19:17.000');
sql select ts,c1,c2 from stb1 where (ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:12.000' and ts <= '2021-05-05 18:19:14.000') or (ts >= '2021-05-05 18:19:08.000' and ts <= '2021-05-05 18:19:17.000') order by ts;
if $rows != 13 then
return -1
endi
......@@ -2168,7 +2163,7 @@ if $data00 != @21-05-05 18:19:05.000@ then
return -1
endi
sql select ts,c1,c2 from stb1 where (ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:02.000' and ts <= '2021-05-05 18:19:03.000') or (ts >= '2021-05-05 18:19:01.000' and ts <= '2021-05-05 18:19:08.000');
sql select ts,c1,c2 from stb1 where (ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:02.000' and ts <= '2021-05-05 18:19:03.000') or (ts >= '2021-05-05 18:19:01.000' and ts <= '2021-05-05 18:19:08.000') order by ts;
if $rows != 10 then
return -1
endi
......@@ -2176,7 +2171,7 @@ if $data00 != @21-05-05 18:19:01.000@ then
return -1
endi
sql select ts,c1,c2 from stb1 where ((ts >= '2021-05-05 18:19:08.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:02.000' and ts <= '2021-05-05 18:19:03.000') or (ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:06.000') or (ts >= '2021-05-05 18:19:03.000' and ts <= '2021-05-05 18:19:12.000')) and (ts >= '2021-05-05 18:19:10.000');
sql select ts,c1,c2 from stb1 where ((ts >= '2021-05-05 18:19:08.000' and ts <= '2021-05-05 18:19:10.000') or (ts >= '2021-05-05 18:19:02.000' and ts <= '2021-05-05 18:19:03.000') or (ts >= '2021-05-05 18:19:05.000' and ts <= '2021-05-05 18:19:06.000') or (ts >= '2021-05-05 18:19:03.000' and ts <= '2021-05-05 18:19:12.000')) and (ts >= '2021-05-05 18:19:10.000') order by ts;
if $rows != 3 then
return -1
endi
......@@ -2190,7 +2185,7 @@ if $data20 != @21-05-05 18:19:12.000@ then
return -1
endi
sql select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:25.000' and ts != '2021-05-05 18:19:18';
sql select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:25.000' and ts != '2021-05-05 18:19:18' order by ts;
if $rows != 3 then
return -1
endi
......@@ -2205,7 +2200,7 @@ if $data20 != @21-05-05 18:19:28.000@ then
endi
sql select * from stb1 where ts > '2021-05-05 18:19:03.000' and ts > '2021-05-05 18:19:25';
sql select * from stb1 where ts > '2021-05-05 18:19:03.000' and ts > '2021-05-05 18:19:25' order by ts;
if $rows != 3 then
return -1
endi
......@@ -2219,7 +2214,7 @@ if $data20 != @21-05-05 18:19:28.000@ then
return -1
endi
sql select * from stb1 where ts < '2021-05-05 18:19:03.000' and ts < '2021-05-05 18:19:25';
sql select * from stb1 where ts < '2021-05-05 18:19:03.000' and ts < '2021-05-05 18:19:25' order by ts;
if $rows != 3 then
return -1
endi
......@@ -2241,7 +2236,7 @@ if $data00 != @21-05-05 18:19:24.000@ then
return -1
endi
sql select * from stb1 where ts > '2021-05-05 18:19:03.000' or ts > '2021-05-05 18:19:25';
sql select * from stb1 where ts > '2021-05-05 18:19:03.000' or ts > '2021-05-05 18:19:25' order by ts;
if $rows != 25 then
return -1
endi
......@@ -2255,7 +2250,7 @@ if $data20 != @21-05-05 18:19:06.000@ then
return -1
endi
sql select * from stb1 where ts < '2021-05-05 18:19:03.000' or ts < '2021-05-05 18:19:25';
sql select * from stb1 where ts < '2021-05-05 18:19:03.000' or ts < '2021-05-05 18:19:25' order by ts;
if $rows != 25 then
return -1
endi
......@@ -2269,7 +2264,7 @@ if $data20 != @21-05-05 18:19:02.000@ then
return -1
endi
sql select * from stb1 where ts > '2021-05-05 18:19:23.000' or ts < '2021-05-05 18:19:25';
sql select * from stb1 where ts > '2021-05-05 18:19:23.000' or ts < '2021-05-05 18:19:25' order by ts;
if $rows != 29 then
return -1
endi
......@@ -2283,7 +2278,7 @@ if $data20 != @21-05-05 18:19:02.000@ then
return -1
endi
sql select * from stb1 where (ts > '2021-05-05 18:19:23.000' or ts < '2021-05-05 18:19:25') and (ts > '2021-05-05 18:19:23.000' and ts < '2021-05-05 18:19:26');
sql select * from stb1 where (ts > '2021-05-05 18:19:23.000' or ts < '2021-05-05 18:19:25') and (ts > '2021-05-05 18:19:23.000' and ts < '2021-05-05 18:19:26') order by ts;
if $rows != 2 then
return -1
endi
......@@ -2294,7 +2289,7 @@ if $data10 != @21-05-05 18:19:25.000@ then
return -1
endi
sql select * from stb1 where (ts > '2021-05-05 18:19:23.000' or ts < '2021-05-05 18:19:25') and (ts > '2021-05-05 18:19:23.000' or ts > '2021-05-05 18:19:26');
sql select * from stb1 where (ts > '2021-05-05 18:19:23.000' or ts < '2021-05-05 18:19:25') and (ts > '2021-05-05 18:19:23.000' or ts > '2021-05-05 18:19:26') order by ts;
if $rows != 5 then
return -1
endi
......@@ -2315,7 +2310,7 @@ if $data40 != @21-05-05 18:19:28.000@ then
endi
sql select * from stb2 where ts2 in ('2021-05-05 18:28:03','2021-05-05 18:28:05','2021-05-05 18:28:08');
sql select * from stb2 where ts2 in ('2021-05-05 18:28:03','2021-05-05 18:28:05','2021-05-05 18:28:08') order by ts;
if $rows != 3 then
return -1
endi
......@@ -2329,7 +2324,7 @@ if $data20 != @21-05-05 18:19:07.000@ then
return -1
endi
sql select * from stb2 where t3 in ('2021-05-05 18:38:38','2021-05-05 18:38:28','2021-05-05 18:38:08') and ts2 in ('2021-05-05 18:28:04','2021-05-05 18:28:04','2021-05-05 18:28:03');
sql select * from stb2 where t3 in ('2021-05-05 18:38:38','2021-05-05 18:38:28','2021-05-05 18:38:08') and ts2 in ('2021-05-05 18:28:04','2021-05-05 18:28:04','2021-05-05 18:28:03') order by ts;
if $rows != 2 then
return -1
endi
......@@ -2340,38 +2335,38 @@ if $data10 != @21-05-05 18:19:03.000@ then
return -1
endi
sql select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and (a.ts < '2021-05-05 18:19:03.000' or a.ts >= '2021-05-05 18:19:13.000') and (b.ts >= '2021-05-05 18:19:01.000' and b.ts <= '2021-05-05 18:19:14.000');
if $rows != 4 then
return -1
endi
if $data00 != @21-05-05 18:19:01.000@ then
return -1
endi
if $data10 != @21-05-05 18:19:02.000@ then
return -1
endi
if $data20 != @21-05-05 18:19:13.000@ then
return -1
endi
if $data30 != @21-05-05 18:19:14.000@ then
return -1
endi
sql select a.ts,c.ts,b.c1,c.u1,c.u2 from (select * from stb1) a, (select * from stb1) b, (select * from stb2) c where a.ts=b.ts and b.ts=c.ts and a.ts <= '2021-05-05 18:19:12.000' and b.ts >= '2021-05-05 18:19:06.000' and c.ts >= '2021-05-05 18:19:08.000' and c.ts <= '2021-05-05 18:19:11.000' and a.ts != '2021-05-05 18:19:10.000';
if $rows != 3 then
return -1
endi
if $data00 != @21-05-05 18:19:08.000@ then
return -1
endi
if $data10 != @21-05-05 18:19:09.000@ then
return -1
endi
if $data20 != @21-05-05 18:19:11.000@ then
return -1
endi
sql select ts,c1,c2,c8 from (select * from stb1) where (ts <= '2021-05-05 18:19:06.000' or ts >= '2021-05-05 18:19:13.000') and (ts >= '2021-05-05 18:19:02.000' and ts <= '2021-05-05 18:19:14.000') and ts != '2021-05-05 18:19:04.000';
#sql select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and (a.ts < '2021-05-05 18:19:03.000' or a.ts >= '2021-05-05 18:19:13.000') and (b.ts >= '2021-05-05 18:19:01.000' and b.ts <= '2021-05-05 18:19:14.000') order by a.ts;
#if $rows != 4 then
# return -1
#endi
#if $data00 != @21-05-05 18:19:01.000@ then
# return -1
#endi
#if $data10 != @21-05-05 18:19:02.000@ then
# return -1
#endi
#if $data20 != @21-05-05 18:19:13.000@ then
# return -1
#endi
#if $data30 != @21-05-05 18:19:14.000@ then
# return -1
#endi
#
#sql select a.ts,c.ts,b.c1,c.u1,c.u2 from (select * from stb1) a, (select * from stb1) b, (select * from stb2) c where a.ts=b.ts and b.ts=c.ts and a.ts <= '2021-05-05 18:19:12.000' and b.ts >= '2021-05-05 18:19:06.000' and c.ts >= '2021-05-05 18:19:08.000' and c.ts <= '2021-05-05 18:19:11.000' and a.ts != '2021-05-05 18:19:10.000';
#if $rows != 3 then
# return -1
#endi
#if $data00 != @21-05-05 18:19:08.000@ then
# return -1
#endi
#if $data10 != @21-05-05 18:19:09.000@ then
# return -1
#endi
#if $data20 != @21-05-05 18:19:11.000@ then
# return -1
#endi
sql select ts,c1,c2,c8 from (select * from stb1) where (ts <= '2021-05-05 18:19:06.000' or ts >= '2021-05-05 18:19:13.000') and (ts >= '2021-05-05 18:19:02.000' and ts <= '2021-05-05 18:19:14.000') and ts != '2021-05-05 18:19:04.000' order by ts;
if $rows != 6 then
return -1
endi
......@@ -2394,7 +2389,7 @@ if $data50 != @21-05-05 18:19:14.000@ then
return -1
endi
sql select ts,c1,c2,c8 from (select * from stb1) where (ts <= '2021-05-05 18:19:03.000' or ts > '2021-05-05 18:19:26.000' or ts = '2021-05-05 18:19:26.000') and ts != '2021-05-05 18:19:03.000' and ts != '2021-05-05 18:19:26.000';
sql select ts,c1,c2,c8 from (select * from stb1) where (ts <= '2021-05-05 18:19:03.000' or ts > '2021-05-05 18:19:26.000' or ts = '2021-05-05 18:19:26.000') and ts != '2021-05-05 18:19:03.000' and ts != '2021-05-05 18:19:26.000' order by ts;
if $rows != 5 then
return -1
endi
......@@ -2415,14 +2410,14 @@ if $data40 != @21-05-05 18:19:28.000@ then
endi
print "tbname test"
sql_error select * from stb1 where tbname like '%3' and tbname like '%4';
sql select * from stb1 where tbname like '%3' and tbname like '%4';
sql select * from stb1 where tbname like 'tb%';
if $rows != 29 then
return -1
endi
sql select * from stb1 where tbname like '%2';
sql select * from stb1 where tbname like '%2' order by ts;
if $rows != 4 then
return -1
endi
......@@ -2440,7 +2435,7 @@ if $data30 != @21-05-05 18:19:11.000@ then
endi
print "tag test"
sql select * from stb1 where t1 in (1,2) and t1 in (2,3);
sql select * from stb1 where t1 in (1,2) and t1 in (2,3) order by ts;
if $rows != 4 then
return -1
endi
......@@ -2464,7 +2459,7 @@ endi
print "join test"
sql_error select * from tb1, tb2_1 where tb1.ts=tb2_1.ts or tb1.ts =tb2_1.ts;
sql select tb1.ts from tb1, tb2_1 where tb1.ts=tb2_1.ts and tb1.ts > '2021-05-05 18:19:03.000' and tb2_1.ts < '2021-05-05 18:19:06.000';
sql select tb1.ts from tb1, tb2_1 where tb1.ts=tb2_1.ts and tb1.ts > '2021-05-05 18:19:03.000' and tb2_1.ts < '2021-05-05 18:19:06.000' order by ts;
if $rows != 2 then
return -1
endi
......@@ -2474,7 +2469,7 @@ endi
if $data10 != @21-05-05 18:19:05.000@ then
return -1
endi
sql select tb1.ts,tb1.*,tb2_1.* from tb1, tb2_1 where tb1.ts=tb2_1.ts and tb1.ts > '2021-05-05 18:19:03.000' and tb2_1.u1 < 5;
sql select tb1.ts,tb1.*,tb2_1.* from tb1, tb2_1 where tb1.ts=tb2_1.ts and tb1.ts > '2021-05-05 18:19:03.000' and tb2_1.u1 < 5 order by ts;
if $rows != 2 then
return -1
endi
......@@ -2485,7 +2480,7 @@ if $data10 != @21-05-05 18:19:06.000@ then
return -1
endi
sql select tb1.ts,tb1.*,tb2_1.* from tb1, tb2_1 where tb1.ts=tb2_1.ts and tb1.ts >= '2021-05-05 18:19:03.000' and tb1.c7=false and tb2_1.u3>4;
sql select tb1.ts,tb1.*,tb2_1.* from tb1, tb2_1 where tb1.ts=tb2_1.ts and tb1.ts >= '2021-05-05 18:19:03.000' and tb1.c7=false and tb2_1.u3>4 order by ts;
if $rows != 2 then
return -1
endi
......@@ -2496,7 +2491,7 @@ if $data10 != @21-05-05 18:19:07.000@ then
return -1
endi
sql select stb1.ts,stb1.c1,stb1.t1,stb2.ts,stb2.u1,stb2.t4 from stb1, stb2 where stb1.ts=stb2.ts and stb1.t1 = stb2.t4;
sql select stb1.ts,stb1.c1,stb1.t1,stb2.ts,stb2.u1,stb2.t4 from stb1, stb2 where stb1.ts=stb2.ts and stb1.t1 = stb2.t4 order by ts;
if $rows != 9 then
return -1
endi
......@@ -2528,7 +2523,7 @@ if $data80 != @21-05-05 18:19:11.000@ then
return -1
endi
sql select stb1.ts,stb1.c1,stb1.t1,stb2.ts,stb2.u1,stb2.t4 from stb1, stb2 where stb1.ts=stb2.ts and stb1.t1 = stb2.t4 and stb1.c1 > 2 and stb2.u1 <=4;
sql select stb1.ts,stb1.c1,stb1.t1,stb2.ts,stb2.u1,stb2.t4 from stb1, stb2 where stb1.ts=stb2.ts and stb1.t1 = stb2.t4 and stb1.c1 > 2 and stb2.u1 <=4 order by ts;
if $rows != 3 then
return -1
endi
......@@ -2543,8 +2538,8 @@ if $data20 != @21-05-05 18:19:06.000@ then
endi
print "column&ts test"
sql_error select count(*) from stb1 where ts > 0 or c1 > 0;
sql select * from stb1 where ts > '2021-05-05 18:19:03.000' and ts < '2021-05-05 18:19:20.000' and (c1 > 23 or c1 < 14) and c7 in (true) and c8 like '%2';
sql select count(*) from stb1 where ts > 0 or c1 > 0;
sql select * from stb1 where ts > '2021-05-05 18:19:03.000' and ts < '2021-05-05 18:19:20.000' and (c1 > 23 or c1 < 14) and c7 in (true) and c8 like '%2' order by ts;
if $rows != 3 then
return -1
endi
......@@ -2559,7 +2554,7 @@ if $data20 != @21-05-05 18:19:17.000@ then
endi
print "column&tbname test"
sql_error select count(*) from stb1 where tbname like 'tb%' or c1 > 0;
sql select count(*) from stb1 where tbname like 'tb%' or c1 > 0;
sql select * from stb1 where tbname like '%3' and c6 < 34 and c5 != 33 and c4 > 31;
if $rows != 1 then
return -1
......@@ -2569,16 +2564,16 @@ if $data00 != @21-05-05 18:19:13.000@ then
endi
print "column&tag test"
sql_error select * from stb1 where t1 > 0 or c1 > 0
sql_error select * from stb1 where c1 > 0 or t1 > 0
sql_error select * from stb1 where t1 > 0 or c1 > 0 or t1 > 1
sql_error select * from stb1 where c1 > 0 or t1 > 0 or c1 > 1
sql_error select * from stb1 where t1 > 0 and c1 > 0 or t1 > 1
sql_error select * from stb1 where c1 > 0 or t1 > 0 and c1 > 1
sql_error select * from stb1 where c1 > 0 or t1 > 0 and c1 > 1
sql_error select * from stb1 where t1 > 0 or t1 > 0 and c1 > 1
sql_error select * from stb1 where (c1 > 0 and t1 > 0 ) or (t1 > 1 and c1 > 3)
sql_error select * from stb1 where (c1 > 0 and t1 > 0 ) or t1 > 1
sql select * from stb1 where t1 > 0 or c1 > 0
sql select * from stb1 where c1 > 0 or t1 > 0
sql select * from stb1 where t1 > 0 or c1 > 0 or t1 > 1
sql select * from stb1 where c1 > 0 or t1 > 0 or c1 > 1
sql select * from stb1 where t1 > 0 and c1 > 0 or t1 > 1
sql select * from stb1 where c1 > 0 or t1 > 0 and c1 > 1
sql select * from stb1 where c1 > 0 or t1 > 0 and c1 > 1
sql select * from stb1 where t1 > 0 or t1 > 0 and c1 > 1
sql select * from stb1 where (c1 > 0 and t1 > 0 ) or (t1 > 1 and c1 > 3)
sql select * from stb1 where (c1 > 0 and t1 > 0 ) or t1 > 1
sql_error select a.ts,b.ts,a.c1,b.u1,b.u2 from (select * from stb1) a, (select * from stb2) b where a.ts=b.ts and a.t1=b.t1;
sql select * from stb1 where c1 < 63 and t1 > 5
......@@ -2591,7 +2586,7 @@ endi
if $data10 != @21-05-05 18:19:25.000@ then
return -1
endi
sql select * from stb1 where t1 > 3 and t1 < 5 and c1 != 42 and c1 != 44;
sql select * from stb1 where t1 > 3 and t1 < 5 and c1 != 42 and c1 != 44 order by ts;
if $rows != 2 then
return -1
endi
......@@ -2608,7 +2603,7 @@ endi
if $data00 != @21-05-05 18:19:09.000@ then
return -1
endi
sql select * from stb1 where c1 > 1 and (t1 > 3 or t1 < 2) and (c2 > 2 and c2 < 62 and t1 != 4) and (t1 > 2 and t1 < 6) and c7 = true and c8 like '%2';
sql select * from stb1 where c1 > 1 and (t1 > 3 or t1 < 2) and (c2 > 2 and c2 < 62 and t1 != 4) and (t1 > 2 and t1 < 6) and c7 = true and c8 like '%2' order by ts;
if $rows != 1 then
return -1
endi
......@@ -2616,7 +2611,7 @@ if $data00 != @21-05-05 18:19:21.000@ then
return -1
endi
sql select * from stb1 where c1!=31 and c1 !=32 and c1 <> 63 and c1 <>1 and c1 <> 21 and c1 <> 2 and c7 <> true and c8 <> '3' and c9 <> '4' and c2<>13 and c3 <> 23 and c4 <> 33 and c5 <> 34 and c6 <> 43 and c2 <> 53 and t1 <> 5 and t2 <>4;
sql select * from stb1 where c1!=31 and c1 !=32 and c1 <> 63 and c1 <>1 and c1 <> 21 and c1 <> 2 and c7 <> true and c8 <> '3' and c9 <> '4' and c2<>13 and c3 <> 23 and c4 <> 33 and c5 <> 34 and c6 <> 43 and c2 <> 53 and t1 <> 5 and t2 <>4 order by ts;
if $rows != 3 then
return -1
endi
......@@ -2639,9 +2634,9 @@ print "ts&tbname test"
sql_error select count(*) from stb1 where ts > 0 or tbname like 'tb%';
print "ts&tag test"
sql_error select count(*) from stb1 where ts > 0 or t1 > 0;
sql select count(*) from stb1 where ts > 0 or t1 > 0;
sql select * from stb2 where t1!=1 and t2=2 and t3 in ('2021-05-05 18:58:58.000') and ts < '2021-05-05 18:19:13.000';
sql select * from stb2 where t1!=1 and t2=2 and t3 in ('2021-05-05 18:58:58.000') and ts < '2021-05-05 18:19:13.000' order by ts;
if $rows != 2 then
return -1
endi
......@@ -2658,7 +2653,7 @@ sql select tb1.ts,tb1.c1,tb2_1.u1 from tb1, tb2_1 where tb1.ts=tb2_1.ts and (tb1
print "tbname&tag test"
sql select * from stb1 where tbname like 'tb%' and (t1=1 or t2=2 or t3=3) and t1 > 2;
sql select * from stb1 where tbname like 'tb%' and (t1=1 or t2=2 or t3=3) and t1 > 2 order by ts;
if $rows != 4 then
return -1
endi
......@@ -2684,20 +2679,20 @@ print "tag&join test"
print "column&ts&tbname test"
sql_error select count(*) from stb1 where tbname like 'tb%' or c1 > 0 or ts > 0;
sql select count(*) from stb1 where tbname like 'tb%' or c1 > 0 or ts > 0;
print "column&ts&tag test"
sql_error select count(*) from stb1 where t1 > 0 or c1 > 0 or ts > 0;
sql_error select count(*) from stb1 where c1 > 0 or t1 > 0 or ts > 0;
sql select count(*) from stb1 where t1 > 0 or c1 > 0 or ts > 0;
sql select count(*) from stb1 where c1 > 0 or t1 > 0 or ts > 0;
sql select * from stb1 where (t1 > 0 or t1 > 2 ) and ts > '2021-05-05 18:19:10.000' and (c1 > 1 or c1 > 3) and (c6 > 40 or c6 < 30) and (c8 like '%3' or c8 like '_4') and (c9 like '1%' or c9 like '6%' or (c9 like '%3' and c9 != '23')) and ts > '2021-05-05 18:19:22.000' and ts <= '2021-05-05 18:19:26.000';
sql select * from stb1 where (t1 > 0 or t1 > 2 ) and ts > '2021-05-05 18:19:10.000' and (c1 > 1 or c1 > 3) and (c6 > 40 or c6 < 30) and (c8 like '%3' or c8 like '_4') and (c9 like '1%' or c9 like '6%' or (c9 like '%3' and c9 != '23')) and ts > '2021-05-05 18:19:22.000' and ts <= '2021-05-05 18:19:26.000' order by ts;
if $rows != 1 then
return -1
endi
if $data00 != @21-05-05 18:19:26.000@ then
return -1
endi
sql select * from stb1 where ts > '2021-05-05 18:19:00.000' and c1 > 2 and t1 != 1 and c2 >= 23 and t2 >= 3 and c3 < 63 and c7 = false and t3 > 3 and t3 < 6 and c8 like '4%' and ts < '2021-05-05 18:19:19.000' and c2 > 40 and c3 != 42;
sql select * from stb1 where ts > '2021-05-05 18:19:00.000' and c1 > 2 and t1 != 1 and c2 >= 23 and t2 >= 3 and c3 < 63 and c7 = false and t3 > 3 and t3 < 6 and c8 like '4%' and ts < '2021-05-05 18:19:19.000' and c2 > 40 and c3 != 42 order by ts;
if $rows != 1 then
return -1
endi
......@@ -2707,12 +2702,12 @@ endi
print "column&ts&join test"
print "column&tbname&tag test"
sql_error select count(*) from stb1 where c1 > 0 or tbname in ('tb1') or t1 > 0;
sql select count(*) from stb1 where c1 > 0 or tbname in ('tb1') or t1 > 0;
print "column&tbname&join test"
print "column&tag&join test"
print "ts&tbname&tag test"
sql_error select count(*) from stb1 where ts > 0 or tbname in ('tb1') or t1 > 0;
sql select count(*) from stb1 where ts > 0 or tbname in ('tb1') or t1 > 0;
print "ts&tbname&join test"
print "ts&tag&join test"
......@@ -2723,7 +2718,7 @@ print "tbname&tag&join test"
print "column&ts&tbname&tag test"
sql_error select * from stb1 where (tbname like 'tb%' or ts > '2021-05-05 18:19:01.000') and (t1 > 5 or t1 < 4) and c1 > 0;
sql_error select * from stb1 where (ts > '2021-05-05 18:19:01.000') and (ts > '2021-05-05 18:19:02.000' or t1 > 3) and (t1 > 5 or t1 < 4) and c1 > 0;
sql select * from stb1 where (ts > '2021-05-05 18:19:01.000') and (ts > '2021-05-05 18:19:02.000' or t1 > 3) and (t1 > 5 or t1 < 4) and c1 > 0;
sql_error select ts,c1,c7 from stb1 where ts > '2021-05-05 18:19:03.000' or ts > '2021-05-05 18:19:20.000' and col > 0 and t1 > 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册