提交 b3c74da3 编写于 作者: D dapan1121

add test case

上级 a9597ccb
......@@ -612,7 +612,12 @@ static int32_t mnodeGetDbMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn
pShow->bytes[cols] = 24 + VARSTR_HEADER_SIZE;
pSchema[cols].type = TSDB_DATA_TYPE_BINARY;
strcpy(pSchema[cols].name, "keep0,keep1,keep(D)");
#ifdef _STORAGE
strcpy(pSchema[cols].name, "keep0,keep1,keep2");
#else
strcpy(pSchema[cols].name, "keep");
#endif
pSchema[cols].bytes = htons(pShow->bytes[cols]);
cols++;
......@@ -778,11 +783,15 @@ static int32_t mnodeRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void
pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows;
char tmp[128] = {0};
#ifdef _STORAGE
if (pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep1 || pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep2) {
sprintf(tmp, "%d,%d,%d", pDb->cfg.daysToKeep1, pDb->cfg.daysToKeep2, pDb->cfg.daysToKeep0);
} else {
sprintf(tmp, "%d,%d,%d", pDb->cfg.daysToKeep0, pDb->cfg.daysToKeep1, pDb->cfg.daysToKeep2);
}
#else
sprintf(tmp, "%d", pDb->cfg.daysToKeep0);
#endif
STR_WITH_SIZE_TO_VARSTR(pWrite, tmp, strlen(tmp));
cols++;
......@@ -941,6 +950,7 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
terrno = TSDB_CODE_SUCCESS;
//UPGRATE FROM LOW VERSION, reorder it
if (pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep1 || pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep2) {
int32_t t = pDb->cfg.daysToKeep0;
newCfg.daysToKeep0 = pDb->cfg.daysToKeep1;
......@@ -972,17 +982,17 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
terrno = TSDB_CODE_MND_INVALID_DB_OPTION;
}
if (daysToKeep0 > 0 && daysToKeep0 != pDb->cfg.daysToKeep0) {
if (daysToKeep0 > 0 && (daysToKeep0 != pDb->cfg.daysToKeep0 || newCfg.daysToKeep0 != pDb->cfg.daysToKeep0)) {
mDebug("db:%s, daysToKeep:%d change to %d", pDb->name, pDb->cfg.daysToKeep0, daysToKeep0);
newCfg.daysToKeep0 = daysToKeep0;
}
if (daysToKeep1 > 0 && daysToKeep1 != pDb->cfg.daysToKeep1) {
if (daysToKeep1 > 0 && (daysToKeep1 != pDb->cfg.daysToKeep1 || newCfg.daysToKeep1 != pDb->cfg.daysToKeep1)) {
mDebug("db:%s, daysToKeep1:%d change to %d", pDb->name, pDb->cfg.daysToKeep1, daysToKeep1);
newCfg.daysToKeep1 = daysToKeep1;
}
if (daysToKeep2 > 0 && daysToKeep2 != pDb->cfg.daysToKeep2) {
if (daysToKeep2 > 0 && (daysToKeep2 != pDb->cfg.daysToKeep2 || newCfg.daysToKeep2 != pDb->cfg.daysToKeep2)) {
mDebug("db:%s, daysToKeep2:%d change to %d", pDb->name, pDb->cfg.daysToKeep2, daysToKeep2);
newCfg.daysToKeep2 = daysToKeep2;
}
......
......@@ -20,8 +20,66 @@ $db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db
sql create database $db days 10 keep 20,20,20
sql use $db
sql_error alter database $db keep "20"
sql_error alter database $db keep "20","20","20"
sql_error alter database $db keep 20
sql_error alter database $db keep 20.0
sql_error alter database $db keep 20.0,20.0,20.0
sql_error alter database $db keep 0,0,0
sql_error alter database $db keep -1,-1,-1
sql_error alter database $db keep 20,20
sql_error alter database $db keep 9,9,9
sql_error alter database $db keep 20,20,19
sql_error alter database $db keep 20,19,20
sql_error alter database $db keep 20,19,19
sql_error alter database $db keep 20,19,18
sql_error alter database $db keep 20,20,20,20
sql_error alter database $db keep 365001,365001,365001
sql alter database $db keep 20,20,20
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 20,20,20 then
return -1
endi
sql alter database $db keep 10,10,10
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 10,10,10 then
return -1
endi
sql alter database $db keep 10,10,11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 10,10,11 then
return -1
endi
sql alter database $db keep 11,12,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,12,13 then
return -1
endi
sql alter database $db keep 365000,365000,365000
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 365000,365000,365000 then
return -1
endi
##### alter table test, simeplest case
sql create table tb (ts timestamp, c1 int, c2 int, c3 int)
sql insert into tb values (now, 1, 1, 1)
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
$dbPrefix = m_alt_db
$tbPrefix = m_alt_tb
$mtPrefix = m_alt_mt
$tbNum = 10
$rowNum = 5
$totalNum = $tbNum * $rowNum
$ts0 = 1537146000000
$delta = 600000
print ========== alter.sim
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db days 10 keep 20
sql use $db
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 20 then
return -1
endi
sql_error alter database $db keep "20"
sql_error alter database $db keep "20","20","20"
sql_error alter database $db keep 0
sql_error alter database $db keep 20.0
sql_error alter database $db keep 20.0,20.0,20.0
sql_error alter database $db keep 0,0,0
sql_error alter database $db keep 3
sql_error alter database $db keep -1,-1,-1
sql_error alter database $db keep 20,20
sql_error alter database $db keep 9,9,9
sql_error alter database $db keep 20,20,19
sql_error alter database $db keep 20,19,20
sql_error alter database $db keep 20,19,19
sql_error alter database $db keep 20,19,18
sql_error alter database $db keep 20,20,20,20
sql_error alter database $db keep 365001,365001,365001
sql_error alter database $db keep 365001
sql alter database $db keep 20
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 20 then
return -1
endi
sql alter database $db keep 10
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 10 then
return -1
endi
sql alter database $db keep 11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11 then
return -1
endi
sql alter database $db keep 13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 13 then
return -1
endi
sql alter database $db keep 365000
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 365000 then
return -1
endi
##### alter table test, simeplest case
sql create table tb (ts timestamp, c1 int, c2 int, c3 int)
sql insert into tb values (now, 1, 1, 1)
sql select * from tb order by ts desc
if $rows != 1 then
return -1
endi
sql alter table tb drop column c3
sql select * from tb order by ts desc
if $data01 != 1 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != null then
return -1
endi
sql alter table tb add column c3 nchar(4)
sql select * from tb order by ts desc
if $rows != 1 then
return -1
endi
if $data03 != NULL then
return -1
endi
sql insert into tb values (now, 2, 2, 'taos')
sql select * from tb order by ts desc
if $rows != 2 then
return -1
endi
print data03 = $data03
if $data03 != taos then
print expect taos, actual: $data03
return -1
endi
sql drop table tb
##### alter metric test, simplest case
sql create table mt (ts timestamp, c1 int, c2 int, c3 int) tags (t1 int)
sql create table tb using mt tags(1)
sql insert into tb values (now, 1, 1, 1)
sql alter table mt drop column c3
sql select * from tb order by ts desc
if $data01 != 1 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != null then
return -1
endi
sql alter table mt add column c3 nchar(4)
sql select * from tb order by ts desc
if $data03 != NULL then
return -1
endi
sql insert into tb values (now, 2, 2, 'taos')
sql select * from tb order by ts desc
if $rows != 2 then
return -1
endi
if $data03 != taos then
return -1
endi
if $data13 != NULL then
return -1
endi
sql drop table tb
sql drop table mt
## [TBASE272]
sql create table tb (ts timestamp, c1 int, c2 int, c3 int)
sql insert into tb values (now, 1, 1, 1)
sql alter table tb drop column c3
sql alter table tb add column c3 nchar(5)
sql insert into tb values(now, 2, 2, 'taos')
sql drop table tb
sql create table mt (ts timestamp, c1 int, c2 int, c3 int) tags (t1 int)
sql create table tb using mt tags(1)
sql insert into tb values (now, 1, 1, 1)
sql alter table mt drop column c3
sql select * from tb order by ts desc
if $rows != 1 then
return -1
endi
sql drop table tb
sql drop table mt
sleep 100
### ALTER TABLE WHILE STREAMING [TBASE271]
#sql create table tb1 (ts timestamp, c1 int, c2 nchar(5), c3 int)
#sql create table strm as select count(*), avg(c1), first(c2), sum(c3) from tb1 interval(2s)
#sql select * from strm
#if $rows != 0 then
# return -1
#endi
##sleep 12000
#sql insert into tb1 values (now, 1, 'taos', 1)
#sleep 20000
#sql select * from strm
#print rows = $rows
#if $rows != 1 then
# return -1
#endi
#if $data04 != 1 then
# return -1
#endi
#sql alter table tb1 drop column c3
#sleep 500
#sql insert into tb1 values (now, 2, 'taos')
#sleep 30000
#sql select * from strm
#if $rows != 2 then
# return -1
#endi
#if $data04 != 1 then
# return -1
#endi
#sql alter table tb1 add column c3 int
#sleep 500
#sql insert into tb1 values (now, 3, 'taos', 3);
#sleep 100
#sql select * from strm
#if $rows != 3 then
# return -1
#endi
#if $data04 != 1 then
# return -1
#endi
## ALTER TABLE AND INSERT BY COLUMNS
sql create table mt (ts timestamp, c1 int, c2 int) tags(t1 int)
sql create table tb using mt tags(0)
sql insert into tb values (now-1m, 1, 1)
sql alter table mt drop column c2
sql_error insert into tb (ts, c1, c2) values (now, 2, 2)
sql insert into tb (ts, c1) values (now, 2)
sql select * from tb order by ts desc
if $rows != 2 then
return -1
endi
if $data01 != 2 then
return -1
endi
if $data02 != null then
return -1
endi
sql alter table mt add column c2 int
sql insert into tb (ts, c2) values (now, 3)
sql select * from tb order by ts desc
if $data02 != 3 then
return -1
endi
## ALTER TABLE AND IMPORT
sql drop database $db
sql create database $db
sql use $db
sql create table mt (ts timestamp, c1 int, c2 nchar(7), c3 int) tags (t1 int)
sql create table tb using mt tags(1)
sleep 100
sql insert into tb values ('2018-11-01 16:30:00.000', 1, 'insert', 1)
sql alter table mt drop column c3
sql insert into tb values ('2018-11-01 16:29:59.000', 1, 'insert')
sql import into tb values ('2018-11-01 16:29:59.000', 1, 'import')
sql select * from tb order by ts desc
if $data01 != 1 then
return -1
endi
if $data02 != insert then
return -1
endi
sql alter table mt add column c3 nchar(4)
sql select * from tb order by ts desc
if $data03 != NULL then
return -1
endi
print ============================>TD-3366 TD-3486
sql insert into td_3366(ts, c3, c1) using mt(t1) tags(911) values('2018-1-1 11:11:11', 'new1', 12);
sql insert into td_3486(ts, c3, c1) using mt(t1) tags(-12) values('2018-1-1 11:11:11', 'new1', 12);
sql insert into ttxu(ts, c3, c1) using mt(t1) tags('-121') values('2018-1-1 11:11:11', 'new1', 12);
sql insert into tb(ts, c1, c3) using mt(t1) tags(123) values('2018-11-01 16:29:58.000', 2, 'port')
sql insert into tb values ('2018-11-01 16:29:58.000', 2, 'import', 3)
sql import into tb values ('2018-11-01 16:29:58.000', 2, 'import', 3)
sql import into tb values ('2018-11-01 16:39:58.000', 2, 'import', 3)
sql select * from tb order by ts desc
if $rows != 4 then
return -1
endi
if $data03 != 3 then
return -1
endi
##### ILLEGAL OPERATIONS
# try dropping columns that are defined in metric
sql_error alter table tb drop column c1;
# try dropping primary key
sql_error alter table mt drop column ts;
# try modifying two columns in a single statement
sql_error alter table mt add column c5 nchar(3) c6 nchar(4)
# duplicate columns
sql_error alter table mt add column c1 int
# drop non-existing columns
sql_error alter table mt drop column c9
#sql drop database $db
#sql show databases
#if $rows != 0 then
# return -1
#endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -102,7 +102,7 @@ print create_db.sim case5: db_meta_data test
# cfg params
$replica = 1 # max=3
$days = 10
$keep = 365
$keep = 365,365,365
$rows_db = 1000
$cache = 16 # 16MB
$ablocks = 100
......@@ -150,6 +150,53 @@ sql_error create database $db day 3651
# keep [1, infinity]
sql_error create database $db keep 0
sql_error create database $db keep 0,0,0
sql_error create database $db keep 3,3,3
sql_error create database $db keep 11.0
sql_error create database $db keep 11.0,11.0,11.0
sql_error create database $db keep "11","11","11"
sql_error create database $db keep "11"
sql_error create database $db keep 13,12,11
sql_error create database $db keep 11,12,11
sql_error create database $db keep 12,11,12
sql_error create database $db keep 11,11
sql_error create database $db keep 365001,365001,365001
sql create database dbk1 keep 11,11,11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,11,11 then
return -1
endi
sql drop database dbk1
sql create database dbk2 keep 11,12,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,12,13 then
return -1
endi
sql drop database dbk2
sql create database dbk3 keep 11,11,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,11,13 then
return -1
endi
sql drop database dbk3
sql create database dbk4 keep 11,13,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,13,13 then
return -1
endi
sql drop database dbk4
#sql_error create database $db keep 3651
# rows [200, 10000]
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
print ======================== dnode1 start
$dbPrefix = fi_in_db
$tbPrefix = fi_in_tb
$mtPrefix = fi_in_mt
$tbNum = 10
$rowNum = 20
$totalNum = 200
print excuting test script create_db.sim
print =============== set up
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql_error createdatabase $db
sql create database $db
sql use $db
sql show databases
if $rows != 1 then
return -1
endi
if $data00 != $db then
return -1
endi
sql drop database $db
# case1: case_insensitivity test
print =========== create_db.sim case1: case insensitivity test
sql_error CREATEDATABASE $db
sql CREATE DATABASE $db
sql use $db
sql show databases
if $rows != 1 then
return -1
endi
if $data00 != $db then
return -1
endi
sql drop database $db
print case_insensitivity test passed
# case2: illegal_db_name test
print =========== create_db.sim case2: illegal_db_name test
$illegal_db1 = 1db
$illegal_db2 = d@b
sql_error create database $illegal_db1
sql_error create database $illegal_db2
print illegal_db_name test passed
# case3: chinese_char_in_db_name test
print ========== create_db.sim case3: chinese_char_in_db_name test
$CN_db1 = 数据库
$CN_db2 = 数据库1
$CN_db3 = db数据库1
sql_error create database $CN_db1
sql_error create database $CN_db2
sql_error create database $CN_db3
#sql show databases
#if $rows != 3 then
# return -1
#endi
#if $data00 != $CN_db1 then
# return -1
#endi
#if $data10 != $CN_db2 then
# return -1
#endi
#if $data20 != $CN_db3 then
# return -1
#endi
#sql drop database $CN_db1
#sql drop database $CN_db2
#sql drop database $CN_db3
print case_chinese_char_in_db_name test passed
# case4: db_already_exists
print create_db.sim case4: db_already_exists
sql create database db0
sql create database db0
sql show databases
if $rows != 1 then
return -1
endi
sql drop database db0
print db_already_exists test passed
# case5: db_meta_data
print create_db.sim case5: db_meta_data test
# cfg params
$replica = 1 # max=3
$days = 10
$keep = 365
$rows_db = 1000
$cache = 16 # 16MB
$ablocks = 100
$tblocks = 32 # max=512, automatically trimmed when exceeding
$ctime = 36000 # 10 hours
$wal = 1 # valid value is 1, 2
$comp = 1 # max=32, automatically trimmed when exceeding
sql create database $db replica $replica days $days keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp
sql show databases
if $rows != 1 then
return -1
endi
if $data00 != $db then
return -1
endi
if $data04 != $replica then
return -1
endi
if $data06 != $days then
return -1
endi
if $data07 != 365 then
return -1
endi
print data08 = $data07
if $data08 != $cache then
print expect $cache, actual:$data08
return -1
endi
if $data09 != 4 then
return -1
endi
sql drop database $db
## param range tests
# replica [1,3]
#sql_error create database $db replica 0
sql_error create database $db replica 4
# day [1, 3650]
sql_error create database $db day 0
sql_error create database $db day 3651
# keep [1, infinity]
sql_error create database $db keep 0
sql_error create database $db keep 0,0,0
sql_error create database $db keep 3,3,3
sql_error create database $db keep 3
sql_error create database $db keep 11.0
sql_error create database $db keep 11.0,11.0,11.0
sql_error create database $db keep "11","11","11"
sql_error create database $db keep "11"
sql_error create database $db keep 13,12,11
sql_error create database $db keep 11,12,11
sql_error create database $db keep 12,11,12
sql_error create database $db keep 11,12,13
sql_error create database $db keep 11,12,13,14
sql_error create database $db keep 11,11
sql_error create database $db keep 365001,365001,365001
sql_error create database $db keep 365001
sql create database dbk1 keep 11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11 then
return -1
endi
sql drop database dbk1
sql create database dbk2 keep 12
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 12 then
return -1
endi
sql drop database dbk2
sql create database dbk3 keep 11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11 then
return -1
endi
sql drop database dbk3
sql create database dbk4 keep 13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 13 then
return -1
endi
sql drop database dbk4
#sql_error create database $db keep 3651
# rows [200, 10000]
sql_error create database $db maxrows 199
#sql_error create database $db maxrows 10001
# cache [100, 10485760]
sql_error create database $db cache 0
#sql_error create database $db cache 10485761
# blocks [32, 4096 overwriten by 4096 if exceeds, Note added:2018-10-24]
#sql_error create database $db tblocks 31
#sql_error create database $db tblocks 4097
# ctime [30, 40960]
sql_error create database $db ctime 29
sql_error create database $db ctime 40961
# wal {0, 2}
#sql_error create database $db wal 0
sql_error create database $db wal -1
sql_error create database $db wal 3
# comp {0, 1, 2}
sql_error create database $db comp -1
sql_error create database $db comp 3
sql_error drop database $db
sql show databases
if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -7,7 +7,7 @@ sleep 100
sql connect
print ========== db name and table name check in create and drop, describe
sql create database abc keep 36500
sql create database abc keep 36500,36500,36500
sql create database 'abc123'
sql create database '_ab1234'
sql create database 'ABC123'
......
......@@ -86,7 +86,7 @@ sleep 100
run general/parser/first_last_query.sim
print =================> insert data regression test
sql create database test keep 36500
sql create database test keep 36500,36500,36500
sql use test
sql create table tm0 (ts timestamp, k int)
......@@ -124,4 +124,4 @@ if $rows != 10000 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -21,7 +21,7 @@ $db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db keep 36500
sql create database $db keep 36500,36500,36500
sql use $db
print =====================================> td-4481
......
......@@ -29,7 +29,7 @@ $tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
......
......@@ -26,7 +26,7 @@ $tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
......
......@@ -24,7 +24,7 @@ $tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
......
......@@ -24,7 +24,7 @@ $tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
......@@ -367,4 +367,4 @@ if $data35 != 5 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -23,7 +23,7 @@ $tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
......
......@@ -24,7 +24,7 @@ $tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12), t3 int)
......@@ -902,4 +902,4 @@ sql_error select first(c1), count(*), t2, t1, tbname from select_tags_mt0 group
#sql select count(c1) from select_tags_mt0 where c1=99 group by tbname;
#sql select count(*),tbname from select_tags_mt0 group by tbname
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -29,7 +29,7 @@ $mt = $mtPrefix . $i
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql create database if not exists $db keep 36500,36500,36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
......
......@@ -26,7 +26,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db cache 16 maxrows 4096 keep 36500
sql create database $db cache 16 maxrows 4096 keep 36500,36500,36500
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
......
......@@ -25,7 +25,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db cache 16 maxrows 4096 keep 36500
sql create database $db cache 16 maxrows 4096 keep 36500,36500,36500
print ====== create tables
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
......@@ -175,7 +175,7 @@ if $data21 != 2.10000 then
endi
print =====================td-1302 case
sql create database t1 keep 36500;
sql create database t1 keep 36500,36500,36500;
sql use t1;
sql create table test(ts timestamp, k int);
sql insert into test values(29999, 1)(70000, 2)(80000, 3)
......@@ -194,7 +194,7 @@ if $rows != 3 then
endi
print ==============>td-1308
sql create database db keep 36500;
sql create database db keep 36500,36500,36500;
sql use db;
sql create table stb (ts timestamp, c1 int, c2 binary(10)) tags(t1 binary(10));
......@@ -377,4 +377,4 @@ sql_error select * from ttm2 where k<>null
sql_error select * from ttm2 where k like null
sql_error select * from ttm2 where k<null
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -424,6 +424,10 @@ cd ../../../debug; make
./test.sh -f general/parser/stableOp.sim
./test.sh -f general/parser/timestamp.sim
./test.sh -f general/parser/sliding.sim
./test.sh -f general/parser/having.sim
./test.sh -f general/parser/having_child.sim
./test.sh -f general/parser/between_and.sim
./test.sh -f general/parser/last_cache.sim
./test.sh -f unique/big/balance.sim
#======================b7-end===============
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册