33 lines
		
	
	
		
			746 B
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			746 B
		
	
	
	
		
			Plaintext
		
	
	
	
| system sh/stop_dnodes.sh
 | |
| system sh/deploy.sh -n dnode1 -i 1
 | |
| system sh/exec.sh -n dnode1 -s start
 | |
| sleep 50
 | |
| sql connect
 | |
| 
 | |
| print =============== create database
 | |
| sql create database test vgroups 1
 | |
| sql select * from information_schema.ins_databases
 | |
| if $rows != 3 then
 | |
|   return -1
 | |
| endi
 | |
| 
 | |
| print $data00 $data01 $data02
 | |
| 
 | |
| sql use test
 | |
| sql create stable st(ts timestamp, a int) tags(t int);
 | |
| sql create table tu1 using st tags(1);
 | |
| sql create table tu2 using st tags(2);
 | |
| 
 | |
| sql create stream stream1 trigger window_close into streamt as select  _wstart, sum(a) from st interval(10s);
 | |
| 
 | |
| sql insert into tu1 values(now, 1);
 | |
| 
 | |
| sleep 500
 | |
| sql select * from streamt;
 | |
| if $rows != 0 then
 | |
|   print ======$rows
 | |
|   return -1
 | |
| endi
 | |
| 
 | |
| system sh/exec.sh -n dnode1 -s stop -x SIGINT
 |