37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| system sh/stop_dnodes.sh
 | |
| system sh/deploy.sh -n dnode1 -i 1
 | |
| system sh/exec.sh -n dnode1 -s start
 | |
| sql connect
 | |
| 
 | |
| $dbPrefix = sr_db
 | |
| $tbPrefix = sr_tb
 | |
| $stbPrefix = sr_stb
 | |
| $ts0 = 1537146000000
 | |
| print ========== single_row_in_tb.sim
 | |
| $db = $dbPrefix
 | |
| $stb = $stbPrefix
 | |
| 
 | |
| sql drop database if exists $db
 | |
| sql create database $db maxrows 200
 | |
| print ====== create tables
 | |
| sql use $db
 | |
| sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 bool, c6 binary(10), c7 nchar(10)) tags(t1 int)
 | |
| 
 | |
| $i = 0
 | |
| $ts = $ts0
 | |
| $tb1 = $tbPrefix . 1
 | |
| sql create table $tb1 using $stb tags( 1 )
 | |
| sql insert into $tb1 values ( $ts0 , 1, 2, 3, 4, true, 'binay10', '涛思nchar10' )
 | |
| print ====== tables created
 | |
| 
 | |
| run tsim/parser/single_row_in_tb_query.sim
 | |
| 
 | |
| print ================== restart server to commit data into disk
 | |
| system sh/exec.sh -n dnode1 -s stop -x SIGINT
 | |
| system sh/exec.sh -n dnode1 -s start
 | |
| print ================== server restart completed
 | |
| 
 | |
| run tsim/parser/single_row_in_tb_query.sim
 | |
| 
 | |
| system sh/exec.sh -n dnode1 -s stop -x SIGINT
 |