[TD-6425]<test>: add test case for join result more than 1MB
This commit is contained in:
parent
a99c40d912
commit
08f6364137
|
@ -13,6 +13,8 @@
|
|||
|
||||
import sys
|
||||
import taos
|
||||
import string
|
||||
import random
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
|
@ -23,6 +25,11 @@ class TDTestCase:
|
|||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor())
|
||||
|
||||
def get_random_string(self, length):
|
||||
letters = string.ascii_lowercase
|
||||
result_str = ''.join(random.choice(letters) for i in range(length))
|
||||
return result_str
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -186,6 +193,20 @@ class TDTestCase:
|
|||
tdSql.query("select t1.ts from t0,t1 where t0.ts = t1.ts")
|
||||
tdSql.checkData(0,0,'2018-10-03 14:38:05.000000')
|
||||
|
||||
#TD-6425 join result more than 1MB
|
||||
tdSql.execute("create database test_join")
|
||||
tdSql.execute("use test_join")
|
||||
|
||||
ts = 1538548685000
|
||||
tdSql.execute("create table stb(ts timestamp, c1 nchar(200)) tags(id int, loc binary(20))")
|
||||
for i in range(2):
|
||||
tdSql.execute("create table tb%d using stb tags(1, 'city%d')" % (i, i))
|
||||
for j in range(1000):
|
||||
tdSql.execute("insert into tb%d values(%d, '%s')" % (i, ts + j, self.get_random_string(200)))
|
||||
|
||||
tdSql.query("select tb0.c1, tb1.c1 from tb0, tb1 where tb0.ts = tb1.ts")
|
||||
tdSql.checkRows(1000)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
|
Loading…
Reference in New Issue