From 6ba781f578e04e30c67515ec9d95054869f5d5bf Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Oct 2023 17:51:54 +0800 Subject: [PATCH 1/4] Connector/J: fix broken links Signed-off-by: Aolin --- best-practices/java-app-best-practices.md | 2 +- develop/dev-guide-connection-parameters.md | 2 +- system-variables.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/best-practices/java-app-best-practices.md b/best-practices/java-app-best-practices.md index 87cfd77bd0315..a23538c8ba39d 100644 --- a/best-practices/java-app-best-practices.md +++ b/best-practices/java-app-best-practices.md @@ -75,7 +75,7 @@ TiDB supports both methods, but it is preferred that you use the first method, b ### MySQL JDBC parameters -JDBC usually provides implementation-related configurations in the form of JDBC URL parameters. This section introduces [MySQL Connector/J's parameter configurations](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html) (If you use MariaDB, see [MariaDB's parameter configurations](https://mariadb.com/kb/en/library/about-mariadb-connector-j/#optional-url-parameters)). Because this document cannot cover all configuration items, it mainly focuses on several parameters that might affect performance. +JDBC usually provides implementation-related configurations in the form of JDBC URL parameters. This section introduces [MySQL Connector/J's parameter configurations](https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html) (If you use MariaDB, see [MariaDB's parameter configurations](https://mariadb.com/kb/en/library/about-mariadb-connector-j/#optional-url-parameters)). Because this document cannot cover all configuration items, it mainly focuses on several parameters that might affect performance. #### Prepare-related parameters diff --git a/develop/dev-guide-connection-parameters.md b/develop/dev-guide-connection-parameters.md index fb2f3d8f514c1..47f00ff43d55a 100644 --- a/develop/dev-guide-connection-parameters.md +++ b/develop/dev-guide-connection-parameters.md @@ -151,7 +151,7 @@ TiDB supports both methods, but it is preferred that you use the first method, b ### MySQL JDBC parameters -JDBC usually provides implementation-related configurations in the form of JDBC URL parameters. This section introduces [MySQL Connector/J's parameter configurations](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html) (If you use MariaDB, see [MariaDB's parameter configurations](https://mariadb.com/kb/en/library/about-mariadb-connector-j/#optional-url-parameters)). Because this document cannot cover all configuration items, it mainly focuses on several parameters that might affect performance. +JDBC usually provides implementation-related configurations in the form of JDBC URL parameters. This section introduces [MySQL Connector/J's parameter configurations](https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html) (If you use MariaDB, see [MariaDB's parameter configurations](https://mariadb.com/kb/en/library/about-mariadb-connector-j/#optional-url-parameters)). Because this document cannot cover all configuration items, it mainly focuses on several parameters that might affect performance. #### Prepare-related parameters diff --git a/system-variables.md b/system-variables.md index e1664930b875e..01624c058734a 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2800,7 +2800,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - This variable controls whether to allow multiple queries to be executed in the same `COM_QUERY` call. - To reduce the impact of SQL injection attacks, TiDB now prevents multiple queries from being executed in the same `COM_QUERY` call by default. This variable is intended to be used as part of an upgrade path from earlier versions of TiDB. The following behaviors apply: -| Client setting | `tidb_multi_statement_mode` value | Multiple statements permitted? | +| Client setting https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html | ------------------------- | --------------------------------- | ------------------------------ | | Multiple Statements = ON | OFF | Yes | | Multiple Statements = ON | ON | Yes | From 65d23e348cbb44b77af2157b3fa7077af4b8118b Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Oct 2023 18:18:59 +0800 Subject: [PATCH 2/4] fix broken links Signed-off-by: Aolin --- best-practices/java-app-best-practices.md | 2 +- develop/dev-guide-choose-driver-or-orm.md | 2 +- develop/dev-guide-connect-to-tidb.md | 4 ++-- develop/dev-guide-connection-parameters.md | 2 +- develop/dev-guide-third-party-tools-compatibility.md | 2 +- system-variables.md | 2 +- tidb-cloud/secure-connections-to-serverless-clusters.md | 2 +- tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md | 2 +- tispark-overview.md | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/best-practices/java-app-best-practices.md b/best-practices/java-app-best-practices.md index a23538c8ba39d..8dfad98c23b19 100644 --- a/best-practices/java-app-best-practices.md +++ b/best-practices/java-app-best-practices.md @@ -63,7 +63,7 @@ In most scenarios, to improve execution efficiency, JDBC obtains query results i Usually, there are two kinds of processing methods in JDBC: -- [Set `FetchSize` to `Integer.MIN_VALUE`](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-implementation-notes.html#ResultSet) to ensure that the client does not cache. The client will read the execution result from the network connection through `StreamingResult`. +- [Set `FetchSize` to `Integer.MIN_VALUE`](https://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html#ResultSet) to ensure that the client does not cache. The client will read the execution result from the network connection through `StreamingResult`. When the client uses the streaming read method, it needs to finish reading or close `resultset` before continuing to use the statement to make a query. Otherwise, the error `No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.` is returned. diff --git a/develop/dev-guide-choose-driver-or-orm.md b/develop/dev-guide-choose-driver-or-orm.md index be597f4fefd12..b8b4d585a4cea 100644 --- a/develop/dev-guide-choose-driver-or-orm.md +++ b/develop/dev-guide-choose-driver-or-orm.md @@ -27,7 +27,7 @@ This section describes how to use drivers and ORM frameworks in Java. Support level: **Full** -You can follow the [MySQL documentation](https://dev.mysql.com/doc/connector-j/8.0/en/) to download and configure a Java JDBC driver. It is recommended to use MySQL Connector/J 8.0.33 or later with TiDB v6.3.0 and newer. +You can follow the [MySQL documentation](https://dev.mysql.com/doc/connector-j/en/) to download and configure a Java JDBC driver. It is recommended to use MySQL Connector/J 8.0.33 or later with TiDB v6.3.0 and newer. > **Tip:** > diff --git a/develop/dev-guide-connect-to-tidb.md b/develop/dev-guide-connect-to-tidb.md index e36804c067079..bd45269c99e78 100644 --- a/develop/dev-guide-connect-to-tidb.md +++ b/develop/dev-guide-connect-to-tidb.md @@ -45,7 +45,7 @@ mysqlsh --sql mysql://root@:4000 ## JDBC -You can connect to TiDB using the [JDBC](https://dev.mysql.com/doc/connector-j/8.0/en/) driver. To do that, you need to create a `MysqlDataSource` or `MysqlConnectionPoolDataSource` object (both objects support the `DataSource` interface), and then set the connection string using the `setURL` function. +You can connect to TiDB using the [JDBC](https://dev.mysql.com/doc/connector-j/en/) driver. To do that, you need to create a `MysqlDataSource` or `MysqlConnectionPoolDataSource` object (both objects support the `DataSource` interface), and then set the connection string using the `setURL` function. For example: @@ -54,7 +54,7 @@ MysqlDataSource mysqlDataSource = new MysqlDataSource(); mysqlDataSource.setURL("jdbc:mysql://{host}:{port}/{database}?user={username}&password={password}"); ``` -For more information on JDBC connections, see the [JDBC documentation](https://dev.mysql.com/doc/connector-j/8.0/en/) +For more information on JDBC connections, see the [JDBC documentation](https://dev.mysql.com/doc/connector-j/en/) ### Connection parameters diff --git a/develop/dev-guide-connection-parameters.md b/develop/dev-guide-connection-parameters.md index 47f00ff43d55a..f3c7b8fc41aca 100644 --- a/develop/dev-guide-connection-parameters.md +++ b/develop/dev-guide-connection-parameters.md @@ -139,7 +139,7 @@ In most scenarios, to improve execution efficiency, JDBC obtains query results i Usually, there are two kinds of processing methods in JDBC: -- [Set **FetchSize** to `Integer.MIN_VALUE`](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-implementation-notes.html#ResultSet) to ensure that the client does not cache. The client will read the execution result from the network connection through `StreamingResult`. +- [Set **FetchSize** to `Integer.MIN_VALUE`](https://dev.mysql.com/doc/connector-j/en/connector-j-reference-implementation-notes.html#ResultSet) to ensure that the client does not cache. The client will read the execution result from the network connection through `StreamingResult`. When the client uses the streaming read method, it needs to finish reading or close `resultset` before continuing to use the statement to make a query. Otherwise, the error `No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.` is returned. diff --git a/develop/dev-guide-third-party-tools-compatibility.md b/develop/dev-guide-third-party-tools-compatibility.md index a7ef926068483..9130904c0b63b 100644 --- a/develop/dev-guide-third-party-tools-compatibility.md +++ b/develop/dev-guide-third-party-tools-compatibility.md @@ -132,7 +132,7 @@ Do not use the `noIndexUsed()` and `noGoodIndexUsed()` functions in TiDB. **Description** -TiDB does not support the [enablePacketDebug](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connp-props-debugging-profiling.html) parameter. It is a MySQL Connector/J parameter used for debugging that will keep the buffer of the data packet. This might cause the connection to close unexpectedly. **DO NOT** turn it on. +TiDB does not support the [enablePacketDebug](https://dev.mysql.com/doc/connector-j/en/connector-j-connp-props-debugging-profiling.html) parameter. It is a MySQL Connector/J parameter used for debugging that will keep the buffer of the data packet. This might cause the connection to close unexpectedly. **DO NOT** turn it on. **Way to avoid** diff --git a/system-variables.md b/system-variables.md index 01624c058734a..90344bf0f1b8b 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2814,7 +2814,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in > Only the default value of `OFF` can be considered safe. Setting `tidb_multi_statement_mode=ON` might be required if your application was specifically designed for an earlier version of TiDB. If your application requires multiple statement support, it is recommended to use the setting provided by your client library instead of the `tidb_multi_statement_mode` option. For example: > > * [go-sql-driver](https://github.com/go-sql-driver/mysql#multistatements) (`multiStatements`) -> * [Connector/J](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html) (`allowMultiQueries`) +> * [Connector/J](https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html) (`allowMultiQueries`) > * PHP [mysqli](https://www.php.net/manual/en/mysqli.quickstart.multiple-statement.php) (`mysqli_multi_query`) ### tidb_nontransactional_ignore_error New in v6.1.0 diff --git a/tidb-cloud/secure-connections-to-serverless-clusters.md b/tidb-cloud/secure-connections-to-serverless-clusters.md index 60b6ca418bd35..558cbdd052dc3 100644 --- a/tidb-cloud/secure-connections-to-serverless-clusters.md +++ b/tidb-cloud/secure-connections-to-serverless-clusters.md @@ -71,7 +71,7 @@ mycli -u -h -P 4000 -D test --ssl-ca= --ssl-veri
-[MySQL Connector/J](https://dev.mysql.com/doc/connector-j/8.0/en/)'s TLS connection configurations are used here as an example. +[MySQL Connector/J](https://dev.mysql.com/doc/connector-j/en/)'s TLS connection configurations are used here as an example. ``` jdbc:mysql://:4000/test?user=&password=&sslMode=VERIFY_IDENTITY&enabledTLSProtocols=TLSv1.2,TLSv1.3 diff --git a/tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md b/tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md index 3fb2ab6ecc232..b123452b0c715 100644 --- a/tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md +++ b/tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md @@ -77,7 +77,7 @@ Parameter descriptions:
-[MySQL Connector/J](https://dev.mysql.com/doc/connector-j/8.0/en/)'s TLS connection configurations are used here as an example. +[MySQL Connector/J](https://dev.mysql.com/doc/connector-j/en/)'s TLS connection configurations are used here as an example. After downloading TiDB cluster CA, if you want to import it into your operating system, you can use the `keytool -importcert -alias TiDBCACert -file ca.pem -keystore -storepass ` command. diff --git a/tispark-overview.md b/tispark-overview.md index 9c88e5f52e153..9a29ed2d45318 100644 --- a/tispark-overview.md +++ b/tispark-overview.md @@ -340,7 +340,7 @@ spark.tispark.jdbc.client_cert_password jdbc_clientstore_ ``` - For details about how to open TiDB TLS, see [Enable TLS between TiDB Clients and Servers](/enable-tls-between-clients-and-servers.md). -- For details about how to generate a JAVA key store, see [Connecting Securely Using SSL](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html). +- For details about how to generate a JAVA key store, see [Connecting Securely Using SSL](https://dev.mysql.com/doc/connector-j/en/connector-j-reference-using-ssl.html). ### Log4j configuration From 6c02a7f59e168dda10499b4699636a3e5a6e4fa4 Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Oct 2023 19:18:06 +0800 Subject: [PATCH 3/4] Apply suggestions from code review --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 90344bf0f1b8b..7c25f7a13cd82 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2800,7 +2800,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - This variable controls whether to allow multiple queries to be executed in the same `COM_QUERY` call. - To reduce the impact of SQL injection attacks, TiDB now prevents multiple queries from being executed in the same `COM_QUERY` call by default. This variable is intended to be used as part of an upgrade path from earlier versions of TiDB. The following behaviors apply: -| Client setting https://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html +| Client setting | `tidb_multi_statement_mode` value | Multiple statements permitted? | | ------------------------- | --------------------------------- | ------------------------------ | | Multiple Statements = ON | OFF | Yes | | Multiple Statements = ON | ON | Yes | From 0b13cce6a500de0ae7ffc4d95c67ee0f529e3bef Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Oct 2023 19:19:18 +0800 Subject: [PATCH 4/4] Apply suggestions from code review --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 7c25f7a13cd82..927207fe5a4df 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2800,7 +2800,7 @@ As shown in this diagram, when [`tidb_enable_paging`](#tidb_enable_paging-new-in - This variable controls whether to allow multiple queries to be executed in the same `COM_QUERY` call. - To reduce the impact of SQL injection attacks, TiDB now prevents multiple queries from being executed in the same `COM_QUERY` call by default. This variable is intended to be used as part of an upgrade path from earlier versions of TiDB. The following behaviors apply: -| Client setting | `tidb_multi_statement_mode` value | Multiple statements permitted? | +| Client setting | `tidb_multi_statement_mode` value | Multiple statements permitted? | | ------------------------- | --------------------------------- | ------------------------------ | | Multiple Statements = ON | OFF | Yes | | Multiple Statements = ON | ON | Yes |