提交 002dc640 编写于 作者: L liuyq-617

[TS-656]<test>escape ascii test

上级 594f9819
......@@ -31,13 +31,42 @@ class TDTestCase:
tdSql.execute("create database bug6387 ")
tdSql.execute("use bug6387 ")
tdSql.execute("create table test(ts timestamp, c1 int) tags(t1 int)")
prefix = "insert into "
sql = ""
for i in range(5000):
sql = "insert into t%d using test tags(1) values " % i
temp = "t%d using test tags(1) values " % i
for j in range(21):
sql = sql + "(now+%ds,%d)" % (j ,j )
tdSql.execute(sql)
temp = temp + "(now+%ds,%d)" % (j ,j )
sql = sql + temp
if i % 1000 == 0 :
tdSql.execute(prefix + sql)
sql = ""
tdSql.query("select count(*) from test interval(1s) group by tbname")
tdSql.checkData(0,1,1)
def escape_ascii(self):
tdSql.execute('drop database if exists db')
tdSql.execute('create database db')
tdSql.execute('use db')
tdSql.execute("create table car (ts timestamp, s int) tags(j int)")
for i in range(32,127):
if i == 96 : continue #`
sql = 'create table `是否出现%s` using car tags(%d)' % (chr(i), i)
tdSql.execute(sql)
for i in range(32,65):
sql = 'select tbname from car where tbname like "是否出现\%s"' % chr(i)
tdSql.query(sql)
if i == 37 : continue # " `
tdSql.checkRows(1)
for i in range(91,97):
sql = 'select tbname from car where tbname like "是否出现\%s"' % chr(i)
tdSql.query(sql)
if i == 96: continue # `
tdSql.checkRows(1)
for i in range(123,127):
sql = 'select tbname from car where tbname like "是否出现\%s"' % chr(i)
tdSql.query(sql)
tdSql.checkRows(1)
def run(self):
tdSql.prepare()
......@@ -165,6 +194,10 @@ class TDTestCase:
tdSql.query("show create table t1")
tdSql.checkRows(1)
#TS-636
tdLog.info("case for TS-636")
self.escape_ascii()
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册