TDengine/tests/script/windows/table/column_name.sim
Shuduo Sang d69c5977db
Test/sangshuduo/td 13408 move tests in (#10589)
* restore .gitmodules

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

This reverts commit 7db7bd9337.

* revert to make tests back

* immigrate file change in stand-alone repo to TDengine

* remove tests repository checkout

Co-authored-by: tangfangzhi <fztang@taosdata.com>
2022-03-07 17:59:24 +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