TDengine/tests/script/windows/table/column_name.sim
Shuduo Sang 43feda0595
[TD-13408]<test>: move tests in for3.0 (#10598)
* restore .gitmodules

* Revert "[TD-13408]<test>: move tests out"

This reverts commit f80a4ca49f.

* revert f80a4ca49f

* immigrate file change from stand-alone repo to TDengine

for 3.0

* remove tests repository for Jenkinsfile2

Co-authored-by: tangfangzhi <fztang@taosdata.com>
2022-03-07 19:25:29 +08:00

91 lines
1.3 KiB
Text

sql connect
sleep 2000
sql show databases
sql drop database $data00 -x e1
e1:
sql show databases
sql drop database $data00 -x e2
e2:
$i = 0
$dbPrefix = lm_cm_db
$tbPrefix = lm_cm_tb
$db = $dbPrefix . $i
$tb = $tbPrefix . $i
print =============== step1
sql create database $db
sql use $db
sql drop table dd -x step0
return -1
step0:
sql create table $tb(ts timestamp, int) -x step1
return -1
step1:
sql show tables
if $rows != 0 then
return -1
endi
print =============== step2
sql create table $tb (ts timestamp, s int)
sql show tables
if $rows != 1 then
return -1
endi
sql drop table $tb
sql show tables
if $rows != 0 then
return -1
endi
print =============== step3
sql create table $tb (ts timestamp, a0123456789 int)
sql show tables
if $rows != 1 then
return -1
endi
sql drop table $tb
sql show tables
if $rows != 0 then
return -1
endi
print =============== step4
sql create table $tb (ts timestamp, a0123456789012345678901234567890123456789 int)
sql drop table $tb
sql show tables
if $rows != 0 then
return -1
endi
print =============== step5
sql create table $tb (ts timestamp, a0123456789 int)
sql show tables
if $rows != 1 then
return -1
endi
sql insert into $tb values (now , 1)
sql select * from $tb
if $rows != 1 then
return -1
endi
sql drop database $db
sql show databases
if $rows != 0 then
return -1
endi