From 22ce652c3436df930ba1240d0c1bfb525dfad4ab 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 ec11af45bc497..bfc08aec500dd 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 b8592356e352f..fd093c4796347 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3689,7 +3689,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 e29cb2f9647b10dde41e9f4085ac5190f2aa9910 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 bfc08aec500dd..fcb5498093a49 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 3c38a59e5aa7f..f9ed05e7f5e1e 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 8db35487191aa..41f5d1078a5a3 100644 --- a/develop/dev-guide-third-party-tools-compatibility.md +++ b/develop/dev-guide-third-party-tools-compatibility.md @@ -131,7 +131,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 fd093c4796347..ad2199b130ef1 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3703,7 +3703,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 7c12ded737eae..c6173d98bb2fd 100644 --- a/tidb-cloud/secure-connections-to-serverless-clusters.md +++ b/tidb-cloud/secure-connections-to-serverless-clusters.md @@ -70,7 +70,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 b652c93506043..74f1451e7ab58 100644 --- a/tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md +++ b/tidb-cloud/tidb-cloud-tls-connect-to-dedicated.md @@ -76,7 +76,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 af197b82d418c..f03a04812eff6 100644 --- a/tispark-overview.md +++ b/tispark-overview.md @@ -342,7 +342,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 099fd88548f2006bc6e3b273ebac4cef3960d30c 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 ad2199b130ef1..1fc743af04f69 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3689,7 +3689,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 3271eef3843220b8cdd5cece5b5383777b24b788 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 1fc743af04f69..b6d9bd935e7ba 100644 --- a/system-variables.md +++ b/system-variables.md @@ -3689,7 +3689,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 |