Merge branch '3.0' of https://github.com/taosdata/TDengine into 3.0
This commit is contained in:
commit
d6a66b7f8f
|
@ -12,7 +12,7 @@ ExternalProject_Add(curl2
|
||||||
BUILD_IN_SOURCE TRUE
|
BUILD_IN_SOURCE TRUE
|
||||||
BUILD_ALWAYS 1
|
BUILD_ALWAYS 1
|
||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
CONFIGURE_COMMAND ./configure --prefix=$ENV{HOME}/.cos-local.2 --with-ssl=$ENV{HOME}/.cos-local.2 --enable-shared=no --disable-ldap --disable-ldaps --without-brotli --without-zstd --without-libidn2 --without-nghttp2 #--enable-debug
|
CONFIGURE_COMMAND ./configure --prefix=$ENV{HOME}/.cos-local.2 --with-ssl=$ENV{HOME}/.cos-local.2 --enable-shared=no --disable-ldap --disable-ldaps --without-brotli --without-zstd --without-libidn2 --without-nghttp2 --without-libpsl #--enable-debug
|
||||||
BUILD_COMMAND make -j
|
BUILD_COMMAND make -j
|
||||||
INSTALL_COMMAND make install
|
INSTALL_COMMAND make install
|
||||||
TEST_COMMAND ""
|
TEST_COMMAND ""
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
# xz
|
# xz
|
||||||
|
|
||||||
if (${TD_LINUX})
|
|
||||||
ExternalProject_Add(xz
|
ExternalProject_Add(xz
|
||||||
GIT_REPOSITORY https://github.com/xz-mirror/xz.git
|
GIT_REPOSITORY https://github.com/xz-mirror/xz.git
|
||||||
GIT_TAG v5.4.4
|
GIT_TAG v5.4.4
|
||||||
|
@ -14,4 +12,3 @@ ExternalProject_Add(xz
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
TEST_COMMAND ""
|
TEST_COMMAND ""
|
||||||
)
|
)
|
||||||
endif()
|
|
|
@ -2,7 +2,6 @@
|
||||||
# zlib
|
# zlib
|
||||||
|
|
||||||
|
|
||||||
if (${TD_LINUX})
|
|
||||||
ExternalProject_Add(zlib
|
ExternalProject_Add(zlib
|
||||||
GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git
|
GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git
|
||||||
GIT_TAG v1.2.11
|
GIT_TAG v1.2.11
|
||||||
|
@ -14,4 +13,3 @@ ExternalProject_Add(zlib
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
TEST_COMMAND ""
|
TEST_COMMAND ""
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
|
@ -250,6 +250,10 @@ target_include_directories(
|
||||||
|
|
||||||
# zlib
|
# zlib
|
||||||
set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in")
|
set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in")
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-non-prototype")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-non-prototype")
|
||||||
|
endif(${TD_DARWIN})
|
||||||
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
zlibstatic
|
zlibstatic
|
||||||
|
|
|
@ -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.
|
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.
|
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.
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ For REST and native connections, client libraries provide similar APIs for perfo
|
||||||
Key differences:
|
Key differences:
|
||||||
|
|
||||||
3. The REST connection is more accessible with cross-platform support, however it results in a 30% performance downgrade.
|
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
|
## Install Client Driver taosc
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ Without the current database specified, table name must be preceded with the cor
|
||||||
|
|
||||||
## Create STable
|
## 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
|
```sql
|
||||||
CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int);
|
CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int);
|
||||||
|
|
|
@ -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
|
## Examples
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ The version number of the TDengine client driver and the version number of the T
|
||||||
|
|
||||||
## Installation Steps
|
## 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
|
## Establishing a connection
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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
|
- 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
|
### 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_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.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.
|
- 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
|
### Priority of configuration parameters
|
||||||
|
|
||||||
|
|
|
@ -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.
|
_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
|
* 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.
|
_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.
|
* `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.
|
* `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).
|
_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.
|
* `writeTimeout` The timeout to send data via WebSocket.
|
||||||
* `readTimeout` The timeout to receive response data via WebSocket.
|
* `readTimeout` The timeout to receive response data via WebSocket.
|
||||||
|
|
|
@ -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.
|
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)
|
||||||
|
|
||||||
<RustBind />
|
<RustBind />
|
||||||
|
|
||||||
|
@ -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.
|
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.
|
||||||
|
|
||||||
<p>
|
### Bind Interface
|
||||||
<a id="stmt-api" style={{color:'#141414'}}>
|
|
||||||
Bind Interface
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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.
|
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
|
### Install via pip
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ Please refer to [version support list](../#version-support)
|
||||||
### Pre-installation preparation
|
### Pre-installation preparation
|
||||||
|
|
||||||
- Install the Node.js development environment
|
- 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.
|
||||||
|
|
||||||
<Tabs defaultValue="Linux">
|
<Tabs defaultValue="Linux">
|
||||||
<TabItem value="Linux" label="Linux system installation dependencies">
|
<TabItem value="Linux" label="Linux system installation dependencies">
|
||||||
|
|
|
@ -40,7 +40,7 @@ Because the version of TDengine client driver is tightly associated with that of
|
||||||
|
|
||||||
### Install TDengine Client Driver
|
### 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
|
### Install php-tdengine
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ taosBenchmark -f <json file>
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Command-line argument in detail
|
## Command-line arguments in detail
|
||||||
|
|
||||||
- **-f/--file <json file>** :
|
- **-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.
|
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.
|
||||||
|
|
|
@ -23,7 +23,7 @@ Methods of installing taosKeeper:
|
||||||
|
|
||||||
### Configuration
|
### 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`.
|
**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
|
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
|
### Quick Launch
|
||||||
|
|
||||||
|
|
|
@ -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.
|
- 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.
|
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/)
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ typedef struct SStoreMeta {
|
||||||
int32_t (*putCachedTableList)(void* pVnode, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload,
|
int32_t (*putCachedTableList)(void* pVnode, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload,
|
||||||
int32_t payloadLen, double selectivityRatio);
|
int32_t payloadLen, double selectivityRatio);
|
||||||
|
|
||||||
void* (*storeGetIndexInfo)();
|
void* (*storeGetIndexInfo)(void *pVnode);
|
||||||
void* (*getInvertIndex)(void* pVnode);
|
void* (*getInvertIndex)(void* pVnode);
|
||||||
// support filter and non-filter cases. [vnodeGetCtbIdList & vnodeGetCtbIdListByFilter]
|
// support filter and non-filter cases. [vnodeGetCtbIdList & vnodeGetCtbIdListByFilter]
|
||||||
int32_t (*getChildTableList)(void* pVnode, int64_t suid, SArray* list);
|
int32_t (*getChildTableList)(void* pVnode, int64_t suid, SArray* list);
|
||||||
|
|
|
@ -22,7 +22,11 @@ extern "C" {
|
||||||
|
|
||||||
typedef wchar_t TdWchar;
|
typedef wchar_t TdWchar;
|
||||||
typedef int32_t TdUcs4;
|
typedef int32_t TdUcs4;
|
||||||
|
#if !defined(DISALLOW_NCHAR_WITHOUT_ICONV) && defined(DARWIN)
|
||||||
|
#include "iconv.h"
|
||||||
|
#else
|
||||||
typedef void *iconv_t;
|
typedef void *iconv_t;
|
||||||
|
#endif
|
||||||
typedef enum { M2C = 0, C2M } ConvType;
|
typedef enum { M2C = 0, C2M } ConvType;
|
||||||
|
|
||||||
// If the error is in a third-party library, place this header file under the third-party library header file.
|
// If the error is in a third-party library, place this header file under the third-party library header file.
|
||||||
|
|
|
@ -101,6 +101,7 @@ else
|
||||||
${script_dir}/remove.sh \
|
${script_dir}/remove.sh \
|
||||||
${script_dir}/set_core.sh \
|
${script_dir}/set_core.sh \
|
||||||
${script_dir}/startPre.sh \
|
${script_dir}/startPre.sh \
|
||||||
|
${script_dir}/quick_deploy.sh \
|
||||||
${script_dir}/taosd-dump-cfg.gdb"
|
${script_dir}/taosd-dump-cfg.gdb"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -258,7 +259,7 @@ cp ${install_files} ${install_dir}
|
||||||
cp ${install_dir}/install.sh install_temp.sh
|
cp ${install_dir}/install.sh install_temp.sh
|
||||||
if [ "$verMode" == "cluster" ]; then
|
if [ "$verMode" == "cluster" ]; then
|
||||||
sed -i 's/verMode=edge/verMode=cluster/g' install_temp.sh
|
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
|
sed -i "s/productName=\"TDengine\"/productName=\"${productName2}\"/g" install_temp.sh
|
||||||
cusDomain=`echo "${cusEmail2}" | sed 's/^[^@]*@//'`
|
cusDomain=`echo "${cusEmail2}" | sed 's/^[^@]*@//'`
|
||||||
sed -i "s/emailName=\"taosdata.com\"/emailName=\"${cusDomain}\"/g" install_temp.sh
|
sed -i "s/emailName=\"taosdata.com\"/emailName=\"${cusDomain}\"/g" install_temp.sh
|
||||||
|
|
|
@ -23,13 +23,6 @@ target_link_libraries(
|
||||||
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
||||||
)
|
)
|
||||||
|
|
||||||
if(TD_DARWIN_ARM64)
|
|
||||||
target_link_libraries(
|
|
||||||
taos
|
|
||||||
PRIVATE "-arch x86_64"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TD_WINDOWS)
|
if(TD_WINDOWS)
|
||||||
INCLUDE_DIRECTORIES(jni/windows)
|
INCLUDE_DIRECTORIES(jni/windows)
|
||||||
INCLUDE_DIRECTORIES(jni/windows/win32)
|
INCLUDE_DIRECTORIES(jni/windows/win32)
|
||||||
|
|
|
@ -738,7 +738,7 @@ static int32_t hbGetUserAuthInfo(SClientHbKey *connKey, SHbParam *param, SClient
|
||||||
_return:
|
_return:
|
||||||
releaseTscObj(connKey->tscRid);
|
releaseTscObj(connKey->tscRid);
|
||||||
if (code) {
|
if (code) {
|
||||||
tscError("hb got user auth info failed since %s", terrstr(code));
|
tscError("hb got user auth info failed since %s", tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -37,7 +37,7 @@ static void smProcessWriteQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
|
||||||
dTrace("msg:%p, get from snode-write queue", pMsg);
|
dTrace("msg:%p, get from snode-write queue", pMsg);
|
||||||
int32_t code = sndProcessWriteMsg(pMgmt->pSnode, pMsg, NULL);
|
int32_t code = sndProcessWriteMsg(pMgmt->pSnode, pMsg, NULL);
|
||||||
if (code < 0) {
|
if (code < 0) {
|
||||||
dGError("snd, msg:%p failed to process write since %s", pMsg, terrstr(code));
|
dGError("snd, msg:%p failed to process write since %s", pMsg, tstrerror(code));
|
||||||
if (pMsg->info.handle != NULL) {
|
if (pMsg->info.handle != NULL) {
|
||||||
tmsgSendRsp(pMsg);
|
tmsgSendRsp(pMsg);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ static void smProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
|
||||||
dTrace("msg:%p, get from snode-stream queue", pMsg);
|
dTrace("msg:%p, get from snode-stream queue", pMsg);
|
||||||
int32_t code = sndProcessStreamMsg(pMgmt->pSnode, pMsg);
|
int32_t code = sndProcessStreamMsg(pMgmt->pSnode, pMsg);
|
||||||
if (code < 0) {
|
if (code < 0) {
|
||||||
dGError("snd, msg:%p failed to process stream msg %s since %s", pMsg, TMSG_INFO(pMsg->msgType), terrstr(code));
|
dGError("snd, msg:%p failed to process stream msg %s since %s", pMsg, TMSG_INFO(pMsg->msgType), tstrerror(code));
|
||||||
smSendRsp(pMsg, terrno);
|
smSendRsp(pMsg, terrno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
|
|
||||||
if (vmTsmaAdjustDays(&vnodeCfg, &req) < 0) {
|
if (vmTsmaAdjustDays(&vnodeCfg, &req) < 0) {
|
||||||
dError("vgId:%d, failed to adjust tsma days since %s", req.vgId, terrstr());
|
dError("vgId:%d, failed to adjust tsma days since %s", req.vgId, terrstr());
|
||||||
code = terrno;
|
code = terrno != 0 ? terrno : -1;
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,21 +344,21 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
dError("vgId:%d, failed to create vnode since %s", req.vgId, terrstr());
|
dError("vgId:%d, failed to create vnode since %s", req.vgId, terrstr());
|
||||||
vmReleaseVnode(pMgmt, pVnode);
|
vmReleaseVnode(pMgmt, pVnode);
|
||||||
tFreeSCreateVnodeReq(&req);
|
tFreeSCreateVnodeReq(&req);
|
||||||
code = terrno;
|
code = terrno != 0 ? terrno : -1;
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
SVnode *pImpl = vnodeOpen(path, diskPrimary, pMgmt->pTfs, pMgmt->msgCb, true);
|
SVnode *pImpl = vnodeOpen(path, diskPrimary, pMgmt->pTfs, pMgmt->msgCb, true);
|
||||||
if (pImpl == NULL) {
|
if (pImpl == NULL) {
|
||||||
dError("vgId:%d, failed to open vnode since %s", req.vgId, terrstr());
|
dError("vgId:%d, failed to open vnode since %s", req.vgId, terrstr());
|
||||||
code = terrno;
|
code = terrno != 0 ? terrno : -1;
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = vmOpenVnode(pMgmt, &wrapperCfg, pImpl);
|
code = vmOpenVnode(pMgmt, &wrapperCfg, pImpl);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
dError("vgId:%d, failed to open vnode since %s", req.vgId, terrstr());
|
dError("vgId:%d, failed to open vnode since %s", req.vgId, terrstr());
|
||||||
code = terrno;
|
code = terrno != 0 ? terrno : code;
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
|
|
||||||
code = vmWriteVnodeListToFile(pMgmt);
|
code = vmWriteVnodeListToFile(pMgmt);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
code = terrno;
|
code = terrno != 0 ? terrno : code;
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void vmProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
if (terrno != 0) code = terrno;
|
if (terrno != 0) code = terrno;
|
||||||
dGError("vgId:%d, msg:%p failed to process stream msg %s since %s", pVnode->vgId, pMsg, TMSG_INFO(pMsg->msgType),
|
dGError("vgId:%d, msg:%p failed to process stream msg %s since %s", pVnode->vgId, pMsg, TMSG_INFO(pMsg->msgType),
|
||||||
terrstr(code));
|
tstrerror(code));
|
||||||
vmSendRsp(pMsg, code);
|
vmSendRsp(pMsg, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
|
||||||
case QUERY_QUEUE:
|
case QUERY_QUEUE:
|
||||||
code = vnodePreprocessQueryMsg(pVnode->pImpl, pMsg);
|
code = vnodePreprocessQueryMsg(pVnode->pImpl, pMsg);
|
||||||
if (code) {
|
if (code) {
|
||||||
dError("vgId:%d, msg:%p preprocess query msg failed since %s", pVnode->vgId, pMsg, terrstr(code));
|
dError("vgId:%d, msg:%p preprocess query msg failed since %s", pVnode->vgId, pMsg, tstrerror(code));
|
||||||
} else {
|
} else {
|
||||||
dGTrace("vgId:%d, msg:%p put into vnode-query queue", pVnode->vgId, pMsg);
|
dGTrace("vgId:%d, msg:%p put into vnode-query queue", pVnode->vgId, pMsg);
|
||||||
taosWriteQitem(pVnode->pQueryQ, pMsg);
|
taosWriteQitem(pVnode->pQueryQ, pMsg);
|
||||||
|
@ -219,13 +219,13 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
|
||||||
if (!vmDataSpaceSufficient(pVnode)) {
|
if (!vmDataSpaceSufficient(pVnode)) {
|
||||||
terrno = TSDB_CODE_NO_ENOUGH_DISKSPACE;
|
terrno = TSDB_CODE_NO_ENOUGH_DISKSPACE;
|
||||||
code = terrno;
|
code = terrno;
|
||||||
dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code));
|
dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, tstrerror(code));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pMsg->msgType == TDMT_VND_SUBMIT && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) {
|
if (pMsg->msgType == TDMT_VND_SUBMIT && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) {
|
||||||
terrno = TSDB_CODE_VND_NO_WRITE_AUTH;
|
terrno = TSDB_CODE_VND_NO_WRITE_AUTH;
|
||||||
code = terrno;
|
code = terrno;
|
||||||
dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code));
|
dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, tstrerror(code));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pMsg->msgType != TDMT_VND_ALTER_CONFIRM && pVnode->disable) {
|
if (pMsg->msgType != TDMT_VND_ALTER_CONFIRM && pVnode->disable) {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# vnode
|
# vnode
|
||||||
add_subdirectory(src/tqCommon)
|
add_subdirectory(src/tqCommon)
|
||||||
add_library(vnode STATIC "")
|
add_library(vnode STATIC "")
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
target_compile_options(vnode PRIVATE -Wno-error=single-bit-bitfield-constant-conversion)
|
||||||
|
endif(${TD_DARWIN})
|
||||||
set(
|
set(
|
||||||
VNODE_SOURCE_FILES
|
VNODE_SOURCE_FILES
|
||||||
"src/vnd/vnodeOpen.c"
|
"src/vnd/vnodeOpen.c"
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
aux_source_directory(src EXECUTOR_SRC)
|
aux_source_directory(src EXECUTOR_SRC)
|
||||||
|
|
||||||
add_library(executor STATIC ${EXECUTOR_SRC})
|
add_library(executor STATIC ${EXECUTOR_SRC})
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
target_compile_options(executor PRIVATE -Wno-error=deprecated-non-prototype)
|
||||||
|
endif(${TD_DARWIN})
|
||||||
|
|
||||||
target_link_libraries(executor
|
target_link_libraries(executor
|
||||||
PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry
|
PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry
|
||||||
|
|
|
@ -484,7 +484,7 @@ int32_t doInitAggInfoSup(SAggSupporter* pAggSup, SqlFunctionCtx* pCtx, int32_t n
|
||||||
|
|
||||||
if (!osTempSpaceAvailable()) {
|
if (!osTempSpaceAvailable()) {
|
||||||
code = TSDB_CODE_NO_DISKSPACE;
|
code = TSDB_CODE_NO_DISKSPACE;
|
||||||
qError("Init stream agg supporter failed since %s, key:%s, tempDir:%s", terrstr(code), pKey, tsTempDir);
|
qError("Init stream agg supporter failed since %s, key:%s, tempDir:%s", tstrerror(code), pKey, tsTempDir);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -549,7 +549,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
||||||
|
|
||||||
if (!pInfo->pCur || !pInfo->pSchema) {
|
if (!pInfo->pCur || !pInfo->pSchema) {
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
qError("sysTableScanUserCols failed since %s", terrstr(terrno));
|
qError("sysTableScanUserCols failed since %s", terrstr());
|
||||||
blockDataDestroy(pDataBlock);
|
blockDataDestroy(pDataBlock);
|
||||||
pInfo->loadInfo.totalRows = 0;
|
pInfo->loadInfo.totalRows = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -204,6 +204,11 @@ static bool checkDuplicateTimestamps(STimeSliceOperatorInfo* pSliceInfo, SColumn
|
||||||
SRowKey cur = {.ts = currentTs, .numOfPKs = (pPkCol != NULL)? 1:0};
|
SRowKey cur = {.ts = currentTs, .numOfPKs = (pPkCol != NULL)? 1:0};
|
||||||
if (pPkCol != NULL) {
|
if (pPkCol != NULL) {
|
||||||
cur.pks[0].type = pPkCol->info.type;
|
cur.pks[0].type = pPkCol->info.type;
|
||||||
|
if (IS_VAR_DATA_TYPE(pPkCol->info.type)) {
|
||||||
|
cur.pks[0].pData = (uint8_t*)colDataGetVarData(pPkCol, curIndex);
|
||||||
|
} else {
|
||||||
|
memcpy(&cur.pks[0].val, colDataGetData(pPkCol, curIndex), pPkCol->info.bytes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// let's discard the duplicated ts
|
// let's discard the duplicated ts
|
||||||
|
|
|
@ -842,7 +842,7 @@ void udfdGetFuncBodyPath(const SUdf *udf, char *path) {
|
||||||
int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) {
|
int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) {
|
||||||
if (!osDataSpaceAvailable()) {
|
if (!osDataSpaceAvailable()) {
|
||||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||||
fnError("udfd create shared library failed since %s", terrstr(terrno));
|
fnError("udfd create shared library failed since %s", terrstr());
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,7 @@ target_include_directories(
|
||||||
PUBLIC "${TD_SOURCE_DIR}/include/libs/monitorfw"
|
PUBLIC "${TD_SOURCE_DIR}/include/libs/monitorfw"
|
||||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
||||||
)
|
)
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
target_compile_options(monitorfw PRIVATE -Wno-error=deprecated-pragma)
|
||||||
|
endif(${TD_DARWIN})
|
||||||
target_link_libraries(monitorfw os util common transport)
|
target_link_libraries(monitorfw os util common transport)
|
||||||
|
|
|
@ -677,6 +677,11 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
|
||||||
p += sizeof(uint64_t);
|
p += sizeof(uint64_t);
|
||||||
|
|
||||||
int8_t* fields = p;
|
int8_t* fields = p;
|
||||||
|
if(*fields >= TSDB_DATA_TYPE_MAX || *fields < 0){
|
||||||
|
uError("fields type error:%d", *fields);
|
||||||
|
ret = TSDB_CODE_INVALID_PARA;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
p += numOfCols * (sizeof(int8_t) + sizeof(int32_t));
|
p += numOfCols * (sizeof(int8_t) + sizeof(int32_t));
|
||||||
|
|
||||||
int32_t* colLength = (int32_t*)p;
|
int32_t* colLength = (int32_t*)p;
|
||||||
|
@ -688,12 +693,12 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
|
||||||
SBoundColInfo* boundInfo = &pTableCxt->boundColsInfo;
|
SBoundColInfo* boundInfo = &pTableCxt->boundColsInfo;
|
||||||
|
|
||||||
if (tFields != NULL && numFields != numOfCols) {
|
if (tFields != NULL && numFields != numOfCols) {
|
||||||
if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d != raw numOfCols:%d", numFields, numOfCols);
|
if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d not equal to data cols:%d", numFields, numOfCols);
|
||||||
ret = TSDB_CODE_INVALID_PARA;
|
ret = TSDB_CODE_INVALID_PARA;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if (tFields != NULL && numFields > boundInfo->numOfBound) {
|
if (tFields != NULL && numFields > boundInfo->numOfBound) {
|
||||||
if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d > boundInfo->numOfBound:%d", numFields, boundInfo->numOfBound);
|
if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d bigger than num of bound cols:%d", numFields, boundInfo->numOfBound);
|
||||||
ret = TSDB_CODE_INVALID_PARA;
|
ret = TSDB_CODE_INVALID_PARA;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
@ -702,8 +707,8 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
|
||||||
SSchema* pColSchema = &pSchema[j];
|
SSchema* pColSchema = &pSchema[j];
|
||||||
SColData* pCol = taosArrayGet(pTableCxt->pData->aCol, j);
|
SColData* pCol = taosArrayGet(pTableCxt->pData->aCol, j);
|
||||||
if (*fields != pColSchema->type && *(int32_t*)(fields + sizeof(int8_t)) != pColSchema->bytes) {
|
if (*fields != pColSchema->type && *(int32_t*)(fields + sizeof(int8_t)) != pColSchema->bytes) {
|
||||||
if (errstr != NULL) snprintf(errstr, errstrLen, "type or bytes not equal, id:%d, type:%d, raw type:%d. bytes:%d, raw bytes:%d",
|
if (errstr != NULL) snprintf(errstr, errstrLen, "column type or bytes not equal, name:%s, schema type:%s, bytes:%d, data type:%s, bytes:%d",
|
||||||
pColSchema->colId, pColSchema->type, *fields, pColSchema->bytes, *(int32_t*)(fields + sizeof(int8_t)));
|
pColSchema->name, tDataTypes[pColSchema->type].name, pColSchema->bytes, tDataTypes[*fields].name, *(int32_t*)(fields + sizeof(int8_t)));
|
||||||
ret = TSDB_CODE_INVALID_PARA;
|
ret = TSDB_CODE_INVALID_PARA;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
@ -732,8 +737,8 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
|
||||||
SSchema* pColSchema = &pSchema[j];
|
SSchema* pColSchema = &pSchema[j];
|
||||||
if (strcmp(pColSchema->name, tFields[i].name) == 0) {
|
if (strcmp(pColSchema->name, tFields[i].name) == 0) {
|
||||||
if (*fields != pColSchema->type && *(int32_t*)(fields + sizeof(int8_t)) != pColSchema->bytes) {
|
if (*fields != pColSchema->type && *(int32_t*)(fields + sizeof(int8_t)) != pColSchema->bytes) {
|
||||||
if (errstr != NULL) snprintf(errstr, errstrLen, "type or bytes not equal, id:%d, type:%d, raw type:%d. bytes:%d, raw bytes:%d",
|
if (errstr != NULL) snprintf(errstr, errstrLen, "column type or bytes not equal, name:%s, schema type:%s, bytes:%d, data type:%s, bytes:%d",
|
||||||
pColSchema->colId, pColSchema->type, *fields, pColSchema->bytes, *(int32_t*)(fields + sizeof(int8_t)));
|
pColSchema->name, tDataTypes[pColSchema->type].name, pColSchema->bytes, tDataTypes[*fields].name, *(int32_t*)(fields + sizeof(int8_t)));
|
||||||
ret = TSDB_CODE_INVALID_PARA;
|
ret = TSDB_CODE_INVALID_PARA;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -463,7 +463,7 @@ _DEL_WAL:
|
||||||
pSyncNode->snapshottingIndex, lastApplyIndex);
|
pSyncNode->snapshottingIndex, lastApplyIndex);
|
||||||
} else {
|
} else {
|
||||||
sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64,
|
sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64,
|
||||||
terrstr(terrno), pSyncNode->snapshottingIndex, lastApplyIndex);
|
terrstr(), pSyncNode->snapshottingIndex, lastApplyIndex);
|
||||||
atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID);
|
atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -224,6 +224,7 @@ static void *tAutoQWorkerThreadFp(SQueueWorker *worker) {
|
||||||
|
|
||||||
taosUpdateItemSize(qinfo.queue, 1);
|
taosUpdateItemSize(qinfo.queue, 1);
|
||||||
}
|
}
|
||||||
|
DestoryThreadLocalRegComp();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 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 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/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
|
||||||
#,,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 -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 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 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 -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
|
||||||
,,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 -R
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2
|
,,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 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 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_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
|
||||||
,,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/leastsquares.py -R
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.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,0')
|
||||||
self.fun_pk_twa(self.database,'derivative',',1s,1')
|
self.fun_pk_twa(self.database,'derivative',',1s,1')
|
||||||
self.fun_pk_unique(self.database,'unique','')
|
self.fun_pk_unique(self.database,'unique','')
|
||||||
# self.fun_pk_last_init(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','')
|
||||||
# self.fun_pk_last(self.database,'last_row','')
|
# self.fun_pk_last(self.database,'last_row','')
|
||||||
# self.fun_pk_first(self.database,'first','')
|
# self.fun_pk_first(self.database,'first','')
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@ class TDTestCase(TDTestCase):
|
||||||
# self.fun_pk_twa(self.database,'derivative',',1s,0')
|
# self.fun_pk_twa(self.database,'derivative',',1s,0')
|
||||||
# self.fun_pk_twa(self.database,'derivative',',1s,1')
|
# self.fun_pk_twa(self.database,'derivative',',1s,1')
|
||||||
# self.fun_pk_unique(self.database,'unique','')
|
# self.fun_pk_unique(self.database,'unique','')
|
||||||
self.fun_pk_last_init(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','')
|
||||||
self.fun_pk_last(self.database,'last_row','')
|
self.fun_pk_last(self.database,'last_row','')
|
||||||
self.fun_pk_first(self.database,'first','')
|
self.fun_pk_first(self.database,'first','')
|
||||||
|
|
||||||
self.query_pk_fun(self.database,'')
|
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,'')
|
||||||
# self.touying_pk_where(self.database,'tags')
|
# self.touying_pk_where(self.database,'tags')
|
||||||
# self.touying_pk_where(self.database,'distinct')
|
# self.touying_pk_where(self.database,'distinct')
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TDTestCase(TDTestCase):
|
||||||
|
|
||||||
# self.query_pk_fun(self.database,'')
|
# 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,'')
|
||||||
# self.touying_pk_where(self.database,'tags')
|
# self.touying_pk_where(self.database,'tags')
|
||||||
# self.touying_pk_where(self.database,'distinct')
|
# self.touying_pk_where(self.database,'distinct')
|
||||||
|
|
|
@ -36,9 +36,9 @@ class TDTestCase(TDTestCase):
|
||||||
|
|
||||||
# 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,'')
|
||||||
self.touying_pk_where(self.database,'tags')
|
# self.touying_pk_where(self.database,'tags')
|
||||||
self.touying_pk_where(self.database,'distinct')
|
self.touying_pk_where(self.database,'distinct')
|
||||||
self.count_pk(self.database,1)
|
# self.count_pk(self.database,1)
|
||||||
|
|
||||||
endTime = time.time()
|
endTime = time.time()
|
||||||
print("total time %ds" % (endTime - startTime))
|
print("total time %ds" % (endTime - startTime))
|
||||||
|
|
|
@ -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())
|
|
@ -429,7 +429,7 @@ void printfIntroduction(bool community) {
|
||||||
printf(" * ------------------------------------------------------------------------------------ *\n");
|
printf(" * ------------------------------------------------------------------------------------ *\n");
|
||||||
printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n");
|
printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n");
|
||||||
printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n");
|
printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n");
|
||||||
printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n");
|
printf(" * Enterprise or TDengine Cloud. Learn more at https://tdengine.com *\n");
|
||||||
}
|
}
|
||||||
printf(" ****************************************************************************************\n\n");
|
printf(" ****************************************************************************************\n\n");
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ void printfIntroduction(bool community) {
|
||||||
void showAD(bool end) {
|
void showAD(bool end) {
|
||||||
printf(" You are using TDengine OSS. To experience advanced features, like backup/restore, \n");
|
printf(" You are using TDengine OSS. To experience advanced features, like backup/restore, \n");
|
||||||
printf(" privilege control and more, or receive 7x24 technical support, try TDengine Enterprise \n");
|
printf(" privilege control and more, or receive 7x24 technical support, try TDengine Enterprise \n");
|
||||||
printf(" or Free Cloud Trial. Learn more at https://tdengine.com \n");
|
printf(" or TDengine Cloud. Learn more at https://tdengine.com \n");
|
||||||
printf(" \n");
|
printf(" \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ static void shellWriteHistory();
|
||||||
static void shellPrintError(TAOS_RES *tres, int64_t st);
|
static void shellPrintError(TAOS_RES *tres, int64_t st);
|
||||||
static bool shellIsCommentLine(char *line);
|
static bool shellIsCommentLine(char *line);
|
||||||
static void shellSourceFile(const char *file);
|
static void shellSourceFile(const char *file);
|
||||||
static bool shellGetGrantInfo();
|
static bool shellGetGrantInfo(char* buf);
|
||||||
|
|
||||||
static void shellCleanup(void *arg);
|
static void shellCleanup(void *arg);
|
||||||
static void *shellCancelHandler(void *arg);
|
static void *shellCancelHandler(void *arg);
|
||||||
|
|
Loading…
Reference in New Issue