This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit af94177afef11f283c3bddff332c6bb67ba00524 Author: zy-kkk <[email protected]> AuthorDate: Wed Aug 30 17:47:04 2023 +0800 [improvement](jdbc catalog) Remove useless mysql jdbc connection parameters (#23647) --- fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java index dcf144b615..e9fc898b2e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java @@ -300,11 +300,9 @@ public class JdbcResource extends Resource { newJdbcUrl = checkAndSetJdbcBoolParam(newJdbcUrl, "yearIsDateType", "true", "false"); // MySQL Types and Return Values for GetColumnTypeName and GetColumnClassName // are presented in https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-type-conversions.html - // However when tinyInt1isBit=false, GetColumnClassName of MySQL returns java.lang.Boolean, - // while that of Doris returns java.lang.Integer. In order to be compatible with both MySQL and Doris, - // Jdbc params should set tinyInt1isBit=true&transformedBitIsBoolean=true + // When mysql's tinyint stores non-0 or 1, we need to read the data correctly, + // so we need tinyInt1isBit=false newJdbcUrl = checkAndSetJdbcBoolParam(newJdbcUrl, "tinyInt1isBit", "true", "false"); - newJdbcUrl = checkAndSetJdbcBoolParam(newJdbcUrl, "transformedBitIsBoolean", "false", "true"); // set useUnicode and characterEncoding to false and utf-8 newJdbcUrl = checkAndSetJdbcBoolParam(newJdbcUrl, "useUnicode", "false", "true"); newJdbcUrl = checkAndSetJdbcBoolParam(newJdbcUrl, "rewriteBatchedStatements", "false", "true"); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
