diff --git a/docs/en/01-index.md b/docs/en/01-index.md
index 54271659ec..b5b01745da 100644
--- a/docs/en/01-index.md
+++ b/docs/en/01-index.md
@@ -13,7 +13,7 @@ TDengine greatly improves the efficiency of data ingestion, querying, and storag
If you are a developer, please read the [Developer Guide](./develop) carefully. This section introduces the database connection, data modeling, data ingestion, query, continuous query, cache, data subscription, user-defined functions, and other functionality in detail. Sample code is provided for a variety of programming languages. In most cases, you can just copy and paste the sample code, and make a few changes to accommodate your application, and it will work.
-We live in the era of big data, and scale-up is unable to meet the growing needs of the business. Any modern data system must have the ability to scale out, and clustering has become an indispensable feature of big data systems. Not only did the TDengine team develop the cluster feature, but also decided to open source this important feature. To learn how to deploy, manage and maintain a TDengine cluster please refer to [Cluster Deployment](../deployment).
+We live in the era of big data, and scale-up is unable to meet the growing needs of the business. Any modern data system must have the ability to scale out, and clustering has become an indispensable feature of big data systems. Not only did the TDengine team develop the cluster feature, but also decided to open source this important feature. To learn how to deploy, manage and maintain a TDengine cluster please refer to [Cluster Deployment](./deployment).
TDengine uses ubiquitous SQL as its query language, which greatly reduces learning costs and migration costs. In addition to the standard SQL, TDengine has extensions to better support time series data analysis. These extensions include functions such as roll-up, interpolation, and time-weighted average, among many others. The [SQL Reference](./taos-sql) chapter describes the SQL syntax in detail and lists the various supported commands and functions.
diff --git a/docs/en/07-develop/01-connect/index.md b/docs/en/07-develop/01-connect/index.md
index 2f826920ad..f84a65d326 100644
--- a/docs/en/07-develop/01-connect/index.md
+++ b/docs/en/07-develop/01-connect/index.md
@@ -36,7 +36,7 @@ For REST and native connections, client libraries provide similar APIs for perfo
Key differences:
3. The REST connection is more accessible with cross-platform support, however it results in a 30% performance downgrade.
-1. The TDengine client driver (taosc) has the highest performance with all the features of TDengine like [Parameter Binding](../../client-libraries/cpp#parameter-binding-api), [Subscription](../../client-libraries/cpp#subscription-and-consumption-api), etc.
+1. The TDengine client driver (taosc) has the highest performance with all the features of TDengine like [Parameter Binding](../../client-libraries/cpp#parameter-binding-api), [Subscription](../../client-libraries/cpp#subscription-api), etc.
## Install Client Driver taosc
diff --git a/docs/en/07-develop/02-model/index.mdx b/docs/en/07-develop/02-model/index.mdx
index a18e1932ab..6df4d6a0e7 100644
--- a/docs/en/07-develop/02-model/index.mdx
+++ b/docs/en/07-develop/02-model/index.mdx
@@ -41,7 +41,7 @@ Without the current database specified, table name must be preceded with the cor
## Create STable
-In a time-series application, there may be multiple kinds of data collection points. For example, in the electrical power system there are meters, transformers, bus bars, switches, etc. For easy and efficient aggregation of multiple tables, one STable needs to be created for each kind of data collection point. For example, for the meters in [table 1](../../concept/#model_table1), the SQL statement below can be used to create the super table.
+In a time-series application, there may be multiple kinds of data collection points. For example, in the electrical power system there are meters, transformers, bus bars, switches, etc. For easy and efficient aggregation of multiple tables, one STable needs to be created for each kind of data collection point. For example, for the meters in [table 1](../../concept/), the SQL statement below can be used to create the super table.
```sql
CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int);
diff --git a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx
index b90b92510a..ddcaad8914 100644
--- a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx
+++ b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx
@@ -46,7 +46,7 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0
:::
-For more details please refer to [InfluxDB Line Protocol](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/) and [TDengine Schemaless](../../../reference/schemaless/#Schemaless-Line-Protocol)
+For more details please refer to [InfluxDB Line Protocol](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/) and [TDengine Schemaless](../../../reference/schemaless/)
## Examples
diff --git a/docs/en/08-client-libraries/03-cpp.mdx b/docs/en/08-client-libraries/03-cpp.mdx
index 59c5af9c03..dda436f553 100644
--- a/docs/en/08-client-libraries/03-cpp.mdx
+++ b/docs/en/08-client-libraries/03-cpp.mdx
@@ -32,7 +32,7 @@ The version number of the TDengine client driver and the version number of the T
## Installation Steps
-Please refer to the [Installation Steps](../#installation-steps) for TDengine client driver installation
+Please refer to [Install Client Driver](../#install-client-driver) for TDengine client driver installation
## Establishing a connection
@@ -372,7 +372,7 @@ The specific functions related to the interface are as follows (see also the [pr
Execute the prepared statement. Currently, a statement can only be executed once.
- `int taos_stmt_affected_rows(TAOS_STMT *stmt)`
-
+
Gets the number of rows affected by executing bind statements multiple times.
- `int taos_stmt_affected_rows_once(TAOS_STMT *stmt)`
diff --git a/docs/en/08-client-libraries/04-java.mdx b/docs/en/08-client-libraries/04-java.mdx
index 9feab378e0..8af4e86899 100644
--- a/docs/en/08-client-libraries/04-java.mdx
+++ b/docs/en/08-client-libraries/04-java.mdx
@@ -160,7 +160,7 @@ For Java connector, the jts library can be used to easily create GEOMETRY type o
Before using Java client library to connect to the database, the following conditions are required.
- Java 1.8 or above runtime environment and Maven 3.6 or above installed
-- TDengine client driver installed (required for native connections, not required for REST connections), please refer to [Installing Client Driver](../#Install-Client-Driver)
+- TDengine client driver installed (required for native connections, not required for REST connections), please refer to [Install Client Driver](../#install-client-driver)
### Install the client library
@@ -368,7 +368,7 @@ The configuration parameters in properties are as follows.
- TSDBDriver.PROPERTY_KEY_MESSAGE_WAIT_TIMEOUT: message transmission timeout in milliseconds, the default value is 60000 ms. It only takes effect when using JDBC REST connection and batchfetch is true.
- TSDBDriver.PROPERTY_KEY_USE_SSL: connecting Securely Using SSL. true: using SSL connection, false: not using SSL connection. It only takes effect when using JDBC REST connection.
- TSDBDriver.HTTP_POOL_SIZE: size of REST concurrent requests. The default value is 20.
- For JDBC native connections, you can specify other parameters, such as log level, SQL length, etc., by specifying URL and Properties. For more detailed configuration, please refer to [Client Configuration](../../reference/config/#Client-Only).
+ For JDBC native connections, you can specify other parameters, such as log level, SQL length, etc., by specifying URL and Properties. For more detailed configuration, please refer to [Client Configuration](../../reference/config/#configuration-file-on-client-side).
### Priority of configuration parameters
diff --git a/docs/en/08-client-libraries/05-go.mdx b/docs/en/08-client-libraries/05-go.mdx
index 11930e2429..528a21707e 100644
--- a/docs/en/08-client-libraries/05-go.mdx
+++ b/docs/en/08-client-libraries/05-go.mdx
@@ -129,7 +129,7 @@ username:password@protocol(address)/dbname?param=value
_taosSql_ implements Go's `database/sql/driver` interface via cgo. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver.
-Use `taosSql` as `driverName` and use a correct [DSN](#DSN) as `dataSourceName`, DSN supports the following parameters.
+Use `taosSql` as `driverName` and use a correct DSN as `dataSourceName`, DSN supports the following parameters.
* cfg specifies the `taos.cfg` directory
@@ -160,7 +160,7 @@ func main() {
_taosRestful_ implements Go's `database/sql/driver` interface via `http client`. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver.
-Use `taosRestful` as `driverName` and use a correct [DSN](#DSN) as `dataSourceName` with the following parameters supported by the DSN.
+Use `taosRestful` as `driverName` and use a correct DSN as `dataSourceName` with the following parameters supported by the DSN.
* `disableCompression` whether to accept compressed data, default is true do not accept compressed data, set to false if transferring data using gzip compression.
* `readBufferSize` The default size of the buffer for reading data is 4K (4096), which can be adjusted upwards when the query result has a lot of data.
@@ -191,7 +191,7 @@ func main() {
_taosRestful_ implements Go's `database/sql/driver` interface via `http client`. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver (driver-go minimum version 3.0.2).
-Use `taosWS` as `driverName` and use a correct [DSN](#DSN) as `dataSourceName` with the following parameters supported by the DSN.
+Use `taosWS` as `driverName` and use a correct DSN as `dataSourceName` with the following parameters supported by the DSN.
* `writeTimeout` The timeout to send data via WebSocket.
* `readTimeout` The timeout to receive response data via WebSocket.
diff --git a/docs/en/08-client-libraries/06-rust.mdx b/docs/en/08-client-libraries/06-rust.mdx
index ff4c1bf92b..cb27a2529d 100644
--- a/docs/en/08-client-libraries/06-rust.mdx
+++ b/docs/en/08-client-libraries/06-rust.mdx
@@ -321,7 +321,7 @@ let rs = taos.query_with_req_id("select * from stable where tag1 is null", 1)?;
TDengine has significantly improved the bind APIs to support data writing (INSERT) scenarios. Writing data in this way avoids the resource consumption of SQL syntax parsing, resulting in significant write performance improvements in many cases.
-Parameter binding details see [API Reference](#stmt-api)
+Parameter binding details see [API Reference](#bind-interface)
@@ -447,7 +447,7 @@ The following parameters can be configured for the TMQ DSN. Only `group.id` is m
- `auto.commit.interval.ms`: Interval for automatic commits.
#### Full Sample Code
-
+
For more information, see [GitHub sample file](https://github.com/taosdata/TDengine/blob/3.0/docs/examples/rust/nativeexample/examples/subscribe_demo.rs).
### Use with connection pool
@@ -559,7 +559,7 @@ The [Taos][struct.Taos] object provides an API to perform operations on multiple
// binary/varchar to String
location: String,
}
-
+
let records: Vec = taos
.query("select * from `meters`")
.await?
@@ -578,11 +578,7 @@ Note that Rust asynchronous functions and an asynchronous runtime are required.
In addition, this structure is also the entry point for Parameter Binding and Line Protocol Interface. Please refer to the specific API descriptions for usage.
-
-
-Bind Interface
-
-
+### Bind Interface
Similar to the C interface, Rust provides the bind interface's wrapping. First, the [Taos][struct.taos] object creates a parameter binding object [Stmt] for an SQL statement.
diff --git a/docs/en/08-client-libraries/07-python.mdx b/docs/en/08-client-libraries/07-python.mdx
index 3110afcf10..220d676c2b 100644
--- a/docs/en/08-client-libraries/07-python.mdx
+++ b/docs/en/08-client-libraries/07-python.mdx
@@ -95,7 +95,7 @@ TDengine currently supports timestamp, number, character, Boolean type, and the
1. Install Python. The recent taospy package requires Python 3.6.2+. The earlier versions of taospy require Python 3.7+. The taos-ws-py package requires Python 3.7+. If Python is not available on your system, refer to the [Python BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide/Download) to install it.
2. Install [pip](https://pypi.org/project/pip/). In most cases, the Python installer comes with the pip utility. If not, please refer to [pip documentation](https://pip.pypa.io/en/stable/installation/) to install it.
-If you use a native connection, you will also need to [Install Client Driver](../#Install-Client-Driver). The client install package includes the TDengine client dynamic link library (`libtaos.so` or `taos.dll`) and the TDengine CLI.
+If you use a native connection, you will also need to [Install Client Driver](../#install-client-driver). The client install package includes the TDengine client dynamic link library (`libtaos.so` or `taos.dll`) and the TDengine CLI.
### Install via pip
diff --git a/docs/en/08-client-libraries/08-node.mdx b/docs/en/08-client-libraries/08-node.mdx
index 71f360c6d1..5c8e9d87af 100644
--- a/docs/en/08-client-libraries/08-node.mdx
+++ b/docs/en/08-client-libraries/08-node.mdx
@@ -58,7 +58,7 @@ Please refer to [version support list](../#version-support)
### Pre-installation preparation
- Install the Node.js development environment
-- If you are using the REST client library, skip this step. However, if you use the native client library, please install the TDengine client driver. Please refer to [Install Client Driver](../#Install-Client-Driver) for more details. We use [node-gyp](https://github.com/nodejs/node-gyp) to interact with TDengine instances and also need to install some dependencies mentioned below depending on the specific OS.
+- If you are using the REST client library, skip this step. However, if you use the native client library, please install the TDengine client driver. Please refer to [Install Client Driver](../#install-client-driver) for more details. We use [node-gyp](https://github.com/nodejs/node-gyp) to interact with TDengine instances and also need to install some dependencies mentioned below depending on the specific OS.
diff --git a/docs/en/08-client-libraries/80-php.mdx b/docs/en/08-client-libraries/80-php.mdx
index a83391c19c..b31a1d256e 100644
--- a/docs/en/08-client-libraries/80-php.mdx
+++ b/docs/en/08-client-libraries/80-php.mdx
@@ -40,7 +40,7 @@ Because the version of TDengine client driver is tightly associated with that of
### Install TDengine Client Driver
-Regarding how to install TDengine client driver please refer to [Install Client Driver](../#installation-steps)
+Regarding how to install TDengine client driver please refer to [Install Client Driver](../#install-client-driver)
### Install php-tdengine
diff --git a/docs/en/14-reference/05-taosbenchmark.md b/docs/en/14-reference/05-taosbenchmark.md
index 2f953b1f8c..e4884b889c 100644
--- a/docs/en/14-reference/05-taosbenchmark.md
+++ b/docs/en/14-reference/05-taosbenchmark.md
@@ -92,7 +92,7 @@ taosBenchmark -f
-## Command-line argument in detail
+## Command-line arguments in detail
- **-f/--file <json file>** :
specify the configuration file to use. This file includes All parameters. Users should not use this parameter with other parameters on the command-line. There is no default value.
diff --git a/docs/en/14-reference/14-taosKeeper.md b/docs/en/14-reference/14-taosKeeper.md
index a289ecf35f..f8148af869 100644
--- a/docs/en/14-reference/14-taosKeeper.md
+++ b/docs/en/14-reference/14-taosKeeper.md
@@ -23,7 +23,7 @@ Methods of installing taosKeeper:
### Configuration
-taosKeeper needs to be executed on the terminal of the operating system, it supports three configuration methods: [Command-line arguments](#command-line-arguments-in-detail), [environment variable](#environment-variable-in-detail) and [configuration file](#configuration-file-parameters-in-detail). The precedence of those is Command-line, environment variable and configuration file.
+taosKeeper needs to be executed on the terminal of the operating system, it supports three configuration methods: Command-line arguments, environment variable and configuration file. The precedence of those is Command-line, environment variable and configuration file.
**Make sure that the TDengine cluster is running correctly before running taosKeeper.** Ensure that the monitoring service in TDengine has been started. At least the values of `monitor` and `monitorFqdn` need to be set in `taos.cfg`.
@@ -32,7 +32,7 @@ monitor 1
monitorFqdn localhost # taoskeeper's FQDN
```
-For more information, see [TDengine Monitoring Configuration](../config/#monitoring).
+For more information, see [TDengine Monitoring Configuration](../config/#monitoring-parameters).
### Quick Launch
diff --git a/docs/en/20-third-party/03-telegraf.md b/docs/en/20-third-party/03-telegraf.md
index 900262f51f..93586c701c 100644
--- a/docs/en/20-third-party/03-telegraf.md
+++ b/docs/en/20-third-party/03-telegraf.md
@@ -73,6 +73,6 @@ Query OK, 3 row(s) in set (0.013269s)
- TDengine take influxdb format data and create unique ID for table names by the rule.
The user can configure `smlChildTableName` parameter to generate specified table names if he/she needs. And he/she also need to insert data with specified data format.
-For example, Add `smlChildTableName=tname` in the taos.cfg file. Insert data `st,tname=cpu1,t1=4 c1=3 1626006833639000000` then the table name will be cpu1. If there are multiple lines has same tname but different tag_set, the first line's tag_set will be used to automatically creating table and ignore other lines. Please refer to [TDengine Schemaless](../../reference/schemaless/#Schemaless-Line-Protocol)
+For example, Add `smlChildTableName=tname` in the taos.cfg file. Insert data `st,tname=cpu1,t1=4 c1=3 1626006833639000000` then the table name will be cpu1. If there are multiple lines has same tname but different tag_set, the first line's tag_set will be used to automatically creating table and ignore other lines. Please refer to [TDengine Schemaless](../../reference/schemaless/)
:::
diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh
index 3744892526..5733c35ebe 100755
--- a/packaging/tools/makepkg.sh
+++ b/packaging/tools/makepkg.sh
@@ -101,6 +101,7 @@ else
${script_dir}/remove.sh \
${script_dir}/set_core.sh \
${script_dir}/startPre.sh \
+ ${script_dir}/quick_deploy.sh \
${script_dir}/taosd-dump-cfg.gdb"
fi
@@ -258,7 +259,7 @@ cp ${install_files} ${install_dir}
cp ${install_dir}/install.sh install_temp.sh
if [ "$verMode" == "cluster" ]; then
sed -i 's/verMode=edge/verMode=cluster/g' install_temp.sh
- sed -i "s/PREFIX=\"taos\"/PREFIX=\"${serverName2}\"/g" install_temp.sh
+ sed -i "s/PREFIX=\"taos\"/PREFIX=\"${clientName2}\"/g" install_temp.sh
sed -i "s/productName=\"TDengine\"/productName=\"${productName2}\"/g" install_temp.sh
cusDomain=`echo "${cusEmail2}" | sed 's/^[^@]*@//'`
sed -i "s/emailName=\"taosdata.com\"/emailName=\"${cusDomain}\"/g" install_temp.sh
diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c
index 427e238a7b..c5069d46aa 100644
--- a/source/client/src/clientRawBlockWrite.c
+++ b/source/client/src/clientRawBlockWrite.c
@@ -30,6 +30,11 @@ static tb_uid_t processSuid(tb_uid_t suid, char* db) { return suid + MurmurHash3
static char* buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* schemaTag, char* name, int64_t id,
int8_t t, SColCmprWrapper* pColCmprRow) {
+ int8_t buildDefaultCompress = 0;
+ if (pColCmprRow->nCols <= 0) {
+ buildDefaultCompress = 1;
+ }
+
char* string = NULL;
cJSON* json = cJSON_CreateObject();
if (json == NULL) {
@@ -70,13 +75,20 @@ static char* buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* sch
cJSON_AddItemToObject(column, "isPrimarykey", isPk);
cJSON_AddItemToArray(columns, column);
- if (pColCmprRow == NULL || pColCmprRow->nCols <= i) {
+ if (pColCmprRow == NULL) {
continue;
}
- SColCmpr* pColCmpr = pColCmprRow->pColCmpr + i;
- const char* encode = columnEncodeStr(COMPRESS_L1_TYPE_U32(pColCmpr->alg));
- const char* compress = columnCompressStr(COMPRESS_L2_TYPE_U32(pColCmpr->alg));
- const char* level = columnLevelStr(COMPRESS_L2_TYPE_LEVEL_U32(pColCmpr->alg));
+
+ uint32_t alg = 0;
+ if (buildDefaultCompress) {
+ alg = createDefaultColCmprByType(s->type);
+ } else {
+ SColCmpr* pColCmpr = pColCmprRow->pColCmpr + i;
+ alg = pColCmpr->alg;
+ }
+ const char* encode = columnEncodeStr(COMPRESS_L1_TYPE_U32(alg));
+ const char* compress = columnCompressStr(COMPRESS_L2_TYPE_U32(alg));
+ const char* level = columnLevelStr(COMPRESS_L2_TYPE_LEVEL_U32(alg));
cJSON* encodeJson = cJSON_CreateString(encode);
cJSON_AddItemToObject(column, "encode", encodeJson);
@@ -767,14 +779,25 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, int32_t metaLen) {
code = TSDB_CODE_INVALID_PARA;
goto end;
}
+
+ int8_t createDefaultCompress = 0;
+ SColCmprWrapper* p = &req.colCmpr;
+ if (p->nCols == 0) {
+ createDefaultCompress = 1;
+ }
// build create stable
pReq.pColumns = taosArrayInit(req.schemaRow.nCols, sizeof(SFieldWithOptions));
for (int32_t i = 0; i < req.schemaRow.nCols; i++) {
SSchema* pSchema = req.schemaRow.pSchema + i;
SFieldWithOptions field = {.type = pSchema->type, .flags = pSchema->flags, .bytes = pSchema->bytes};
strcpy(field.name, pSchema->name);
- SColCmpr *p = &req.colCmpr.pColCmpr[i];
- field.compress = p->alg;
+
+ if (createDefaultCompress) {
+ field.compress = createDefaultColCmprByType(pSchema->type);
+ } else {
+ SColCmpr* p = &req.colCmpr.pColCmpr[i];
+ field.compress = p->alg;
+ }
taosArrayPush(pReq.pColumns, &field);
}
pReq.pTags = taosArrayInit(req.schemaTag.nCols, sizeof(SField));
diff --git a/source/common/src/cos.c b/source/common/src/cos.c
index b249d3eff2..26c936c48d 100644
--- a/source/common/src/cos.c
+++ b/source/common/src/cos.c
@@ -27,6 +27,8 @@ static S3UriStyle uriStyleG = S3UriStylePath;
static int retriesG = 5;
static int timeoutMsG = 0;
+extern int8_t tsS3Oss;
+
int32_t s3Begin() {
S3Status status;
const char *hostname = tsS3Hostname;
@@ -42,6 +44,9 @@ int32_t s3Begin() {
}
protocolG = !tsS3Https;
+ if (tsS3Oss) {
+ uriStyleG = S3UriStyleVirtualHost;
+ }
return 0;
}
diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c
index 9223aa3c7a..8b7901e2a7 100644
--- a/source/common/src/tglobal.c
+++ b/source/common/src/tglobal.c
@@ -32,22 +32,22 @@
SConfig *tsCfg = NULL;
// cluster
-char tsFirst[TSDB_EP_LEN] = {0};
-char tsSecond[TSDB_EP_LEN] = {0};
-char tsLocalFqdn[TSDB_FQDN_LEN] = {0};
-char tsLocalEp[TSDB_EP_LEN] = {0}; // Local End Point, hostname:port
-char tsVersionName[16] = "community";
-uint16_t tsServerPort = 6030;
-int32_t tsVersion = 30000000;
-int32_t tsStatusInterval = 1; // second
-int32_t tsNumOfSupportVnodes = 256;
-char tsEncryptAlgorithm[16] = {0};
-char tsEncryptScope[100] = {0};
-EEncryptAlgor tsiEncryptAlgorithm = 0;
-EEncryptScope tsiEncryptScope = 0;
-//char tsAuthCode[500] = {0};
-//char tsEncryptKey[17] = {0};
-char tsEncryptKey[17] = {0};
+char tsFirst[TSDB_EP_LEN] = {0};
+char tsSecond[TSDB_EP_LEN] = {0};
+char tsLocalFqdn[TSDB_FQDN_LEN] = {0};
+char tsLocalEp[TSDB_EP_LEN] = {0}; // Local End Point, hostname:port
+char tsVersionName[16] = "community";
+uint16_t tsServerPort = 6030;
+int32_t tsVersion = 30000000;
+int32_t tsStatusInterval = 1; // second
+int32_t tsNumOfSupportVnodes = 256;
+char tsEncryptAlgorithm[16] = {0};
+char tsEncryptScope[100] = {0};
+EEncryptAlgor tsiEncryptAlgorithm = 0;
+EEncryptScope tsiEncryptScope = 0;
+// char tsAuthCode[500] = {0};
+// char tsEncryptKey[17] = {0};
+char tsEncryptKey[17] = {0};
// common
int32_t tsMaxShellConns = 50000;
@@ -296,6 +296,7 @@ char tsS3AccessKeySecret[TSDB_FQDN_LEN] = "";
char tsS3BucketName[TSDB_FQDN_LEN] = "";
char tsS3AppId[TSDB_FQDN_LEN] = "";
int8_t tsS3Enabled = false;
+int8_t tsS3Oss = false;
int8_t tsS3StreamEnabled = false;
int8_t tsS3Https = true;
@@ -310,7 +311,7 @@ bool tsExperimental = true;
int32_t tsMaxTsmaNum = 3;
int32_t tsMaxTsmaCalcDelay = 600;
-int64_t tsmaDataDeleteMark = 1000 * 60 * 60 * 24; // in ms, default to 1d
+int64_t tsmaDataDeleteMark = 1000 * 60 * 60 * 24; // in ms, default to 1d
#ifndef _STORAGE
int32_t taosSetTfsCfg(SConfig *pCfg) {
@@ -366,6 +367,10 @@ int32_t taosSetS3Cfg(SConfig *pCfg) {
tstrncpy(tsS3AppId, appid + 1, TSDB_FQDN_LEN);
}
}
+ char *oss = strstr(tsS3Endpoint, "aliyuncs.");
+ if (oss) {
+ tsS3Oss = true;
+ }
if (tsS3BucketName[0] != '<') {
#if defined(USE_COS) || defined(USE_S3)
#ifdef TD_ENTERPRISE
@@ -563,11 +568,12 @@ static int32_t taosAddClientCfg(SConfig *pCfg) {
if (cfgAddBool(pCfg, "monitor", tsEnableMonitor, CFG_SCOPE_BOTH, CFG_DYN_BOTH) != 0) return -1;
if (cfgAddInt32(pCfg, "monitorInterval", tsMonitorInterval, 1, 200000, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1;
- if (cfgAddBool(pCfg, "multiResultFunctionStarReturnTags", tsMultiResultFunctionStarReturnTags, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT) != 0) return -1;
+ if (cfgAddBool(pCfg, "multiResultFunctionStarReturnTags", tsMultiResultFunctionStarReturnTags, CFG_SCOPE_CLIENT,
+ CFG_DYN_CLIENT) != 0)
+ return -1;
if (cfgAddInt32(pCfg, "countAlwaysReturnValue", tsCountAlwaysReturnValue, 0, 1, CFG_SCOPE_BOTH, CFG_DYN_CLIENT) != 0)
return -1;
- if (cfgAddInt32(pCfg, "maxTsmaCalcDelay", tsMaxTsmaCalcDelay, 600, 86400, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT) !=
- 0)
+ if (cfgAddInt32(pCfg, "maxTsmaCalcDelay", tsMaxTsmaCalcDelay, 600, 86400, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT) != 0)
return -1;
if (cfgAddInt32(pCfg, "tsmaDataDeleteMark", tsmaDataDeleteMark, 60 * 60 * 1000, INT64_MAX, CFG_SCOPE_CLIENT,
CFG_DYN_CLIENT) != 0)
@@ -618,11 +624,12 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
tsNumOfSupportVnodes = tsNumOfCores * 2;
tsNumOfSupportVnodes = TMAX(tsNumOfSupportVnodes, 2);
- if (cfgAddInt32(pCfg, "supportVnodes", tsNumOfSupportVnodes, 0, 4096, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1;
+ if (cfgAddInt32(pCfg, "supportVnodes", tsNumOfSupportVnodes, 0, 4096, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0)
+ return -1;
if (cfgAddString(pCfg, "encryptAlgorithm", tsEncryptAlgorithm, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
if (cfgAddString(pCfg, "encryptScope", tsEncryptScope, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
- //if (cfgAddString(pCfg, "authCode", tsAuthCode, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
+ // if (cfgAddString(pCfg, "authCode", tsAuthCode, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
if (cfgAddInt32(pCfg, "statusInterval", tsStatusInterval, 1, 30, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
if (cfgAddInt32(pCfg, "minSlidingTime", tsMinSlidingTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT) != 0)
@@ -749,8 +756,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if (cfgAddInt32(pCfg, "tmqMaxTopicNum", tmqMaxTopicNum, 1, 10000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0)
return -1;
- if (cfgAddInt32(pCfg, "tmqRowSize", tmqRowSize, 1, 1000000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0)
- return -1;
+ if (cfgAddInt32(pCfg, "tmqRowSize", tmqRowSize, 1, 1000000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1;
if (cfgAddInt32(pCfg, "maxTsmaNum", tsMaxTsmaNum, 0, 3, CFG_SCOPE_SERVER, CFG_DYN_SERVER) != 0) return -1;
if (cfgAddInt32(pCfg, "transPullupInterval", tsTransPullupInterval, 1, 10000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) !=
@@ -1181,7 +1187,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsQueryBufferSize = cfgGetItem(pCfg, "queryBufferSize")->i32;
tstrncpy(tsEncryptAlgorithm, cfgGetItem(pCfg, "encryptAlgorithm")->str, 16);
tstrncpy(tsEncryptScope, cfgGetItem(pCfg, "encryptScope")->str, 100);
- //tstrncpy(tsAuthCode, cfgGetItem(pCfg, "authCode")->str, 100);
+ // tstrncpy(tsAuthCode, cfgGetItem(pCfg, "authCode")->str, 100);
tsNumOfRpcThreads = cfgGetItem(pCfg, "numOfRpcThreads")->i32;
tsNumOfRpcSessions = cfgGetItem(pCfg, "numOfRpcSessions")->i32;
diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c
index 3da6ac668c..ef9252e337 100644
--- a/source/libs/parser/src/parAstParser.c
+++ b/source/libs/parser/src/parAstParser.c
@@ -534,6 +534,10 @@ static int32_t collectMetaKeyFromShowTables(SCollectMetaKeyCxt* pCxt, SShowStmt*
static int32_t collectMetaKeyFromShowTags(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) {
int32_t code = reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_TAGS,
pCxt->pMetaCache);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = reserveTableMetaInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal,
+ ((SValueNode*)pStmt->pTbName)->literal, pCxt->pMetaCache);
+ }
if (TSDB_CODE_SUCCESS == code) {
code = reserveDbVgInfoInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, pCxt->pMetaCache);
}
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index b26f837423..68e207e64e 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -11867,6 +11867,30 @@ static int32_t rewriteShowVgroups(STranslateContext* pCxt, SQuery* pQuery) {
return code;
}
+static int32_t checkShowTags(STranslateContext* pCxt, const SShowStmt* pShow) {
+ int32_t code = 0;
+ SName name;
+ STableMeta* pTableMeta = NULL;
+ code = getTargetMeta(pCxt,
+ toName(pCxt->pParseCxt->acctId, ((SValueNode*)pShow->pDbName)->literal,
+ ((SValueNode*)pShow->pTbName)->literal, &name),
+ &pTableMeta, true);
+ taosMemoryFreeClear(pTableMeta);
+ if (TSDB_CODE_SUCCESS != code) {
+ return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_GET_META_ERROR, tstrerror(code));
+ }
+
+ return code;
+}
+
+static int32_t rewriteShowTags(STranslateContext* pCxt, SQuery* pQuery) {
+ int32_t code = checkShowTags(pCxt, (SShowStmt*)pQuery->pRoot);
+ if (TSDB_CODE_SUCCESS == code) {
+ code = rewriteShow(pCxt, pQuery);
+ }
+ return code;
+}
+
static SNode* createTagsFunction() {
SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION);
if (NULL == pFunc) {
@@ -13170,7 +13194,6 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) {
case QUERY_NODE_SHOW_APPS_STMT:
case QUERY_NODE_SHOW_CONSUMERS_STMT:
case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT:
- case QUERY_NODE_SHOW_TAGS_STMT:
case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT:
case QUERY_NODE_SHOW_VIEWS_STMT:
case QUERY_NODE_SHOW_GRANTS_FULL_STMT:
@@ -13181,6 +13204,9 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) {
case QUERY_NODE_SHOW_TSMAS_STMT:
code = rewriteShow(pCxt, pQuery);
break;
+ case QUERY_NODE_SHOW_TAGS_STMT:
+ code = rewriteShowTags(pCxt, pQuery);
+ break;
case QUERY_NODE_SHOW_VGROUPS_STMT:
code = rewriteShowVgroups(pCxt, pQuery);
break;
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index d9d16d1f57..e3e1291c47 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -489,11 +489,11 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4
-#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py
-#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R
-#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2
-#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3
-#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2
@@ -509,6 +509,11 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3
+,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py
diff --git a/tests/system-test/0-others/show_tag_index.py b/tests/system-test/0-others/show_tag_index.py
index c79880ba35..3f1b598589 100644
--- a/tests/system-test/0-others/show_tag_index.py
+++ b/tests/system-test/0-others/show_tag_index.py
@@ -113,6 +113,9 @@ class TDTestCase:
tdSql.error(f'show tags from `db`.`stb` from db')
tdSql.error(f'show tags from db.ctb1 from db')
tdSql.error(f'show tags from `db`.`ctb1` from db')
+ tdSql.error(f'show tags from tb_undef from db')
+ tdSql.error(f'show tags from db.tb_undef')
+ tdSql.error(f'show tags from tb_undef')
# show table tags
tdSql.query(f'show table tags from stb')
@@ -145,6 +148,9 @@ class TDTestCase:
tdSql.error(f'show table tags from `db`.`stb` from db')
tdSql.error(f'show table tags from db.ctb1 from db')
tdSql.error(f'show table tags from `db`.`ctb1` from db')
+ tdSql.error(f'show table tags from tb_undef from db')
+ tdSql.error(f'show table tags from db.tb_undef')
+ tdSql.error(f'show table tags from tb_undef')
# show indexes
tdSql.execute(f'create index idx1 on stb (t1)')
diff --git a/tests/system-test/2-query/primary_ts_base_1.py b/tests/system-test/2-query/primary_ts_base_1.py
index 05e42155cf..739afcb1ab 100644
--- a/tests/system-test/2-query/primary_ts_base_1.py
+++ b/tests/system-test/2-query/primary_ts_base_1.py
@@ -27,8 +27,8 @@ class TDTestCase(TDTestCase):
self.fun_pk_twa(self.database,'derivative',',1s,0')
self.fun_pk_twa(self.database,'derivative',',1s,1')
self.fun_pk_unique(self.database,'unique','')
- # self.fun_pk_last_init(self.database,'last','')
- # self.fun_pk_last(self.database,'last','')
+ self.fun_pk_last_init(self.database,'last','')
+ self.fun_pk_last(self.database,'last','')
# self.fun_pk_last(self.database,'last_row','')
# self.fun_pk_first(self.database,'first','')
diff --git a/tests/system-test/2-query/primary_ts_base_2.py b/tests/system-test/2-query/primary_ts_base_2.py
index e12166bf1f..7aed595c60 100644
--- a/tests/system-test/2-query/primary_ts_base_2.py
+++ b/tests/system-test/2-query/primary_ts_base_2.py
@@ -27,14 +27,14 @@ class TDTestCase(TDTestCase):
# self.fun_pk_twa(self.database,'derivative',',1s,0')
# self.fun_pk_twa(self.database,'derivative',',1s,1')
# self.fun_pk_unique(self.database,'unique','')
- self.fun_pk_last_init(self.database,'last','')
- self.fun_pk_last(self.database,'last','')
+ # self.fun_pk_last_init(self.database,'last','')
+ # self.fun_pk_last(self.database,'last','')
self.fun_pk_last(self.database,'last_row','')
self.fun_pk_first(self.database,'first','')
self.query_pk_fun(self.database,'')
- # self.touying_pk_1(self.database,1)
+ self.touying_pk_1(self.database,1)
# self.touying_pk_where(self.database,'')
# self.touying_pk_where(self.database,'tags')
# self.touying_pk_where(self.database,'distinct')
diff --git a/tests/system-test/2-query/primary_ts_base_3.py b/tests/system-test/2-query/primary_ts_base_3.py
index a20d24378e..eb94deb719 100644
--- a/tests/system-test/2-query/primary_ts_base_3.py
+++ b/tests/system-test/2-query/primary_ts_base_3.py
@@ -34,7 +34,7 @@ class TDTestCase(TDTestCase):
# self.query_pk_fun(self.database,'')
- self.touying_pk_1(self.database,1)
+ # self.touying_pk_1(self.database,1)
self.touying_pk_where(self.database,'')
# self.touying_pk_where(self.database,'tags')
# self.touying_pk_where(self.database,'distinct')
diff --git a/tests/system-test/2-query/primary_ts_base_4.py b/tests/system-test/2-query/primary_ts_base_4.py
index 85e825df96..7e446ff442 100644
--- a/tests/system-test/2-query/primary_ts_base_4.py
+++ b/tests/system-test/2-query/primary_ts_base_4.py
@@ -36,9 +36,9 @@ class TDTestCase(TDTestCase):
# self.touying_pk_1(self.database,1)
# self.touying_pk_where(self.database,'')
- self.touying_pk_where(self.database,'tags')
+ # self.touying_pk_where(self.database,'tags')
self.touying_pk_where(self.database,'distinct')
- self.count_pk(self.database,1)
+ # self.count_pk(self.database,1)
endTime = time.time()
print("total time %ds" % (endTime - startTime))
diff --git a/tests/system-test/2-query/primary_ts_base_5.py b/tests/system-test/2-query/primary_ts_base_5.py
new file mode 100644
index 0000000000..9246385157
--- /dev/null
+++ b/tests/system-test/2-query/primary_ts_base_5.py
@@ -0,0 +1,52 @@
+###################################################################
+# 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 -*-
+from util.cases import tdCases
+from .primary_ts_base import *
+from faker import Faker
+import random
+
+class TDTestCase(TDTestCase):
+
+ def run(self):
+ startTime = time.time()
+ self.dropandcreateDB_primary_key(self.database, 1 , 1 ,'yes','yes','no')
+
+ # self.fun_pk_interp(self.database,'interp','')
+ # self.multiple_agg_groupby(self.database,1)
+ # self.fun_pk_diff(self.database,'diff','')
+ # self.fun_pk_twa(self.database,'derivative',',1s,0')
+ # self.fun_pk_twa(self.database,'derivative',',1s,1')
+ # self.fun_pk_unique(self.database,'unique','')
+ # self.fun_pk_last_init(self.database,'last','')
+ # self.fun_pk_last(self.database,'last','')
+ # self.fun_pk_last(self.database,'last_row','')
+ # self.fun_pk_first(self.database,'first','')
+
+ # self.query_pk_fun(self.database,'')
+
+ # self.touying_pk_1(self.database,1)
+ # self.touying_pk_where(self.database,'')
+ self.touying_pk_where(self.database,'tags')
+ # self.touying_pk_where(self.database,'distinct')
+ self.count_pk(self.database,1)
+
+ endTime = time.time()
+ print("total time %ds" % (endTime - startTime))
+
+ def stop(self):
+ tdSql.close()
+ tdLog.success("%s successfully executed" % __file__)
+
+
+tdCases.addWindows(__file__, TDTestCase())
+tdCases.addLinux(__file__, TDTestCase())