sync_replica_alterTable_background_drop.sim 542 字节
Newer Older
H
Hui Li 已提交
1 2 3 4 5 6 7 8 9 10 11
sql connect

$db = db
$stb = stb
print =============== sync_replica_alterTable_background_drop.sim step0: alter table and insert data
$totalTableNum = 100

sql use $db

#sql create table $stb (ts timestamp, c1 int) tags(t1 int)
sql alter table $stb add column f1 double
H
Hui Li 已提交
12
sql alter table $stb drop column c1
H
Hui Li 已提交
13 14

$tblNum = $totalTableNum
H
Hui Li 已提交
15
$alterTblNum = 10
H
Hui Li 已提交
16 17 18 19 20 21 22 23 24 25

$i = 1
while $i < $alterTblNum
  $tb = tb . $i
  sql insert into $tb values (now, 10001) (now + 1s, 10002) (now + 2s, 10003) (now + 3s, 10004)
  $i = $i + 1
endw