2020-04-19 15:28:22 +00:00
|
|
|
system sh/stop_dnodes.sh
|
2020-04-29 09:30:03 +00:00
|
|
|
|
|
|
|
|
system sh/deploy.sh -n dnode1 -i 1
|
2021-03-08 03:57:33 +00:00
|
|
|
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
2020-04-19 15:28:22 +00:00
|
|
|
system sh/exec.sh -n dnode1 -s start
|
2021-02-04 03:34:05 +00:00
|
|
|
sleep 500
|
2020-04-19 15:28:22 +00:00
|
|
|
sql connect
|
2021-02-04 03:34:05 +00:00
|
|
|
sleep 500
|
2020-04-19 15:28:22 +00:00
|
|
|
|
|
|
|
|
sql drop database if exists indb
|
|
|
|
|
sql create database if not exists indb
|
|
|
|
|
sql use indb
|
|
|
|
|
|
|
|
|
|
$inFileName = '~/data.csv'
|
|
|
|
|
$numOfRows = 10000
|
2021-04-02 06:28:22 +00:00
|
|
|
system general/parser/gendata.sh
|
2020-04-19 15:28:22 +00:00
|
|
|
|
2021-06-28 03:12:39 +00:00
|
|
|
sql create table stbx (ts TIMESTAMP, collect_area NCHAR(12), device_id BINARY(16), imsi BINARY(16), imei BINARY(16), mdn BINARY(10), net_type BINARY(4), mno NCHAR(4), province NCHAR(10), city NCHAR(16), alarm BINARY(2)) tags(a int, b binary(12));
|
|
|
|
|
|
2020-04-19 15:28:22 +00:00
|
|
|
sql create table tbx (ts TIMESTAMP, collect_area NCHAR(12), device_id BINARY(16), imsi BINARY(16), imei BINARY(16), mdn BINARY(10), net_type BINARY(4), mno NCHAR(4), province NCHAR(10), city NCHAR(16), alarm BINARY(2))
|
|
|
|
|
print ====== create tables success, starting import data
|
|
|
|
|
|
2021-05-31 07:36:48 +00:00
|
|
|
sql import into tbx file '~/data.sql'
|
2021-04-02 06:28:22 +00:00
|
|
|
sql import into tbx file '~/data.sql'
|
2020-04-19 15:28:22 +00:00
|
|
|
|
|
|
|
|
sql select count(*) from tbx
|
|
|
|
|
if $rows != 1 then
|
2021-06-28 03:12:39 +00:00
|
|
|
print expect 1, actual: $rows
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
if $data00 != 3 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
sql drop table tbx;
|
|
|
|
|
|
|
|
|
|
sql insert into tbx using stbx tags(1,'abc') file '~/data.sql';
|
|
|
|
|
sql insert into tbx using stbx tags(1,'abc') file '~/data.sql';
|
|
|
|
|
|
|
|
|
|
sql select count(*) from tbx
|
|
|
|
|
if $rows != 1 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
if $data00 != 3 then
|
2020-04-19 15:28:22 +00:00
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
2021-06-28 03:12:39 +00:00
|
|
|
sql drop table tbx;
|
|
|
|
|
sql insert into tbx using stbx(b) tags('abcf') file '~/data.sql';
|
|
|
|
|
|
|
|
|
|
sql select ts,a,b from tbx;
|
|
|
|
|
if $rows != 3 then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
if $data00 != @20-01-01 01:01:01.000@ then
|
|
|
|
|
print expect 20-01-01 01:01:01.000 , actual: $data00
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
if $data01 != NULL then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
|
|
|
|
|
|
|
|
|
if $data02 != @abcf@ then
|
|
|
|
|
return -1
|
|
|
|
|
endi
|
2020-04-19 15:28:22 +00:00
|
|
|
|
2021-04-02 06:28:22 +00:00
|
|
|
system rm -f ~/data.sql
|
2020-05-12 10:28:00 +00:00
|
|
|
|
|
|
|
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|