commit
85a251e64d
|
@ -0,0 +1,181 @@
|
||||||
|
{
|
||||||
|
"filetype": "insert",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"thread_count": 4,
|
||||||
|
"thread_count_create_tbl": 4,
|
||||||
|
"result_file": "./insert_res.txt",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"insert_interval": 0,
|
||||||
|
"interlace_rows": 100,
|
||||||
|
"num_of_records_per_req": 100,
|
||||||
|
"databases": [{
|
||||||
|
"dbinfo": {
|
||||||
|
"name": "db",
|
||||||
|
"drop": "no",
|
||||||
|
"replica": 1,
|
||||||
|
"days": 10,
|
||||||
|
"cache": 16,
|
||||||
|
"blocks": 8,
|
||||||
|
"precision": "ms",
|
||||||
|
"keep": 3650,
|
||||||
|
"minRows": 100,
|
||||||
|
"maxRows": 4096,
|
||||||
|
"comp":2,
|
||||||
|
"walLevel":1,
|
||||||
|
"cachelast":0,
|
||||||
|
"quorum":1,
|
||||||
|
"fsync":3000,
|
||||||
|
"update": 0
|
||||||
|
},
|
||||||
|
"super_tables": [{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"auto_create_table": "123",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "NN123_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "NNN_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"auto_create_table": "yes",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "NNY_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"yes",
|
||||||
|
"auto_create_table": "123",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "NY123_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"yes",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "NYN_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"yes",
|
||||||
|
"auto_create_table": "yes",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "NYY_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
|
@ -0,0 +1,181 @@
|
||||||
|
{
|
||||||
|
"filetype": "insert",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"thread_count": 4,
|
||||||
|
"thread_count_create_tbl": 4,
|
||||||
|
"result_file": "./insert_res.txt",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"insert_interval": 0,
|
||||||
|
"interlace_rows": 100,
|
||||||
|
"num_of_records_per_req": 100,
|
||||||
|
"databases": [{
|
||||||
|
"dbinfo": {
|
||||||
|
"name": "db",
|
||||||
|
"drop": "yes",
|
||||||
|
"replica": 1,
|
||||||
|
"days": 10,
|
||||||
|
"cache": 16,
|
||||||
|
"blocks": 8,
|
||||||
|
"precision": "ms",
|
||||||
|
"keep": 3650,
|
||||||
|
"minRows": 100,
|
||||||
|
"maxRows": 4096,
|
||||||
|
"comp":2,
|
||||||
|
"walLevel":1,
|
||||||
|
"cachelast":0,
|
||||||
|
"quorum":1,
|
||||||
|
"fsync":3000,
|
||||||
|
"update": 0
|
||||||
|
},
|
||||||
|
"super_tables": [{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"auto_create_table": "123",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "YN123_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "YNN_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"no",
|
||||||
|
"auto_create_table": "yes",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "YNY_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"yes",
|
||||||
|
"auto_create_table": "123",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "YY123_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"yes",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "YYN_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
},{
|
||||||
|
"name": "stb",
|
||||||
|
"child_table_exists":"yes",
|
||||||
|
"auto_create_table": "yes",
|
||||||
|
"childtable_count": 20,
|
||||||
|
"childtable_prefix": "YYY_",
|
||||||
|
"batch_create_tbl_num": 100,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": 5,
|
||||||
|
"childtable_limit": 40,
|
||||||
|
"childtable_offset":0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval":0,
|
||||||
|
"max_sql_len": 1024000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"start_timestamp": "now",
|
||||||
|
"sample_format": "csv",
|
||||||
|
"sample_file": "./sample.csv",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [{"type": "INT"}],
|
||||||
|
"tags": [{"type": "TINYINT"}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
|
@ -238,10 +238,12 @@ class TDTestCase:
|
||||||
tdSql.execute("use dbtest123")
|
tdSql.execute("use dbtest123")
|
||||||
tdSql.query("select col2 from stb0")
|
tdSql.query("select col2 from stb0")
|
||||||
tdSql.checkData(0, 0, 2147483647)
|
tdSql.checkData(0, 0, 2147483647)
|
||||||
tdSql.query("select t1 from stb1")
|
tdSql.query("select * from stb1 where t1=-127")
|
||||||
tdSql.checkData(0, 0, -127)
|
tdSql.checkRows(20)
|
||||||
tdSql.query("select t2 from stb1")
|
tdSql.query("select * from stb1 where t2=127")
|
||||||
tdSql.checkData(1, 0, 126)
|
tdSql.checkRows(10)
|
||||||
|
tdSql.query("select * from stb1 where t2=126")
|
||||||
|
tdSql.checkRows(10)
|
||||||
|
|
||||||
# insert: test interlace parament
|
# insert: test interlace parament
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/insert-interlace-row.json -y " % binPath)
|
os.system("%staosdemo -f tools/taosdemoAllTest/insert-interlace-row.json -y " % binPath)
|
||||||
|
@ -252,6 +254,42 @@ class TDTestCase:
|
||||||
tdSql.checkData(0, 0, 15000)
|
tdSql.checkData(0, 0, 15000)
|
||||||
|
|
||||||
|
|
||||||
|
# # insert: auto_create
|
||||||
|
|
||||||
|
tdSql.execute('drop database if exists db')
|
||||||
|
tdSql.execute('create database db')
|
||||||
|
tdSql.execute('use db')
|
||||||
|
os.system("%staosdemo -y -f tools/taosdemoAllTest/insert-drop-exist-auto-N00.json " % binPath) # drop = no, child_table_exists, auto_create_table varies
|
||||||
|
tdSql.execute('use db')
|
||||||
|
tdSql.query('show tables like \'NN123%\'') #child_table_exists = no, auto_create_table varies = 123
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'NNN%\'') #child_table_exists = no, auto_create_table varies = no
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'NNY%\'') #child_table_exists = no, auto_create_table varies = yes
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'NYN%\'') #child_table_exists = yes, auto_create_table varies = no
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query('show tables like \'NY123%\'') #child_table_exists = yes, auto_create_table varies = 123
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query('show tables like \'NYY%\'') #child_table_exists = yes, auto_create_table varies = yes
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
|
||||||
|
tdSql.execute('drop database if exists db')
|
||||||
|
os.system("%staosdemo -y -f tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies
|
||||||
|
tdSql.execute('use db')
|
||||||
|
tdSql.query('show tables like \'YN123%\'') #child_table_exists = no, auto_create_table varies = 123
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'YNN%\'') #child_table_exists = no, auto_create_table varies = no
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'YNY%\'') #child_table_exists = no, auto_create_table varies = yes
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'YYN%\'') #child_table_exists = yes, auto_create_table varies = no
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'YY123%\'') #child_table_exists = yes, auto_create_table varies = 123
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes
|
||||||
|
tdSql.checkRows(20)
|
||||||
|
|
||||||
os.system("rm -rf ./insert_res.txt")
|
os.system("rm -rf ./insert_res.txt")
|
||||||
os.system("rm -rf tools/taosdemoAllTest/taosdemoTestInsertWithJson.py.sql")
|
os.system("rm -rf tools/taosdemoAllTest/taosdemoTestInsertWithJson.py.sql")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue