提交 7550b6c5 编写于 作者: H Haojun Liao

[td-225] merge develop

...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
# mqttPort 1883 # mqttPort 1883
# mqtt topic # mqtt topic
# mqttTopic /weather/loop # mqttTopic /test
# the compressed rpc message, option: # the compressed rpc message, option:
# -1 (no compression) # -1 (no compression)
......
...@@ -1298,21 +1298,21 @@ bool taosCheckGlobalCfg() { ...@@ -1298,21 +1298,21 @@ bool taosCheckGlobalCfg() {
taosGetFqdn(tsLocalFqdn); taosGetFqdn(tsLocalFqdn);
} }
snprintf(tsLocalEp, sizeof(tsLocalEp), "%s:%d", tsLocalFqdn, tsServerPort); snprintf(tsLocalEp, sizeof(tsLocalEp), "%s:%u", tsLocalFqdn, tsServerPort);
uInfo("localEp is: %s", tsLocalEp); uInfo("localEp is: %s", tsLocalEp);
if (tsFirst[0] == 0) { if (tsFirst[0] == 0) {
strcpy(tsFirst, tsLocalEp); strcpy(tsFirst, tsLocalEp);
} else { } else {
taosGetFqdnPortFromEp(tsFirst, fqdn, &port); taosGetFqdnPortFromEp(tsFirst, fqdn, &port);
snprintf(tsFirst, sizeof(tsFirst), "%s:%d", fqdn, port); snprintf(tsFirst, sizeof(tsFirst), "%s:%u", fqdn, port);
} }
if (tsSecond[0] == 0) { if (tsSecond[0] == 0) {
strcpy(tsSecond, tsLocalEp); strcpy(tsSecond, tsLocalEp);
} else { } else {
taosGetFqdnPortFromEp(tsSecond, fqdn, &port); taosGetFqdnPortFromEp(tsSecond, fqdn, &port);
snprintf(tsSecond, sizeof(tsSecond), "%s:%d", fqdn, port); snprintf(tsSecond, sizeof(tsSecond), "%s:%u", fqdn, port);
} }
taosGetSystemInfo(); taosGetSystemInfo();
......
...@@ -49,4 +49,4 @@ export PYTHONPATH=$(pwd)/../../src/connector/python/linux/python3 ...@@ -49,4 +49,4 @@ export PYTHONPATH=$(pwd)/../../src/connector/python/linux/python3
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIB_DIR export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIB_DIR
# Now we are all let, and let's see if we can find a crash. Note we pass all params # Now we are all let, and let's see if we can find a crash. Note we pass all params
python3 ./crash_gen.py $@ python3.8 ./crash_gen.py $@
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import sys
import taos
from util.log import tdLog
from util.cases import tdCases
from util.sql import tdSql
class TDTestCase:
def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
self.ts = 1537146000000
def run(self):
tdSql.prepare()
tdSql.execute(
"create table stb(ts timestamp,i int) tags (p_id nchar(20));")
tdSql.execute(
"insert into tb using stb tags('11231') values (%d, %d) (%d, %d) (%d, %d) (%d, %d)"
% (self.ts, 12, self.ts + 1, 15, self.ts + 2, 15, self.ts + 3, 12))
tdSql.query(''' select last(ts) p_time,i from stb where p_id='11231' and ts>=%d and ts <=%d
group by i order by time desc limit 100 ''' % (self.ts, self.ts + 4))
tdSql.checkRows(2)
tdSql.checkData(0, 0, "2018-09-17 09:00:00.003000")
tdSql.checkData(1, 0, "2018-09-17 09:00:00.002000")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
...@@ -123,7 +123,7 @@ class TDSql: ...@@ -123,7 +123,7 @@ class TDSql:
def checkData(self, row, col, data): def checkData(self, row, col, data):
self.checkRowCol(row, col) self.checkRowCol(row, col)
if self.queryResult[row][col] != data: if str(self.queryResult[row][col]) != str(data):
if isinstance(data, float) and abs(self.queryResult[row][col] - data) <= 0.000001: if isinstance(data, float) and abs(self.queryResult[row][col] - data) <= 0.000001:
tdLog.info("sql:%s, row:%d col:%d data:%f == expect:%f" % tdLog.info("sql:%s, row:%d col:%d data:%f == expect:%f" %
(self.sql, row, col, self.queryResult[row][col], data)) (self.sql, row, col, self.queryResult[row][col], data))
......
...@@ -19,7 +19,7 @@ $stb = stb ...@@ -19,7 +19,7 @@ $stb = stb
sql drop database $db -x step1 sql drop database $db -x step1
step1: step1:
sql create database $db maxtables 10 ctime 30 sql create database $db ctime 30
print ====== create tables print ====== create tables
sql use $db sql use $db
sql create table $stb (ts timestamp, c1 int) tags(t1 int) sql create table $stb (ts timestamp, c1 int) tags(t1 int)
......
#sleep 2000 sleep 2000
#run general/parser/alter.sim run general/parser/alter.sim
#sleep 2000 sleep 2000
#run general/parser/alter1.sim run general/parser/alter1.sim
#sleep 2000 sleep 2000
#run general/parser/alter_stable.sim run general/parser/alter_stable.sim
#sleep 2000 sleep 2000
#run general/parser/auto_create_tb.sim run general/parser/auto_create_tb.sim
#sleep 2000 sleep 2000
#run general/parser/auto_create_tb_drop_tb.sim run general/parser/auto_create_tb_drop_tb.sim
#sleep 2000 sleep 2000
#run general/parser/col_arithmetic_operation.sim run general/parser/col_arithmetic_operation.sim
#sleep 2000 sleep 2000
#run general/parser/columnValue.sim run general/parser/columnValue.sim
#sleep 2000 sleep 2000
#run general/parser/commit.sim run general/parser/commit.sim
#sleep 2000 sleep 2000
#run general/parser/create_db.sim run general/parser/create_db.sim
#sleep 2000 sleep 2000
#run general/parser/create_mt.sim run general/parser/create_mt.sim
#sleep 2000 sleep 2000
#run general/parser/create_tb.sim run general/parser/create_tb.sim
#sleep 2000 sleep 2000
#run general/parser/dbtbnameValidate.sim run general/parser/dbtbnameValidate.sim
#sleep 2000 sleep 2000
#run general/parser/fill.sim run general/parser/fill.sim
#sleep 2000 sleep 2000
#run general/parser/fill_stb.sim run general/parser/fill_stb.sim
#sleep 2000 sleep 2000
##run general/parser/fill_us.sim # #run general/parser/fill_us.sim #
#sleep 2000 sleep 2000
#run general/parser/first_last.sim run general/parser/first_last.sim
#sleep 2000 sleep 2000
#run general/parser/import_commit1.sim run general/parser/import_commit1.sim
#sleep 2000 sleep 2000
#run general/parser/import_commit2.sim run general/parser/import_commit2.sim
#sleep 2000 sleep 2000
#run general/parser/import_commit3.sim run general/parser/import_commit3.sim
#sleep 2000 sleep 2000
##run general/parser/import_file.sim #run general/parser/import_file.sim
#sleep 2000 sleep 2000
#run general/parser/insert_tb.sim run general/parser/insert_tb.sim
#sleep 2000 sleep 2000
#run general/parser/tags_dynamically_specifiy.sim run general/parser/tags_dynamically_specifiy.sim
#sleep 2000 sleep 2000
#run general/parser/interp.sim run general/parser/interp.sim
#sleep 2000 sleep 2000
#run general/parser/lastrow.sim run general/parser/lastrow.sim
#sleep 2000 sleep 2000
#run general/parser/limit.sim run general/parser/limit.sim
#sleep 2000 sleep 2000
#run general/parser/limit1.sim run general/parser/limit1.sim
#sleep 2000 sleep 2000
#run general/parser/limit1_tblocks100.sim run general/parser/limit1_tblocks100.sim
#sleep 2000 sleep 2000
#run general/parser/limit2.sim run general/parser/limit2.sim
#sleep 2000 sleep 2000
#run general/parser/mixed_blocks.sim run general/parser/mixed_blocks.sim
#sleep 2000 sleep 2000
#run general/parser/nchar.sim run general/parser/nchar.sim
#sleep 2000 sleep 2000
#run general/parser/null_char.sim run general/parser/null_char.sim
#sleep 2000 sleep 2000
#run general/parser/selectResNum.sim run general/parser/selectResNum.sim
#sleep 2000 sleep 2000
#run general/parser/select_across_vnodes.sim run general/parser/select_across_vnodes.sim
#sleep 2000 sleep 2000
#run general/parser/select_from_cache_disk.sim run general/parser/select_from_cache_disk.sim
#sleep 2000 sleep 2000
#run general/parser/set_tag_vals.sim run general/parser/set_tag_vals.sim
#sleep 2000 sleep 2000
#run general/parser/single_row_in_tb.sim run general/parser/single_row_in_tb.sim
#sleep 2000 sleep 2000
#run general/parser/slimit.sim run general/parser/slimit.sim
#sleep 2000 sleep 2000
#run general/parser/slimit1.sim run general/parser/slimit1.sim
#sleep 2000 sleep 2000
#run general/parser/slimit_alter_tags.sim run general/parser/slimit_alter_tags.sim
#sleep 2000 sleep 2000
#run general/parser/tbnameIn.sim run general/parser/tbnameIn.sim
#sleep 2000 sleep 2000
#run general/parser/slimit_alter_tags.sim # persistent failed run general/parser/slimit_alter_tags.sim # persistent failed
#sleep 2000 sleep 2000
#run general/parser/join.sim run general/parser/join.sim
#sleep 2000 sleep 2000
#run general/parser/join_multivnode.sim run general/parser/join_multivnode.sim
#sleep 2000 sleep 2000
#run general/parser/projection_limit_offset.sim run general/parser/projection_limit_offset.sim
#sleep 2000 sleep 2000
#run general/parser/select_with_tags.sim run general/parser/select_with_tags.sim
#sleep 2000 sleep 2000
#run general/parser/groupby.sim run general/parser/groupby.sim
#sleep 2000 sleep 2000
#run general/parser/tags_filter.sim run general/parser/tags_filter.sim
#sleep 2000 sleep 2000
#run general/parser/topbot.sim run general/parser/topbot.sim
sleep 2000 sleep 2000
run general/parser/union.sim run general/parser/union.sim
sleep 2000 sleep 2000
......
...@@ -17,7 +17,7 @@ $db = $dbPrefix . $i ...@@ -17,7 +17,7 @@ $db = $dbPrefix . $i
$tb = $tbPrefix . $i $tb = $tbPrefix . $i
print =================== step 0 print =================== step 0
sql create database $db maxtables 129 sql create database $db
sql use $db sql use $db
sql show vgroups sql show vgroups
if $rows != 0 then if $rows != 0 then
......
...@@ -26,7 +26,7 @@ sleep 3000 ...@@ -26,7 +26,7 @@ sleep 3000
print =================== step 1 print =================== step 1
sql create database $db replica 3 maxtables 100 sql create database $db replica 3
sql use $db sql use $db
sql create table st (ts timestamp, speed int) tags (t1 int) sql create table st (ts timestamp, speed int) tags (t1 int)
sleep 3001 sleep 3001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册