未验证 提交 be036fd5 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge branch 'develop' into szhou/hotfix/td-11969

...@@ -2760,7 +2760,7 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col ...@@ -2760,7 +2760,7 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
if (pItem->pNode->Expr.paramList == NULL || if (pItem->pNode->Expr.paramList == NULL ||
(functionId != TSDB_FUNC_LEASTSQR && functionId != TSDB_FUNC_DERIVATIVE && functionId != TSDB_FUNC_ELAPSED && numOfParams != 1) || (functionId != TSDB_FUNC_LEASTSQR && functionId != TSDB_FUNC_DERIVATIVE && functionId != TSDB_FUNC_ELAPSED && numOfParams != 1) ||
((functionId == TSDB_FUNC_LEASTSQR || functionId == TSDB_FUNC_DERIVATIVE) && numOfParams != 3) || ((functionId == TSDB_FUNC_LEASTSQR || functionId == TSDB_FUNC_DERIVATIVE) && numOfParams != 3) ||
(functionId == TSDB_FUNC_ELAPSED && numOfParams > 2)) { (functionId == TSDB_FUNC_ELAPSED && numOfParams != 1 && numOfParams != 2)) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2);
} }
......
...@@ -3783,7 +3783,7 @@ void tscSetQuerySort(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAttr) { ...@@ -3783,7 +3783,7 @@ void tscSetQuerySort(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAttr) {
size_t size = taosArrayGetSize(pQueryInfo->pUpstream); size_t size = taosArrayGetSize(pQueryInfo->pUpstream);
for(int32_t i = 0; i < size; ++i) { for(int32_t i = 0; i < size; ++i) {
SQueryInfo* pq = taosArrayGetP(pQueryInfo->pUpstream, i); SQueryInfo* pq = taosArrayGetP(pQueryInfo->pUpstream, i);
if (pq->groupbyTag && pq->interval.interval > 0) { if (pq->groupbyTag) {
pQueryAttr->needSort = true; pQueryAttr->needSort = true;
return; return;
} }
......
...@@ -113,7 +113,7 @@ int32_t tscAcquireRpc(const char *key, const char *user, const char *secretEncry ...@@ -113,7 +113,7 @@ int32_t tscAcquireRpc(const char *key, const char *user, const char *secretEncry
SRpcObj rpcObj; SRpcObj rpcObj;
memset(&rpcObj, 0, sizeof(rpcObj)); memset(&rpcObj, 0, sizeof(rpcObj));
strncpy(rpcObj.key, key, strlen(key)); tstrncpy(rpcObj.key, key, sizeof(rpcObj.key));
rpcObj.pDnodeConn = rpcOpen(&rpcInit); rpcObj.pDnodeConn = rpcOpen(&rpcInit);
if (rpcObj.pDnodeConn == NULL) { if (rpcObj.pDnodeConn == NULL) {
pthread_mutex_unlock(&rpcObjMutex); pthread_mutex_unlock(&rpcObjMutex);
......
...@@ -4928,7 +4928,11 @@ int32_t createProjectionExpr(SQueryInfo* pQueryInfo, STableMetaInfo* pTableMetaI ...@@ -4928,7 +4928,11 @@ int32_t createProjectionExpr(SQueryInfo* pQueryInfo, STableMetaInfo* pTableMetaI
} }
} }
pse->colInfo.flag = pSource->base.colInfo.flag; //TSDB_COL_NORMAL; if (!pQueryInfo->stableQuery && TSDB_COL_IS_TAG(pSource->base.colInfo.flag)) {
pse->colInfo.flag = (pSource->base.colInfo.flag) & (~TSDB_COL_TAG);
} else {
pse->colInfo.flag = pSource->base.colInfo.flag;
}
pse->resType = pSource->base.resType; pse->resType = pSource->base.resType;
pse->resBytes = pSource->base.resBytes; pse->resBytes = pSource->base.resBytes;
strncpy(pse->colInfo.name, pSource->base.aliasName, tListLen(pse->colInfo.name)); strncpy(pse->colInfo.name, pSource->base.aliasName, tListLen(pse->colInfo.name));
......
Subproject commit 25f8683ece07897fea12c347d369602b2235665f Subproject commit 7da3cc9e4ad1030c2eec250b869a8fa215b4a4b4
...@@ -2,17 +2,23 @@ package com.taosdata.jdbc; ...@@ -2,17 +2,23 @@ package com.taosdata.jdbc;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.taosdata.jdbc.annotation.CatalogRunner;
import com.taosdata.jdbc.annotation.Description;
import com.taosdata.jdbc.annotation.TestTarget;
import com.taosdata.jdbc.enums.SchemalessProtocolType; import com.taosdata.jdbc.enums.SchemalessProtocolType;
import com.taosdata.jdbc.enums.SchemalessTimestampType; import com.taosdata.jdbc.enums.SchemalessTimestampType;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import java.sql.*; import java.sql.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@RunWith(CatalogRunner.class)
@TestTarget(alias = "Schemaless",author = "huolibo", version = "2.0.36")
public class SchemalessInsertTest { public class SchemalessInsertTest {
private final String dbname = "test_schemaless_insert"; private final String dbname = "test_schemaless_insert";
private Connection conn; private Connection conn;
...@@ -23,6 +29,7 @@ public class SchemalessInsertTest { ...@@ -23,6 +29,7 @@ public class SchemalessInsertTest {
* @throws SQLException execute error * @throws SQLException execute error
*/ */
@Test @Test
@Description("line insert")
public void schemalessInsert() throws SQLException { public void schemalessInsert() throws SQLException {
// given // given
String[] lines = new String[]{ String[] lines = new String[]{
...@@ -53,6 +60,7 @@ public class SchemalessInsertTest { ...@@ -53,6 +60,7 @@ public class SchemalessInsertTest {
* @throws SQLException execute error * @throws SQLException execute error
*/ */
@Test @Test
@Description("telnet insert")
public void telnetInsert() throws SQLException { public void telnetInsert() throws SQLException {
// given // given
String[] lines = new String[]{ String[] lines = new String[]{
...@@ -87,6 +95,7 @@ public class SchemalessInsertTest { ...@@ -87,6 +95,7 @@ public class SchemalessInsertTest {
* @throws SQLException execute error * @throws SQLException execute error
*/ */
@Test @Test
@Description("json insert")
public void jsonInsert() throws SQLException { public void jsonInsert() throws SQLException {
// given // given
String json = "[\n" + String json = "[\n" +
......
package com.taosdata.jdbc.annotation;
import java.util.ArrayList;
import java.util.List;
/**
* Test class
*/
public class CatalogClass {
private String name;
private String alias;
private String author;
private String version;
private List<CatalogMethod> methods = new ArrayList<>();
private int total;
private int failure;
public void setTotal(int total) {
this.total = total;
}
public void setFailure(int failure) {
this.failure = failure;
}
public void setAuthor(String author) {
this.author = author;
}
public void setVersion(String version) {
this.version = version;
}
public void setName(String name) {
this.name = name;
}
public void setAlias(String alias) {
this.alias = alias;
}
public void setMethods(List<CatalogMethod> methods) {
this.methods = methods;
}
@Override
public String toString() {
if (methods.size() < 1)
return null;
StringBuilder sb = new StringBuilder();
sb.append("ClassName: ").append(name);
String msg = trim(alias);
if (null != msg)
sb.append("\tAlias:").append(alias);
sb.append("\tTotal:").append(total)
.append("\tFailure:").append(failure).append("\n");
for (CatalogMethod method : methods) {
sb.append("\t").append(method.getName());
sb.append("\t").append(method.isSuccess());
sb.append("\t").append(method.getMessage());
String mAuthor = trim(method.getAuthor());
if (null == mAuthor) {
sb.append("\t").append(author);
} else {
sb.append("\t").append(method.getAuthor());
}
String mVersion = trim(method.getVersion());
if (null == mVersion) {
sb.append("\t").append(version);
} else {
sb.append("\t").append(mVersion);
}
sb.append("\n");
}
return sb.toString();
}
private String trim(String s) {
if (null == s || s.trim().equals("")) {
return null;
} else {
return s.trim();
}
}
}
package com.taosdata.jdbc.annotation;
import org.junit.runner.Description;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunListener;
import java.io.File;
import java.io.FileWriter;
import java.util.LinkedList;
public class CatalogListener extends RunListener {
public static final String CATALOG_FILE = "target/TestCaseCatalog.txt";
CatalogClass catalogClass = null;
private final LinkedList<CatalogMethod> methods = new LinkedList<>();
@Override
public void testRunStarted(Description description) throws Exception {
catalogClass = new CatalogClass();
TestTarget target = description.getAnnotation(TestTarget.class);
if (target != null) {
catalogClass.setAlias(target.alias());
catalogClass.setAuthor(target.author());
catalogClass.setVersion(target.version());
}
catalogClass.setName(getClassName(description.getClassName()));
}
private String getClassName(String name) {
if (null == name || name.trim().equals("")) {
return null;
}
name = name.trim();
int pos = name.lastIndexOf(".");
if (-1 == pos) {
return name;
}
return name.substring(pos + 1);
}
@Override
public void testRunFinished(Result result) throws Exception {
catalogClass.setMethods(methods);
catalogClass.setTotal(result.getRunCount());
catalogClass.setFailure(result.getFailureCount());
File file = new File(CATALOG_FILE);
if (!file.exists()) {
synchronized (CatalogListener.class) {
if (!file.exists()) {
file.createNewFile();
try (FileWriter writer = new FileWriter(file, true)) {
writer.write("\tName\tPass\tMessage\tAuthor\tVersion\n");
writer.write(catalogClass.toString());
}
}
}
} else {
try (FileWriter writer = new FileWriter(file, true)) {
writer.write(catalogClass.toString());
}
}
}
@Override
public void testStarted(Description description) throws Exception {
}
@Override
public void testFinished(Description description) throws Exception {
com.taosdata.jdbc.annotation.Description annotation
= description.getAnnotation(com.taosdata.jdbc.annotation.Description.class);
if (annotation != null) {
CatalogMethod method = new CatalogMethod();
method.setMessage(annotation.value());
method.setAuthor(annotation.author());
method.setVersion(annotation.version());
method.setSuccess(true);
method.setName(description.getMethodName());
methods.addLast(method);
}
}
@Override
public void testFailure(Failure failure) throws Exception {
com.taosdata.jdbc.annotation.Description annotation
= failure.getDescription().getAnnotation(com.taosdata.jdbc.annotation.Description.class);
CatalogMethod method = new CatalogMethod();
method.setMessage(annotation.value());
method.setAuthor(annotation.author());
method.setVersion(annotation.version());
method.setSuccess(false);
method.setName(failure.getDescription().getMethodName());
methods.addFirst(method);
}
@Override
public void testAssumptionFailure(Failure failure) {
}
@Override
public void testIgnored(Description description) throws Exception {
super.testIgnored(description);
}
}
\ No newline at end of file
package com.taosdata.jdbc.annotation;
/**
* Test method
*/
public class CatalogMethod {
private String name;
private boolean success;
private String message;
private String author;
private String version;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}
package com.taosdata.jdbc.annotation;
import org.junit.internal.AssumptionViolatedException;
import org.junit.internal.runners.model.EachTestNotifier;
import org.junit.runner.notification.RunNotifier;
import org.junit.runner.notification.StoppedByUserException;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.Statement;
public class CatalogRunner extends BlockJUnit4ClassRunner {
public CatalogRunner(Class<?> testClass) throws InitializationError {
super(testClass);
}
@Override
public void run(RunNotifier notifier) {
//add user-defined listener
notifier.addListener(new CatalogListener());
EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription());
notifier.fireTestRunStarted(getDescription());
try {
Statement statement = classBlock(notifier);
statement.evaluate();
} catch (AssumptionViolatedException av) {
testNotifier.addFailedAssumption(av);
} catch (StoppedByUserException exception) {
throw exception;
} catch (Throwable e) {
testNotifier.addFailure(e);
}
}
}
\ No newline at end of file
package com.taosdata.jdbc.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Description {
String value();
// git blame author
String author() default "";
// since which version;
String version() default "";
}
package com.taosdata.jdbc.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface TestTarget {
String alias() default "";
String author();
String version() default "";
}
Subproject commit 78519c0c90a261b6a559c6bbe7f3d3b5a7b630b4 Subproject commit 0b4a16e96b5cc9cb6e4f8cacf6a1f3028c91adb0
...@@ -588,6 +588,12 @@ SArray* createExecOperatorPlan(SQueryAttr* pQueryAttr) { ...@@ -588,6 +588,12 @@ SArray* createExecOperatorPlan(SQueryAttr* pQueryAttr) {
op = OP_Fill; op = OP_Fill;
taosArrayPush(plan, &op); taosArrayPush(plan, &op);
} }
// outer query order by support
int32_t orderColId = pQueryAttr->order.orderColId;
if (pQueryAttr->vgId == 0 && orderColId != PRIMARYKEY_TIMESTAMP_COL_INDEX && orderColId != INT32_MIN) {
op = OP_Order;
taosArrayPush(plan, &op);
}
} }
} else if (pQueryAttr->groupbyColumn) { } else if (pQueryAttr->groupbyColumn) {
......
...@@ -131,7 +131,7 @@ void taosCloseLog() { ...@@ -131,7 +131,7 @@ void taosCloseLog() {
taosStopLog(); taosStopLog();
//tsem_post(&(tsLogObj.logHandle->buffNotEmpty)); //tsem_post(&(tsLogObj.logHandle->buffNotEmpty));
taosMsleep(MAX_LOG_INTERVAL/1000); taosMsleep(MAX_LOG_INTERVAL/1000);
if (taosCheckPthreadValid(tsLogObj.logHandle->asyncThread)) { if (tsLogObj.logHandle && taosCheckPthreadValid(tsLogObj.logHandle->asyncThread)) {
pthread_join(tsLogObj.logHandle->asyncThread, NULL); pthread_join(tsLogObj.logHandle->asyncThread, NULL);
} }
// In case that other threads still use log resources causing invalid write in valgrind // In case that other threads still use log resources causing invalid write in valgrind
......
...@@ -361,7 +361,10 @@ namespace TDengineDriver ...@@ -361,7 +361,10 @@ namespace TDengineDriver
threadArr[i] = new Thread(createTableThread.ThreadMain); threadArr[i] = new Thread(createTableThread.ThreadMain);
threadArr[i].Start(); threadArr[i].Start();
threadArr[i].Join(); }
for (int j = 0; j < numOfThreads; j++)
{
threadArr[j].Join();
} }
} }
...@@ -482,7 +485,10 @@ namespace TDengineDriver ...@@ -482,7 +485,10 @@ namespace TDengineDriver
threadArr[i] = new Thread(insertThread.ThreadMain); threadArr[i] = new Thread(insertThread.ThreadMain);
threadArr[i].Start(); threadArr[i].Start();
threadArr[i].Join(); }
for (int j = 0; j < numOfThreads; j++)
{
threadArr[j].Join();
} }
} }
......
#!/bin/bash
ulimit -c unlimited
#======================p1-start===============
#======================p1-end===============
# restful test for python
# python3 test.py -f restful/restful_bind_db1.py
# python3 test.py -f restful/restful_bind_db2.py
python3 ./test.py -f client/nettest.py
\ No newline at end of file
#!/bin/bash
ulimit -c unlimited
#======================p1-start===============
#======================p1-end===============
python3 testCompress.py
python3 testNoCompress.py
python3 ./test.py -f import_merge/importBlock1HO.py
python3 ./test.py -f import_merge/importBlock1HPO.py
python3 ./test.py -f import_merge/importBlock1H.py
python3 ./test.py -f import_merge/importBlock1S.py
python3 ./test.py -f import_merge/importBlock1Sub.py
python3 ./test.py -f import_merge/importBlock1TO.py
python3 ./test.py -f import_merge/importBlock1TPO.py
python3 ./test.py -f import_merge/importBlock1T.py
python3 ./test.py -f import_merge/importBlock2HO.py
python3 ./test.py -f import_merge/importBlock2HPO.py
python3 ./test.py -f import_merge/importBlock2H.py
python3 ./test.py -f import_merge/importBlock2S.py
python3 ./test.py -f import_merge/importBlock2Sub.py
python3 ./test.py -f import_merge/importBlock2TO.py
python3 ./test.py -f import_merge/importBlock2TPO.py
python3 ./test.py -f import_merge/importBlock2T.py
python3 ./test.py -f import_merge/importBlockbetween.py
python3 ./test.py -f import_merge/importCacheFileHO.py
python3 ./test.py -f import_merge/importCacheFileHPO.py
python3 ./test.py -f import_merge/importCacheFileH.py
python3 ./test.py -f import_merge/importCacheFileS.py
python3 ./test.py -f import_merge/importCacheFileSub.py
python3 ./test.py -f import_merge/importCacheFileTO.py
python3 ./test.py -f import_merge/importCacheFileTPO.py
python3 ./test.py -f import_merge/importCacheFileT.py
python3 ./test.py -f import_merge/importDataH2.py
python3 ./test.py -f import_merge/importDataHO2.py
python3 ./test.py -f import_merge/importDataHO.py
python3 ./test.py -f import_merge/importDataHPO.py
python3 ./test.py -f import_merge/importDataLastHO.py
python3 ./test.py -f import_merge/importDataLastHPO.py
python3 ./test.py -f import_merge/importDataLastH.py
python3 ./test.py -f import_merge/importDataLastS.py
python3 ./test.py -f import_merge/importDataLastSub.py
python3 ./test.py -f import_merge/importDataLastTO.py
python3 ./test.py -f import_merge/importDataLastTPO.py
python3 ./test.py -f import_merge/importDataLastT.py
python3 ./test.py -f import_merge/importDataS.py
python3 ./test.py -f import_merge/importDataSub.py
python3 ./test.py -f import_merge/importDataTO.py
python3 ./test.py -f import_merge/importDataTPO.py
python3 ./test.py -f import_merge/importDataT.py
python3 ./test.py -f import_merge/importHeadOverlap.py
python3 ./test.py -f import_merge/importHeadPartOverlap.py
python3 ./test.py -f import_merge/importHead.py
python3 ./test.py -f import_merge/importHORestart.py
python3 ./test.py -f import_merge/importHPORestart.py
python3 ./test.py -f import_merge/importHRestart.py
python3 ./test.py -f import_merge/importLastHO.py
python3 ./test.py -f import_merge/importLastHPO.py
python3 ./test.py -f import_merge/importLastH.py
python3 ./test.py -f import_merge/importLastS.py
python3 ./test.py -f import_merge/importLastSub.py
python3 ./test.py -f import_merge/importLastTO.py
python3 ./test.py -f import_merge/importLastTPO.py
python3 ./test.py -f import_merge/importLastT.py
python3 ./test.py -f import_merge/importSpan.py
python3 ./test.py -f import_merge/importSRestart.py
python3 ./test.py -f import_merge/importSubRestart.py
python3 ./test.py -f import_merge/importTailOverlap.py
python3 ./test.py -f import_merge/importTailPartOverlap.py
python3 ./test.py -f import_merge/importTail.py
python3 ./test.py -f import_merge/importToCommit.py
python3 ./test.py -f import_merge/importTORestart.py
python3 ./test.py -f import_merge/importTPORestart.py
python3 ./test.py -f import_merge/importTRestart.py
python3 ./test.py -f import_merge/importInsertThenImport.py
python3 ./test.py -f import_merge/importCSV.py
python3 ./test.py -f import_merge/import_update_0.py
python3 ./test.py -f import_merge/import_update_1.py
python3 ./test.py -f import_merge/import_update_2.py
python3 ./test.py -f insert/basic.py
python3 ./test.py -f insert/int.py
python3 ./test.py -f insert/float.py
python3 ./test.py -f insert/bigint.py
python3 ./test.py -f insert/bool.py
python3 ./test.py -f insert/double.py
python3 ./test.py -f insert/smallint.py
python3 ./test.py -f insert/tinyint.py
python3 ./test.py -f insert/date.py
python3 ./test.py -f insert/binary.py
python3 ./test.py -f insert/nchar.py
#python3 ./test.py -f insert/nchar-boundary.py
python3 ./test.py -f insert/nchar-unicode.py
python3 ./test.py -f insert/multi.py
python3 ./test.py -f insert/randomNullCommit.py
python3 insert/retentionpolicy.py
python3 ./test.py -f insert/alterTableAndInsert.py
python3 ./test.py -f insert/insertIntoTwoTables.py
python3 ./test.py -f insert/before_1970.py
python3 ./test.py -f insert/special_character_show.py
python3 bug2265.py
python3 ./test.py -f insert/bug3654.py
python3 ./test.py -f insert/insertDynamicColBeforeVal.py
python3 ./test.py -f insert/in_function.py
python3 ./test.py -f insert/modify_column.py
#python3 ./test.py -f insert/line_insert.py
python3 ./test.py -f insert/specialSql.py
python3 ./test.py -f insert/timestamp.py
python3 ./test.py -f insert/metadataUpdate.py
python3 ./test.py -f insert/unsignedInt.py
python3 ./test.py -f insert/unsignedBigint.py
python3 ./test.py -f insert/unsignedSmallint.py
python3 ./test.py -f insert/unsignedTinyint.py
python3 ./test.py -f insert/insertFromCSV.py
python3 ./test.py -f insert/boundary2.py
python3 ./test.py -f insert/insert_locking.py
python3 test.py -f insert/insert_before_use_db.py
python3 ./test.py -f insert/flushwhiledrop.py
python3 ./test.py -f insert/verifyMemToDiskCrash.py
#python3 ./test.py -f insert/schemalessInsert.py
#python3 ./test.py -f insert/openTsdbJsonInsert.py
python3 ./test.py -f insert/openTsdbTelnetLinesInsert.py
# update
python3 ./test.py -f update/merge_commit_data.py
python3 ./test.py -f update/allow_update.py
python3 ./test.py -f update/allow_update-0.py
python3 ./test.py -f update/append_commit_data.py
python3 ./test.py -f update/append_commit_last-0.py
python3 ./test.py -f update/append_commit_last.py
python3 ./test.py -f update/merge_commit_data2.py
python3 ./test.py -f update/merge_commit_data2_update0.py
python3 ./test.py -f update/merge_commit_last-0.py
python3 ./test.py -f update/merge_commit_last.py
python3 ./test.py -f update/update_options.py
python3 ./test.py -f update/merge_commit_data-0.py
# wal
python3 ./test.py -f wal/addOldWalTest.py
python3 ./test.py -f wal/sdbComp.py
#!/bin/bash
ulimit -c unlimited
#======================p1-start===============
#======================p1-end===============
#python3 ./test.py -f dbmgmt/database-name-boundary.py
python3 test.py -f dbmgmt/nanoSecondCheck.py
#
python3 ./test.py -f tsdb/tsdbComp.py
# user
python3 ./test.py -f user/user_create.py
python3 ./test.py -f user/pass_len.py
# perfbenchmark
python3 ./test.py -f perfbenchmark/bug3433.py
#python3 ./test.py -f perfbenchmark/bug3589.py
#python3 ./test.py -f perfbenchmark/taosdemoInsert.py
#alter table
python3 ./test.py -f alter/alter_table_crash.py
python3 ./test.py -f alter/alterTabAddTagWithNULL.py
python3 ./test.py -f alter/alterTimestampColDataProcess.py
python3 ./test.py -f alter/alter_table.py
python3 ./test.py -f alter/alter_debugFlag.py
python3 ./test.py -f alter/alter_keep.py
python3 ./test.py -f alter/alter_cacheLastRow.py
python3 ./test.py -f alter/alter_create_exception.py
python3 ./test.py -f alter/alterColMultiTimes.py
python3 ./test.py -f account/account_create.py
# client
python3 ./test.py -f client/client.py
python3 ./test.py -f client/version.py
python3 ./test.py -f client/alterDatabase.py
python3 ./test.py -f client/noConnectionErrorTest.py
python3 ./test.py -f client/taoshellCheckCase.py
# python3 ./test.py -f client/change_time_1_1.py
# python3 ./test.py -f client/change_time_1_2.py
python3 client/twoClients.py
python3 testMinTablesPerVnode.py
# topic
python3 ./test.py -f topic/topicQuery.py
#!/bin/bash
ulimit -c unlimited
#======================p1-start===============
#======================p1-end===============
# timezone
python3 ./test.py -f TimeZone/TestCaseTimeZone.py
#stable
python3 ./test.py -f stable/insert.py
python3 ./test.py -f stable/query_after_reset.py
#table
python3 ./test.py -f table/alter_wal0.py
python3 ./test.py -f table/column_name.py
python3 ./test.py -f table/column_num.py
python3 ./test.py -f table/db_table.py
python3 ./test.py -f table/create_sensitive.py
python3 ./test.py -f table/tablename-boundary.py
python3 ./test.py -f table/max_table_length.py
python3 ./test.py -f table/alter_column.py
python3 ./test.py -f table/boundary.py
#python3 ./test.py -f table/create.py
python3 ./test.py -f table/del_stable.py
python3 ./test.py -f table/create_db_from_normal_db.py
# tag
python3 ./test.py -f tag_lite/filter.py
python3 ./test.py -f tag_lite/create-tags-boundary.py
python3 ./test.py -f tag_lite/3.py
python3 ./test.py -f tag_lite/4.py
python3 ./test.py -f tag_lite/5.py
python3 ./test.py -f tag_lite/6.py
python3 ./test.py -f tag_lite/add.py
python3 ./test.py -f tag_lite/bigint.py
python3 ./test.py -f tag_lite/binary_binary.py
python3 ./test.py -f tag_lite/binary.py
python3 ./test.py -f tag_lite/bool_binary.py
python3 ./test.py -f tag_lite/bool_int.py
python3 ./test.py -f tag_lite/bool.py
python3 ./test.py -f tag_lite/change.py
python3 ./test.py -f tag_lite/column.py
python3 ./test.py -f tag_lite/commit.py
python3 ./test.py -f tag_lite/create.py
python3 ./test.py -f tag_lite/datatype.py
python3 ./test.py -f tag_lite/datatype-without-alter.py
python3 ./test.py -f tag_lite/delete.py
python3 ./test.py -f tag_lite/double.py
python3 ./test.py -f tag_lite/float.py
python3 ./test.py -f tag_lite/int_binary.py
python3 ./test.py -f tag_lite/int_float.py
python3 ./test.py -f tag_lite/int.py
python3 ./test.py -f tag_lite/set.py
python3 ./test.py -f tag_lite/smallint.py
python3 ./test.py -f tag_lite/tinyint.py
python3 ./test.py -f tag_lite/timestamp.py
python3 ./test.py -f tag_lite/TestModifyTag.py
python3 ./test.py -f tag_lite/unsignedInt.py
python3 ./test.py -f tag_lite/unsignedBigint.py
python3 ./test.py -f tag_lite/unsignedSmallint.py
python3 ./test.py -f tag_lite/unsignedTinyint.py
python3 ./test.py -f tag_lite/alter_tag.py
python3 ./test.py -f tag_lite/drop_auto_create.py
python3 ./test.py -f tag_lite/json_tag_extra.py
#query
python3 ./test.py -f query/distinctOneColTb.py
python3 ./test.py -f query/filter.py
python3 ./test.py -f query/filterCombo.py
python3 ./test.py -f query/queryNormal.py
python3 ./test.py -f query/queryError.py
python3 ./test.py -f query/filterAllIntTypes.py
python3 ./test.py -f query/filterFloatAndDouble.py
python3 ./test.py -f query/filterOtherTypes.py
python3 ./test.py -f query/querySort.py
python3 ./test.py -f query/queryJoin.py
python3 ./test.py -f query/select_last_crash.py
python3 ./test.py -f query/queryNullValueTest.py
python3 ./test.py -f query/queryInsertValue.py
python3 ./test.py -f query/queryConnection.py
python3 ./test.py -f query/queryCountCSVData.py
python3 ./test.py -f query/natualInterval.py
python3 ./test.py -f query/bug1471.py
#python3 ./test.py -f query/dataLossTest.py
python3 ./test.py -f query/bug1874.py
python3 ./test.py -f query/bug1875.py
python3 ./test.py -f query/bug1876.py
python3 ./test.py -f query/bug2218.py
python3 ./test.py -f query/bug2117.py
python3 ./test.py -f query/bug2118.py
python3 ./test.py -f query/bug2143.py
python3 ./test.py -f query/sliding.py
python3 ./test.py -f query/unionAllTest.py
python3 ./test.py -f query/bug2281.py
python3 ./test.py -f query/udf.py
python3 ./test.py -f query/bug2119.py
python3 ./test.py -f query/isNullTest.py
python3 ./test.py -f query/queryWithTaosdKilled.py
python3 ./test.py -f query/floatCompare.py
python3 ./test.py -f query/query1970YearsAf.py
python3 ./test.py -f query/bug3351.py
python3 ./test.py -f query/bug3375.py
python3 ./test.py -f query/queryJoin10tables.py
python3 ./test.py -f query/queryStddevWithGroupby.py
python3 ./test.py -f query/querySecondtscolumnTowherenow.py
python3 ./test.py -f query/queryFilterTswithDateUnit.py
python3 ./test.py -f query/queryTscomputWithNow.py
python3 ./test.py -f query/queryStableJoin.py
python3 ./test.py -f query/computeErrorinWhere.py
python3 ./test.py -f query/queryTsisNull.py
python3 ./test.py -f query/subqueryFilter.py
python3 ./test.py -f query/nestedQuery/queryInterval.py
python3 ./test.py -f query/queryStateWindow.py
# python3 ./test.py -f query/nestedQuery/queryWithOrderLimit.py
python3 ./test.py -f query/nestquery_last_row.py
python3 ./test.py -f query/nestedQuery/nestedQuery.py
python3 ./test.py -f query/nestedQuery/nestedQuery_datacheck.py
python3 ./test.py -f query/queryCnameDisplay.py
# python3 ./test.py -f query/operator_cost.py
# python3 ./test.py -f query/long_where_query.py
python3 test.py -f query/nestedQuery/queryWithSpread.py
python3 ./test.py -f query/bug6586.py
# python3 ./test.py -f query/bug5903.py
python3 test.py -f query/queryInterval.py
python3 test.py -f query/queryFillTest.py
python3 ./test.py -f query/last_cache.py
python3 ./test.py -f query/last_row_cache.py
python3 ./test.py -f query/queryGroupbySort.py
python3 ./test.py -f query/filterAllUnsignedIntTypes.py
python3 ./test.py -f query/queryBetweenAnd.py
python3 ./test.py -f query/querySession.py
python3 ./test.py -f query/queryWildcardLength.py
python3 ./test.py -f query/queryTbnameUpperLower.py
python3 ./test.py -f query/query.py
python3 ./test.py -f query/queryDiffColsTagsAndOr.py
python3 ./test.py -f query/queryGroupTbname.py
python3 ./test.py -f query/queryRegex.py
#stream
python3 ./test.py -f stream/metric_1.py
python3 ./test.py -f stream/metric_n.py
python3 ./test.py -f stream/new.py
python3 ./test.py -f stream/stream1.py
python3 ./test.py -f stream/stream2.py
#python3 ./test.py -f stream/parser.py
python3 ./test.py -f stream/history.py
python3 ./test.py -f stream/sys.py
python3 ./test.py -f stream/table_1.py
python3 ./test.py -f stream/table_n.py
python3 ./test.py -f stream/showStreamExecTimeisNull.py
python3 ./test.py -f stream/cqSupportBefore1970.py
python3 ./test.py -f query/queryGroupbyWithInterval.py
python3 queryCount.py
# subscribe
python3 test.py -f subscribe/singlemeter.py
#python3 test.py -f subscribe/stability.py
python3 test.py -f subscribe/supertable.py
# functions
python3 ./test.py -f functions/all_null_value.py
python3 ./test.py -f functions/function_avg.py -r 1
python3 ./test.py -f functions/function_bottom.py -r 1
python3 ./test.py -f functions/function_count.py -r 1
python3 ./test.py -f functions/function_count_last_stab.py
python3 ./test.py -f functions/function_diff.py -r 1
python3 ./test.py -f functions/function_first.py -r 1
python3 ./test.py -f functions/function_last.py -r 1
python3 ./test.py -f functions/function_last_row.py -r 1
python3 ./test.py -f functions/function_leastsquares.py -r 1
python3 ./test.py -f functions/function_max.py -r 1
python3 ./test.py -f functions/function_min.py -r 1
python3 ./test.py -f functions/function_operations.py -r 1
python3 ./test.py -f functions/function_percentile.py -r 1
python3 ./test.py -f functions/function_spread.py -r 1
python3 ./test.py -f functions/function_stddev.py -r 1
python3 ./test.py -f functions/function_sum.py -r 1
python3 ./test.py -f functions/function_top.py -r 1
python3 ./test.py -f functions/function_sample.py -r 1
python3 ./test.py -f functions/function_twa.py -r 1
python3 ./test.py -f functions/function_twa_test2.py
python3 ./test.py -f functions/function_stddev_td2555.py
python3 ./test.py -f functions/showOfflineThresholdIs864000.py
python3 ./test.py -f functions/function_interp.py
#python3 ./test.py -f functions/queryTestCases.py
python3 ./test.py -f functions/function_stateWindow.py
python3 ./test.py -f functions/function_derivative.py
python3 ./test.py -f functions/function_irate.py
python3 ./test.py -f functions/function_ceil.py
python3 ./test.py -f functions/function_floor.py
python3 ./test.py -f functions/function_round.py
python3 ./test.py -f functions/function_elapsed.py
python3 ./test.py -f functions/function_mavg.py
python3 ./test.py -f functions/function_csum.py
python3 ./test.py -f functions/function_percentile2.py
python3 ./test.py -f functions/variable_httpDbNameMandatory.py
#!/bin/bash
ulimit -c unlimited
#======================p1-start===============
#======================p1-end===============
# tools
python3 test.py -f tools/taosdumpTest.py
python3 test.py -f tools/taosdumpTest2.py
python3 test.py -f tools/taosdemoTest.py
python3 test.py -f tools/taosdemoTestWithoutMetric.py
python3 test.py -f tools/taosdemoTestWithJson.py
python3 test.py -f tools/taosdemoTestLimitOffset.py
python3 test.py -f tools/taosdemoTestTblAlt.py
python3 test.py -f tools/taosdemoTestSampleData.py
python3 test.py -f tools/taosdemoTestInterlace.py
# python3 test.py -f tools/taosdemoTestQuery.py
python3 ./test.py -f tools/taosdemoTestdatatype.py
# nano support
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py
python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py
python3 test.py -f tools/taosdumpTestNanoSupport.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py
python3 test.py -f tools/taosdemoAllTest/TD-4985/query-limit-offset.py
python3 test.py -f tools/taosdemoAllTest/TD-5213/insert4096columns_not_use_taosdemo.py
python3 test.py -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py
#python3 test.py -f tools/taosdemoAllTest/TD-10539/create_taosdemo.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertShell.py
...@@ -52,6 +52,8 @@ python3 ./test.py -f table/create_db_from_normal_db.py ...@@ -52,6 +52,8 @@ python3 ./test.py -f table/create_db_from_normal_db.py
#stable #stable
python3 ./test.py -f stable/insert.py python3 ./test.py -f stable/insert.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py
python3 test.py -f tag_lite/json_tag_extra.py
# tag # tag
python3 ./test.py -f tag_lite/filter.py python3 ./test.py -f tag_lite/filter.py
...@@ -223,6 +225,7 @@ python3 ./test.py -f perfbenchmark/bug3433.py ...@@ -223,6 +225,7 @@ python3 ./test.py -f perfbenchmark/bug3433.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertShell.py
#query #query
python3 test.py -f query/distinctOneColTb.py python3 test.py -f query/distinctOneColTb.py
......
...@@ -320,6 +320,8 @@ class ElapsedCase: ...@@ -320,6 +320,8 @@ class ElapsedCase:
def selectIllegalTest(self): def selectIllegalTest(self):
tdSql.execute("use wxy_db") tdSql.execute("use wxy_db")
tdSql.error("select elapsed() from t1")
tdSql.error("select elapsed(,) from t1")
tdSql.error("select elapsed(1) from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00'") tdSql.error("select elapsed(1) from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00'")
tdSql.error("select elapsed('2021-11-18 00:00:10') from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00'") tdSql.error("select elapsed('2021-11-18 00:00:10') from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00'")
tdSql.error("select elapsed(now) from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00'") tdSql.error("select elapsed(now) from t1 where ts > '2021-11-22 00:00:00' and ts < '2021-11-23 00:00:00'")
......
...@@ -34,11 +34,15 @@ class TDTestCase: ...@@ -34,11 +34,15 @@ class TDTestCase:
def getBuildPath(self) -> str: def getBuildPath(self) -> str:
selfPath = os.path.dirname(os.path.realpath(__file__)) selfPath = os.path.dirname(os.path.realpath(__file__))
global cfgPath
if ("community" in selfPath): if ("community" in selfPath):
projPath = selfPath[:selfPath.find("community")] projPath = selfPath[:selfPath.find("community")]
cfgPath = projPath + "/community/sim/dnode1/cfg"
else: else:
projPath = selfPath[:selfPath.find("tests")] projPath = selfPath[:selfPath.find("tests")]
cfgPath = projPath + "/sim/dnode1/cfg"
for root, dirs, files in os.walk(projPath): for root, dirs, files in os.walk(projPath):
if ("taosd" in files): if ("taosd" in files):
...@@ -53,8 +57,10 @@ class TDTestCase: ...@@ -53,8 +57,10 @@ class TDTestCase:
if ("community" in selfPath): if ("community" in selfPath):
cfgDir = self.getBuildPath() + "/community/sim/dnode1/cfg" cfgDir = self.getBuildPath() + "/community/sim/dnode1/cfg"
else: else:
cfgDir = self.getBuildPath() + "/sim/dnode1/cfg" cfgDir = self.getBuildPath() + "/sim/dnode1/cfg"
return cfgDir return cfgDir
def getCfgFile(self) -> str: def getCfgFile(self) -> str:
...@@ -85,8 +91,8 @@ class TDTestCase: ...@@ -85,8 +91,8 @@ class TDTestCase:
def TS834(self): def TS834(self):
tdLog.printNoPrefix("==========TS-782==========") tdLog.printNoPrefix("==========TS-782==========")
tdSql.prepare() tdSql.prepare()
buildPath = self.getBuildPath()
cfgfile = self.getCfgFile() cfgfile = cfgPath + "/taos.cfg"
tdSql.execute("show variables") tdSql.execute("show variables")
res_com = tdSql.cursor.fetchall() res_com = tdSql.cursor.fetchall()
......
此差异已折叠。
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"batch_create_tbl_num": 10, "batch_create_tbl_num": 10,
"data_source": "rand", "data_source": "rand",
"insert_mode": "taosc", "insert_mode": "taosc",
"insert_rows": 10000, "insert_rows": 100,
"childtable_limit": 0, "childtable_limit": 0,
"childtable_offset":0, "childtable_offset":0,
"multi_thread_write_one_tbl": "no", "multi_thread_write_one_tbl": "no",
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
"batch_create_tbl_num": 10, "batch_create_tbl_num": 10,
"data_source": "rand", "data_source": "rand",
"insert_mode": "taosc", "insert_mode": "taosc",
"insert_rows": 20000, "insert_rows": 200,
"childtable_limit": 0, "childtable_limit": 0,
"childtable_offset":0, "childtable_offset":0,
"multi_thread_write_one_tbl": "no", "multi_thread_write_one_tbl": "no",
......
{
"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": 1000,
"max_sql_len": 1024000,
"chinese": "yes",
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 10,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 20,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 150,
"childtable_limit": -1,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":2}, {"type": "nchar", "len": 32, "count":2}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY","count":1}, {"type": "nchar", "count":2}]
}]
}]
}
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"update": 0 "update": 0
}, },
"super_tables": [{ "super_tables": [{
"name": "stb", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb2",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb3",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb4",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb5",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb6",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"update": 0 "update": 0
}, },
"super_tables": [{ "super_tables": [{
"name": "stb", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb2",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb3",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb4",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb5",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb6",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
......
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
"super_tables": [{ "super_tables": [{
"name": "stb0", "name": "stb0",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 100, "childtable_count": 10,
"childtable_prefix": "stb00_", "childtable_prefix": "stb00_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 10, "batch_create_tbl_num": 10,
"data_source": "rand", "data_source": "rand",
"insert_mode": "taosc", "insert_mode": "taosc",
"insert_rows": 20000, "insert_rows": 200,
"childtable_limit": 0, "childtable_limit": 0,
"childtable_offset":0, "childtable_offset":0,
"multi_thread_write_one_tbl": "no", "multi_thread_write_one_tbl": "no",
...@@ -61,13 +61,13 @@ ...@@ -61,13 +61,13 @@
{ {
"name": "stb1", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 100, "childtable_count": 20,
"childtable_prefix": "stb01_", "childtable_prefix": "stb01_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 10, "batch_create_tbl_num": 10,
"data_source": "rand", "data_source": "rand",
"insert_mode": "taosc", "insert_mode": "taosc",
"insert_rows": 20000, "insert_rows": 200,
"childtable_limit": 0, "childtable_limit": 0,
"childtable_offset":0, "childtable_offset":0,
"multi_thread_write_one_tbl": "no", "multi_thread_write_one_tbl": "no",
......
{
"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": 10,
"num_of_records_per_req": 10240000000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
...@@ -109,58 +109,6 @@ ...@@ -109,58 +109,6 @@
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}], "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}] }]
}] }]
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"sample_format": "csv", "sample_format": "csv",
"sample_file": "./sample.csv", "sample_file": "./sample.csv",
"tags_file": "", "tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1004}, {"type": "BINARY", "len": 5, "count":3075}, {"type": "BINARY", "len": 32, "count":6}], "columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1004}, {"type": "BINARY", "len": 1, "count":3075}, {"type": "BINARY", "len": 32, "count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":7}]
}] }]
}] }]
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"super_table_query": { "super_table_query": {
"stblname": "stb0", "stblname": "stb0",
"query_interval": 10000, "query_interval": 10000,
"concurrent": 9, "threads": 9,
"sqls": [ "sqls": [
{ {
"sql": "select last_row(*) from xxxx", "sql": "select last_row(*) from xxxx",
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"super_tables": [{ "super_tables": [{
"name": "stb0", "name": "stb0",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 1000, "childtable_count": 10,
"childtable_prefix": "stb00_", "childtable_prefix": "stb00_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 1, "batch_create_tbl_num": 1,
...@@ -55,13 +55,13 @@ ...@@ -55,13 +55,13 @@
"sample_format": "csv", "sample_format": "csv",
"sample_file": "./sample.csv", "sample_file": "./sample.csv",
"tags_file": "", "tags_file": "",
"columns": [{"type": "INT"}, {"type": "TIMESTAMP"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}], "columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}],
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}] "tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}]
}, },
{ {
"name": "stb1", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 1000, "childtable_count": 20,
"childtable_prefix": "stb01_", "childtable_prefix": "stb01_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 10, "batch_create_tbl_num": 10,
......
...@@ -35,14 +35,14 @@ ...@@ -35,14 +35,14 @@
"super_tables": [{ "super_tables": [{
"name": "stb0", "name": "stb0",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 2, "childtable_count": 1,
"childtable_prefix": "stb00_", "childtable_prefix": "stb00_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 0, "interlace_rows": 0,
...@@ -59,16 +59,16 @@ ...@@ -59,16 +59,16 @@
"tags": [{"type": "INT", "count":1}] "tags": [{"type": "INT", "count":1}]
}, },
{ {
"name": "stb2", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 4, "childtable_count": 2,
"childtable_prefix": "stb02_", "childtable_prefix": "stb02_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "json" , "line_protocol": "json" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -265,6 +265,84 @@ ...@@ -265,6 +265,84 @@
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16, "count":1}], "columns": [{"type": "BINARY", "len": 16, "count":1}],
"tags": [{"type": "BINARY", "count":1}] "tags": [{"type": "BINARY", "count":1}]
},
{
"name": "stb10",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_prefix": "stb10_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "UBIGINT"}],
"tags": [{"type": "UBIGINT", "count":1}]
},
{
"name": "stb11",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_prefix": "stb11_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "UTINYINT"}],
"tags": [{"type": "UTINYINT", "count":1}]
},
{
"name": "stb12",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_prefix": "stb12_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [ {"type": "USMALLINT"}],
"tags": [{"type": "USMALLINT", "count":1}]
}] }]
}] }]
} }
...@@ -35,14 +35,14 @@ ...@@ -35,14 +35,14 @@
"super_tables": [{ "super_tables": [{
"name": "stb0", "name": "stb0",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 2, "childtable_count": 1,
"childtable_prefix": "stb00_", "childtable_prefix": "stb00_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 0, "interlace_rows": 0,
...@@ -61,14 +61,14 @@ ...@@ -61,14 +61,14 @@
{ {
"name": "stb1", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 2,
"childtable_prefix": "stb01_", "childtable_prefix": "stb01_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -87,14 +87,14 @@ ...@@ -87,14 +87,14 @@
{ {
"name": "stb2", "name": "stb2",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 4, "childtable_count": 3,
"childtable_prefix": "stb02_", "childtable_prefix": "stb02_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -113,14 +113,14 @@ ...@@ -113,14 +113,14 @@
{ {
"name": "stb3", "name": "stb3",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 5, "childtable_count": 4,
"childtable_prefix": "stb03_", "childtable_prefix": "stb03_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -139,14 +139,14 @@ ...@@ -139,14 +139,14 @@
{ {
"name": "stb4", "name": "stb4",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 6, "childtable_count": 5,
"childtable_prefix": "stb04_", "childtable_prefix": "stb04_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":30, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -165,14 +165,14 @@ ...@@ -165,14 +165,14 @@
{ {
"name": "stb5", "name": "stb5",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 15, "childtable_count": 6,
"childtable_prefix": "stb05_", "childtable_prefix": "stb05_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":20, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
{ {
"name": "stb6", "name": "stb6",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 20, "childtable_count": 7,
"childtable_prefix": "stb06_", "childtable_prefix": "stb06_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
...@@ -217,14 +217,14 @@ ...@@ -217,14 +217,14 @@
{ {
"name": "stb7", "name": "stb7",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 30, "childtable_count": 8 ,
"childtable_prefix": "stb07_", "childtable_prefix": "stb07_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":5, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -243,14 +243,14 @@ ...@@ -243,14 +243,14 @@
{ {
"name": "stb8", "name": "stb8",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 20, "childtable_count": 9,
"childtable_prefix": "stb08_", "childtable_prefix": "stb08_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":30, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -269,14 +269,14 @@ ...@@ -269,14 +269,14 @@
{ {
"name": "stb9", "name": "stb9",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 10,
"childtable_prefix": "stb09_", "childtable_prefix": "stb09_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -295,14 +295,14 @@ ...@@ -295,14 +295,14 @@
{ {
"name": "stb10", "name": "stb10",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 11,
"childtable_prefix": "stb10_", "childtable_prefix": "stb10_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -321,14 +321,14 @@ ...@@ -321,14 +321,14 @@
{ {
"name": "stb11", "name": "stb11",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 12,
"childtable_prefix": "stb11_", "childtable_prefix": "stb11_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
...@@ -347,14 +347,14 @@ ...@@ -347,14 +347,14 @@
{ {
"name": "stb12", "name": "stb12",
"child_table_exists":"no", "child_table_exists":"no",
"childtable_count": 3, "childtable_count": 13,
"childtable_prefix": "stb12_", "childtable_prefix": "stb12_",
"auto_create_table": "no", "auto_create_table": "no",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "sml", "insert_mode": "sml",
"line_protocol": "telnet" , "line_protocol": "telnet" ,
"insert_rows":50, "insert_rows":10,
"childtable_limit": -1, "childtable_limit": -1,
"childtable_offset":0, "childtable_offset":0,
"interlace_rows": 32767, "interlace_rows": 32767,
......
{
"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": 50000,
"num_of_records_per_req": 50000,
"max_sql_len": 1025000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_prefix": "stb12_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows":50,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [ {"type": "TIMESTAMP"}],
"tags": [{"type": "TIMESTAMP", "count":1}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_prefix": "stb12_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "telnet" ,
"insert_rows":50,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [ {"type": "TIMESTAMP"}],
"tags": [{"type": "TIMESTAMP", "count":1}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 3,
"childtable_prefix": "stb12_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "sml",
"line_protocol": "json" ,
"insert_rows":50,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [ {"type": "TIMESTAMP"}],
"tags": [{"type": "TIMESTAMP", "count":1}]
}]
}]
}
{
"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": 10,
"num_of_records_per_req": 10240000000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
...@@ -109,58 +109,6 @@ ...@@ -109,58 +109,6 @@
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}], "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "sml",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}] }]
}] }]
} }
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
"update": 0 "update": 0
}, },
"super_tables": [{ "super_tables": [{
"name": "stb", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "NN123_", "childtable_prefix": "NN123_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "stmt",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -56,14 +56,14 @@ ...@@ -56,14 +56,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb2",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "NNN_", "childtable_prefix": "NNN_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "stmt",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -80,14 +80,14 @@ ...@@ -80,14 +80,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb3",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "NNY_", "childtable_prefix": "NNY_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "stmt",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -104,14 +104,14 @@ ...@@ -104,14 +104,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb4",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "NY123_", "childtable_prefix": "NY123_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "stmt",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -128,14 +128,14 @@ ...@@ -128,14 +128,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb5",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "NYN_", "childtable_prefix": "NYN_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "stmt",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -152,14 +152,14 @@ ...@@ -152,14 +152,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb6",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "NYY_", "childtable_prefix": "NYY_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "stmt",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
......
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
"update": 0 "update": 0
}, },
"super_tables": [{ "super_tables": [{
"name": "stb", "name": "stb1",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "YN123_", "childtable_prefix": "YN123_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -56,14 +56,14 @@ ...@@ -56,14 +56,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb2",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "YNN_", "childtable_prefix": "YNN_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -80,14 +80,14 @@ ...@@ -80,14 +80,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb3",
"child_table_exists":"no", "child_table_exists":"no",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "YNY_", "childtable_prefix": "YNY_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -104,14 +104,14 @@ ...@@ -104,14 +104,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb4",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "123", "auto_create_table": "123",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "YY123_", "childtable_prefix": "YY123_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -128,14 +128,14 @@ ...@@ -128,14 +128,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb5",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "no", "auto_create_table": "no",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "YYN_", "childtable_prefix": "YYN_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
...@@ -152,14 +152,14 @@ ...@@ -152,14 +152,14 @@
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "TINYINT"}] "tags": [{"type": "TINYINT"}]
},{ },{
"name": "stb", "name": "stb6",
"child_table_exists":"yes", "child_table_exists":"yes",
"auto_create_table": "yes", "auto_create_table": "yes",
"childtable_count": 20, "childtable_count": 20,
"childtable_prefix": "YYY_", "childtable_prefix": "YYY_",
"batch_create_tbl_num": 100, "batch_create_tbl_num": 100,
"data_source": "rand", "data_source": "rand",
"insert_mode": "stmt", "insert_mode": "taosc",
"insert_rows": 5, "insert_rows": 5,
"childtable_limit": 40, "childtable_limit": 40,
"childtable_offset":0, "childtable_offset":0,
......
{
"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": 10,
"num_of_records_per_req": 10240000000,
"max_sql_len": 10240000000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}]
}]
}
...@@ -109,58 +109,6 @@ ...@@ -109,58 +109,6 @@
"tags_file": "", "tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}], "columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}] "tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb2",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb02_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16375, "count":1},{"type": "INT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
},
{
"name": "stb4",
"child_table_exists":"no",
"childtable_count": 1,
"childtable_prefix": "stb04_",
"auto_create_table": "no",
"batch_create_tbl_num": 12,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 1,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 100,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "BINARY", "len": 16371, "count":3},{"type": "INT","count":6},{"type": "TINYINT"}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
}] }]
}] }]
} }
...@@ -48,7 +48,7 @@ class TDTestCase: ...@@ -48,7 +48,7 @@ class TDTestCase:
tdLog.info("taosd found in %s" % buildPath) tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/" binPath = buildPath+ "/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql # taosc interface
os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-allDataType.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-allDataType.json -y " % binPath)
tdSql.execute("use db") tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0") tdSql.query("select count (tbname) from stb0")
...@@ -79,7 +79,52 @@ class TDTestCase: ...@@ -79,7 +79,52 @@ class TDTestCase:
tdSql.checkData(0, 0, 200) tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200000) tdSql.checkData(0, 0, 200000)
# insert-interface: sml
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-allDataType-sml.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 20)
# tdSql.query("select last(ts) from db.stb00_0")
# tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 1000)
# tdSql.query("select last(ts) from db.stb01_0")
# tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 4000)
# # insert-interface: sml-json
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-json-alltype.json -y " % binPath)
# tdSql.execute("use db")
# tdSql.query("show stables")
# for i in range(13):
# for j in range(13):
# if tdSql.queryResult[i][0] == 'stb%d'%j:
# # print(i,"stb%d"%j)
# tdSql.checkData(i, 4, j+1)
# insert-interface: sml-telnet
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sml-telnet-alltype.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("show stables")
for i in range(13):
for j in range(13):
if tdSql.queryResult[i][0] == 'stb%d'%j:
# print(i,"stb%d"%j)
tdSql.checkData(i, 4, j+1)
for i in range(13):
tdSql.query("select count(*) from stb%d"%i)
tdSql.checkData(0, 0, (i+1)*10)
# insert-interface: sml-telnet
assert os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-sml-timestamp.json -y " % binPath) !=0
# taosdemo command line # taosdemo command line
os.system("%staosBenchmark -t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y " % binPath) os.system("%staosBenchmark -t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y " % binPath)
tdSql.execute("use test") tdSql.execute("use test")
......
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import sys
import os
from util.log import *
from util.cases import *
from util.sql import *
from util.dnodes import *
class TDTestCase:
def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
def getBuildPath(self):
selfPath = os.path.dirname(os.path.realpath(__file__))
global cfgPath
if ("community" in selfPath):
projPath = selfPath[:selfPath.find("community")]
cfgPath = projPath + "/community/sim/dnode1/cfg"
else:
projPath = selfPath[:selfPath.find("tests")]
cfgPath = projPath + "/sim/dnode1/cfg"
for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root)-len("/build/bin")]
break
return buildPath
# def checkGerData():
def run(self):
buildPath = self.getBuildPath()
print("%s" % cfgPath )
if (buildPath == ""):
tdLog.exit("taosd not found!")
else:
tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/"
tdLog.info("create super table")
# create super table
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("describe meters;")
tdSql.checkRows(13)
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
tdLog.info("create general table -N ")
tdSql.execute("drop database db1;")
# create general table -N
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -N " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("describe `test.0`;")
tdSql.checkRows(11)
tdSql.error("select count(*) from meters")
tdSql.error("select count(tbname) from meters")
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
tdLog.info("use diffrent interface stmt")
tdSql.execute("drop database db1;")
# use diffrent interface-stmt
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,BINARY\(4000\) -w 40 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
# tdLog.info("use diffrent interface rest")
# tdSql.execute("drop database db1;")
# # use diffrent interface -rest
# os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4097 \
# -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I rest " % (binPath,cfgPath))
# tdSql.execute("use db1")
# tdSql.query("select count(*) from meters")
# tdSql.checkData(0, 0, 1000)
# tdSql.query("select count(tbname) from meters")
# tdSql.checkData(0, 0, 10)
# tdSql.query("select count(*) from `test.0`")
# tdSql.checkData(0, 0, 100)
tdLog.info("use diffrent interface sml")
tdSql.execute("drop database db1;")
# use diffrent interface-sml
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 1024 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I sml " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdLog.info("all data type")
tdSql.execute("drop database db1;")
# all data type
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 \
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
tdLog.info("all data type and interlace rows")
tdSql.execute("drop database db1;")
# all data type
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db3 -a 1 -l 10\
-b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY\(15\),NCHAR\(15\) -w 4096\
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -B 1000 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath))
tdSql.execute("use db3")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
tdLog.info("all data type and too much para")
tdLog.info("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test.taosdemo -u root -c %s -h \
localhost -P 6030 -d db1 -a 1 -l 100 -b float,int,NCHAR\(15\) -w 4096 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath,cfgPath))
tdSql.execute("drop database db3;")
# repeate parameters
os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(15\) -w 4096 \
-T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test.taosdemo -u root -c %s -h \
localhost -P 6030 -d db1 -a 1 -l 100 -b float,int,NCHAR\(15\) -w 4096 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. " % (binPath,cfgPath,cfgPath))
tdSql.execute("use db1")
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(tbname) from meters")
tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from `test.0`")
tdSql.checkData(0, 0, 100)
# tdLog.info("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \
# -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I stmt" % (binPath,cfgPath))
# # taosdemo error-exceeds max length
# assert os.system("%staosBenchmark -u root -c %s -h localhost -P 6030 -d db1 -a 1 -l 10 -b float,int,NCHAR\(4096\) \
# -w 40 -T 8 -i 10 -S 1000 -r 1000000 -t 10 -n 100 -M -x -y -O 10 -R 100 -E -m test. -I taosc" % (binPath,cfgPath)) != 0
testcaseFilename = os.path.split(__file__)[-1]
os.system("rm -rf ./insert_res*.txt*")
os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename )
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
...@@ -68,21 +68,21 @@ class TDTestCase: ...@@ -68,21 +68,21 @@ class TDTestCase:
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 2000) tdSql.checkData(0, 0, 2000)
# restful connector insert data # # restful connector insert data
os.system("%staosBenchmark -f tools/taosdemoAllTest/insertRestful.json -y " % binPath) # os.system("%staosBenchmark -f tools/taosdemoAllTest/insertRestful.json -y " % binPath)
tdSql.execute("use db") # tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0") # tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 10) # tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1") # tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 10) # tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from stb00_0") # tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 10) # tdSql.checkData(0, 0, 10)
tdSql.query("select count(*) from stb0") # tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100) # tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb01_1") # tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 20) # tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb1") # tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200) # tdSql.checkData(0, 0, 200)
# default values json files # default values json files
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
...@@ -103,30 +103,30 @@ class TDTestCase: ...@@ -103,30 +103,30 @@ class TDTestCase:
tdSql.query("select count (tbname) from stb1") tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 20) tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb00_0") tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 10000) tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100000) tdSql.checkData(0, 0, 1000)
tdSql.query("select count(*) from stb01_0") tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 20000) tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 400000) tdSql.checkData(0, 0, 4000)
# insert: using parament "insert_interval to controls spped of insert. # insert: using parament "insert_interval to controls spped of insert.
# but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。
os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-interval-speed.json -y" % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-interval-speed.json -y" % binPath)
tdSql.execute("use db") tdSql.execute("use db")
tdSql.query("show stables") tdSql.query("show stables")
tdSql.checkData(0, 4, 100) tdSql.checkData(0, 4, 10)
tdSql.query("select count(*) from stb00_0") tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 20000) tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 2000000) tdSql.checkData(0, 0, 2000)
tdSql.query("show stables") tdSql.query("show stables")
tdSql.checkData(1, 4, 100) tdSql.checkData(1, 4, 20)
tdSql.query("select count(*) from stb01_0") tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 20000) tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 2000000) tdSql.checkData(0, 0, 4000)
# spend 2min30s for 3 testcases. # spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test # insert: drop and child_table_exists combination test
...@@ -218,6 +218,10 @@ class TDTestCase: ...@@ -218,6 +218,10 @@ class TDTestCase:
tdSql.query("select count(*) from db.stb3") tdSql.query("select count(*) from db.stb3")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar49151-error.json -y " % binPath)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y " % binPath)
tdSql.error("select count(*) from db.stb0") tdSql.error("select count(*) from db.stb0")
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
...@@ -353,6 +357,15 @@ class TDTestCase: ...@@ -353,6 +357,15 @@ class TDTestCase:
tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes tdSql.query('show tables like \'YYY%\'') #child_table_exists = yes, auto_create_table varies = yes
tdSql.checkRows(20) tdSql.checkRows(20)
# insert: test chinese encoding
os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-chinese.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 10)
tdSql.query("select count (*) from stb0")
tdSql.checkData(0, 0, 1500)
# rm useless files # rm useless files
os.system("rm -rf ./insert*_res.txt*") os.system("rm -rf ./insert*_res.txt*")
......
...@@ -56,12 +56,8 @@ class TDTestCase: ...@@ -56,12 +56,8 @@ class TDTestCase:
tdSql.checkData(0, 0, 10) tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1") tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 20) tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 1000) tdSql.checkData(0, 0, 1000)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 4000) tdSql.checkData(0, 0, 4000)
...@@ -73,31 +69,27 @@ class TDTestCase: ...@@ -73,31 +69,27 @@ class TDTestCase:
tdSql.checkData(0, 0, 10) tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1") tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 15) tdSql.checkData(0, 0, 15)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 150)
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 1500) tdSql.checkData(0, 0, 1500)
tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 3000) tdSql.checkData(0, 0, 3000)
# insert: using parament "insert_interval to controls spped of insert. # # insert: using parament "insert_interval to controls spped of insert.
# but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 # # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath) # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath)
tdSql.execute("use db") # tdSql.execute("use db")
tdSql.query("select tbname from stb0") # tdSql.query("select tbname from db.stb0")
tdSql.checkRows(100 ) # tdSql.checkRows(100 )
tdSql.query("select count(*) from stb00_0") # # tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 20) # # tdSql.checkData(0, 0, 20)
tdSql.query("select count(*) from stb0") # tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 2000) # tdSql.checkData(0, 0, 2000)
tdSql.query("show stables") # tdSql.query("show stables")
tdSql.checkData(1, 4, 20) # tdSql.checkData(1, 4, 20)
tdSql.query("select count(*) from stb01_0") # # tdSql.query("select count(*) from stb01_0")
tdSql.checkData(0, 0, 35) # # tdSql.checkData(0, 0, 35)
tdSql.query("select count(*) from stb1") # tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 700) # tdSql.checkData(0, 0, 700)
# spend 2min30s for 3 testcases. # spend 2min30s for 3 testcases.
# insert: drop and child_table_exists combination test # insert: drop and child_table_exists combination test
...@@ -142,10 +134,10 @@ class TDTestCase: ...@@ -142,10 +134,10 @@ class TDTestCase:
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath) # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath)
# tdSql.query("select count(*) from db.stb0") # tdSql.query("select count(*) from db.stb0")
# tdSql.checkData(0, 0, 10000) # tdSql.checkData(0, 0, 10000)
tdSql.execute("drop database if exists db") # tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath) # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath)
tdSql.query("select count(*) from db.stb0") # tdSql.query("select count(*) from db.stb0")
tdSql.checkRows(0) # tdSql.checkRows(0)
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath)
tdSql.execute("use db") tdSql.execute("use db")
...@@ -160,11 +152,13 @@ class TDTestCase: ...@@ -160,11 +152,13 @@ class TDTestCase:
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.query("select count(*) from db.stb1") tdSql.query("select count(*) from db.stb1")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.query("select count(*) from db.stb3") tdSql.query("select count(*) from db.stb3")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-error-sml.json -y " % binPath)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y " % binPath)
tdSql.error("select count(*) from db.stb0") tdSql.error("select count(*) from db.stb0")
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
...@@ -177,14 +171,17 @@ class TDTestCase: ...@@ -177,14 +171,17 @@ class TDTestCase:
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y " % binPath)
tdSql.error("use db") tdSql.error("use db")
tdSql.execute("drop database if exists blf") tdSql.execute("drop database if exists blf")
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y " % binPath)
tdSql.execute("use blf") # child table name is invalid reading,so
tdSql.query("select ts from blf.p_0_topics_7 limit 262800,1") # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y " % binPath)
tdSql.checkData(0, 0, "2020-03-31 12:00:00.000") # tdSql.execute("use blf")
tdSql.query("select first(ts) from blf.p_0_topics_2") # tdSql.query("select ts from blf.p_0_topics_7 limit 262800,1")
tdSql.checkData(0, 0, "2019-10-01 00:00:00") # tdSql.checkData(0, 0, "2020-03-31 12:00:00.000")
tdSql.query("select last(ts) from blf.p_0_topics_6 ") # tdSql.query("select first(ts) from blf.p_0_topics_2")
tdSql.checkData(0, 0, "2020-09-29 23:59:00") # tdSql.checkData(0, 0, "2019-10-01 00:00:00")
# tdSql.query("select last(ts) from blf.p_0_topics_6 ")
# tdSql.checkData(0, 0, "2020-09-29 23:59:00")
# it will be commented in ci because it spend too much time to insert data, but when you can excute it when you want to test this case. # it will be commented in ci because it spend too much time to insert data, but when you can excute it when you want to test this case.
# os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath) # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath)
# tdSql.execute("use db") # tdSql.execute("use db")
...@@ -200,6 +197,7 @@ class TDTestCase: ...@@ -200,6 +197,7 @@ class TDTestCase:
# tdSql.checkData(0, 0, 5000000) # tdSql.checkData(0, 0, 5000000)
# insert: timestamp and step # insert: timestamp and step
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-timestep-sml.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-timestep-sml.json -y " % binPath)
tdSql.execute("use db") tdSql.execute("use db")
...@@ -207,12 +205,12 @@ class TDTestCase: ...@@ -207,12 +205,12 @@ class TDTestCase:
tdSql.checkData(0, 0, 10) tdSql.checkData(0, 0, 10)
tdSql.query("select count (tbname) from stb1") tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 20) tdSql.checkData(0, 0, 20)
tdSql.query("select last(ts) from db.stb00_0") # tdSql.query("select last(ts) from db.stb00_0")
tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000") # tdSql.checkData(0, 0, "2020-10-01 00:00:00.019000")
tdSql.query("select count(*) from stb0") tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 200) tdSql.checkData(0, 0, 200)
tdSql.query("select last(ts) from db.stb01_0") # tdSql.query("select last(ts) from db.stb01_0")
tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000") # tdSql.checkData(0, 0, "2020-11-01 00:00:00.190000")
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 400) tdSql.checkData(0, 0, 400)
...@@ -228,17 +226,17 @@ class TDTestCase: ...@@ -228,17 +226,17 @@ class TDTestCase:
tdSql.query("select count(*) from stb1") tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 10) tdSql.checkData(0, 0, 10)
# insert: sample json # insert: doesn‘t currently supported sample json
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sample-sml.json -y " % binPath) assert os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sample-sml.json -y " % binPath) != 0
tdSql.execute("use dbtest123") # tdSql.execute("use dbtest123")
tdSql.query("select c2 from stb0") # tdSql.query("select c2 from stb0")
tdSql.checkData(0, 0, 2147483647) # tdSql.checkData(0, 0, 2147483647)
tdSql.query("select * from stb1 where t1=-127") # tdSql.query("select * from stb1 where t1=-127")
tdSql.checkRows(20) # tdSql.checkRows(20)
tdSql.query("select * from stb1 where t2=127") # tdSql.query("select * from stb1 where t2=127")
tdSql.checkRows(10) # tdSql.checkRows(10)
tdSql.query("select * from stb1 where t2=126") # tdSql.query("select * from stb1 where t2=126")
tdSql.checkRows(10) # tdSql.checkRows(10)
# insert: test interlace parament # insert: test interlace parament
os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interlace-row-sml.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interlace-row-sml.json -y " % binPath)
......
...@@ -187,6 +187,10 @@ class TDTestCase: ...@@ -187,6 +187,10 @@ class TDTestCase:
tdSql.query("select count(*) from db.stb3") tdSql.query("select count(*) from db.stb3")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-error-stmt.json -y " % binPath)
tdSql.error("select * from db.stb4")
tdSql.error("select * from db.stb2")
tdSql.execute("drop database if exists db")
os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y " % binPath) os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y " % binPath)
tdSql.error("select count(*) from db.stb0") tdSql.error("select count(*) from db.stb0")
tdSql.execute("drop database if exists db") tdSql.execute("drop database if exists db")
......
...@@ -174,15 +174,15 @@ class TDTestCase: ...@@ -174,15 +174,15 @@ class TDTestCase:
"2020-11-01 00:00:00.004") "2020-11-01 00:00:00.004")
# query times less than or equal to 100 # query times less than or equal to 100
os.system( assert os.system(
"%staosBenchmark -f tools/taosdemoAllTest/queryInsertdata.json" % "%staosBenchmark -f tools/taosdemoAllTest/queryInsertdata.json" %
binPath) binPath) == 0
os.system( assert os.system(
"%staosBenchmark -f tools/taosdemoAllTest/querySpeciMutisql100.json" % "%staosBenchmark -f tools/taosdemoAllTest/querySpeciMutisql100.json" %
binPath) binPath) != 0
os.system( assert os.system(
"%staosBenchmark -f tools/taosdemoAllTest/querySuperMutisql100.json" % "%staosBenchmark -f tools/taosdemoAllTest/querySuperMutisql100.json" %
binPath) binPath) == 0
# query result print QPS # query result print QPS
os.system( os.system(
......
...@@ -951,4 +951,209 @@ sql insert into sub2 using st tags(2) values(now ,3); ...@@ -951,4 +951,209 @@ sql insert into sub2 using st tags(2) values(now ,3);
sql insert into sub2 using st tags(2) values(now ,4); sql insert into sub2 using st tags(2) values(now ,4);
sql_error select max(ts_inter) ,tbname from (select elapsed(ts) ts_inter ,tbname from st interval (1s) group by tbname) order by ts sql_error select max(ts_inter) ,tbname from (select elapsed(ts) ts_inter ,tbname from st interval (1s) group by tbname) order by ts
sql drop database test11969 sql drop database test11969
print ==========================================> TD-11097
sql create database td11097
sql use td11097
sql create table meters2 (ts timestamp, voltage bigint,num int) tags (location binary(30), groupid int);
sql create table D001 using meters2 tags ("Beijing.Chaoyang", 1);
sql create table D002 using meters2 tags ("Beijing.haidian", 2);
sql create table D003 using meters2 tags ('"Beijing.Tongzhou"', 3);
$ts = 1639556426000
sql insert into d001 values ( $ts ,1,2);
sql insert into d001 values ( $ts +1m,2,3);
sql insert into d001 values ( $ts +2m,4,3);
sql insert into d001 values ( $ts +4m,8,3);
sql insert into d002 values ( $ts ,4,3);
sql insert into d002 values ( $ts +3m,40,3);
sql insert into d002 values ( $ts +1m,46,3);
sql insert into d001 values ( $ts +20m,1,2);
sql insert into d002 values ( $ts +21m,4,3);
sql select diff(voltage) value from meters2 group by tbname;
sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) ;
sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) order by ts;
sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) order by ts desc;
$emptyString = @@
print execute sql select diff(voltage) value from meters2 group by tbname;
sql select diff(voltage) value from meters2 group by tbname;
if $data00 != @21-12-15 16:21:26.000@ then
return -1
endi
if $data01 != @1@ then
return -1
endi
if $data02 != @d001@ then
return -1
endi
if $data10 != @21-12-15 16:22:26.000@ then
return -1
endi
if $data11 != @2@ then
return -1
endi
if $data12 != @d001@ then
return -1
endi
if $data20 != @21-12-15 16:24:26.000@ then
return -1
endi
if $data21 != @4@ then
return -1
endi
if $data22 != @d001@ then
return -1
endi
if $data30 != @21-12-15 16:40:26.000@ then
return -1
endi
if $data31 != @-7@ then
return -1
endi
if $data32 != @d001@ then
return -1
endi
if $data40 != @21-12-15 16:21:26.000@ then
return -1
endi
if $data41 != @42@ then
return -1
endi
if $data42 != @d002@ then
return -1
endi
if $data50 != @21-12-15 16:23:26.000@ then
return -1
endi
if $data51 != @-6@ then
return -1
endi
if $data52 != @d002@ then
return -1
endi
if $data60 != @21-12-15 16:41:26.000@ then
return -1
endi
if $data61 != @-36@ then
return -1
endi
if $data62 != @d002@ then
return -1
endi
print execute sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) ;
sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) ;
if $data00 != @21-12-15 16:21:00.000@ then
return -1
endi
if $data01 != @43@ then
return -1
endi
if $data10 != @21-12-15 16:22:00.000@ then
return -1
endi
if $data11 != @2@ then
return -1
endi
if $data20 != @21-12-15 16:23:00.000@ then
return -1
endi
if $data21 != @-6@ then
return -1
endi
if $data30 != @21-12-15 16:24:00.000@ then
return -1
endi
if $data31 != @4@ then
return -1
endi
if $data40 != @21-12-15 16:40:00.000@ then
return -1
endi
if $data41 != @-7@ then
return -1
endi
if $data50 != @21-12-15 16:41:00.000@ then
return -1
endi
if $data51 != @-36@ then
return -1
endi
print execute sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) order by ts;
sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) order by ts;
if $data00 != @21-12-15 16:21:00.000@ then
return -1
endi
if $data01 != @43@ then
return -1
endi
if $data10 != @21-12-15 16:22:00.000@ then
return -1
endi
if $data11 != @2@ then
return -1
endi
if $data20 != @21-12-15 16:23:00.000@ then
return -1
endi
if $data21 != @-6@ then
return -1
endi
if $data30 != @21-12-15 16:24:00.000@ then
return -1
endi
if $data31 != @4@ then
return -1
endi
if $data40 != @21-12-15 16:40:00.000@ then
return -1
endi
if $data41 != @-7@ then
return -1
endi
if $data50 != @21-12-15 16:41:00.000@ then
return -1
endi
if $data51 != @-36@ then
return -1
endi
print execute sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) order by ts desc;
sql select sum(value) from (select diff(voltage) value from meters2 group by tbname) interval(1m) order by ts desc;
if $data00 != @21-12-15 16:41:00.000@ then
return -1
endi
if $data01 != @-36@ then
return -1
endi
if $data10 != @21-12-15 16:40:00.000@ then
return -1
endi
if $data11 != @-7@ then
return -1
endi
if $data20 != @21-12-15 16:24:00.000@ then
return -1
endi
if $data21 != @4@ then
return -1
endi
if $data30 != @21-12-15 16:23:00.000@ then
return -1
endi
if $data31 != @-6@ then
return -1
endi
if $data40 != @21-12-15 16:22:00.000@ then
return -1
endi
if $data41 != @2@ then
return -1
endi
if $data50 != @21-12-15 16:21:00.000@ then
return -1
endi
if $data51 != @43@ then
return -1
endi
sql drop database td11097
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
...@@ -956,4 +956,39 @@ sql_error select first(c1), count(*), t2, t1, tbname from select_tags_mt0 group ...@@ -956,4 +956,39 @@ sql_error select first(c1), count(*), t2, t1, tbname from select_tags_mt0 group
#sql select count(c1) from select_tags_mt0 where c1=99 group by tbname; #sql select count(c1) from select_tags_mt0 where c1=99 group by tbname;
#sql select count(*),tbname from select_tags_mt0 group by tbname #sql select count(*),tbname from select_tags_mt0 group by tbname
print ==================================> TD-11943
sql create database test11943;
sql use test11943;
sql create stable st (ts timestamp , id int ) tags (ind int );
sql insert into sub1 using st tags(1) values(now ,1);
sql insert into sub1 using st tags(1) values(now ,2);
sql insert into sub2 using st tags(2) values(now ,3);
sql insert into sub2 using st tags(2) values(now ,4);
sql select tbname ,max(id)+5 from sub1;
if $data00 != @sub1@ then
return -1
endi
if $data01 != @7.000000000@ then
return -1
endi
sql select ind, max(id)+5 from st group by tbname
if $data00 != @1@ then
return -1
endi
if $data01 != @7.000000000@ then
return -1
endi
if $data02 != @sub1@ then
return -1
endi
if $data10 != @2@ then
return -1
endi
if $data11 != @9.000000000@ then
return -1
endi
if $data12 != @sub2@ then
return -1
endi
sql drop database test11943
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册