You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "macdoor615 (Jira)" <ji...@apache.org> on 2022/08/22 11:01:00 UTC

[jira] [Created] (FLINK-29060) can not set rewriteBatchedStatements parameter for JDBC catalog for MySQL

macdoor615 created FLINK-29060:
----------------------------------

             Summary: can not set rewriteBatchedStatements parameter for JDBC catalog for MySQL
                 Key: FLINK-29060
                 URL: https://issues.apache.org/jira/browse/FLINK-29060
             Project: Flink
          Issue Type: Bug
          Components: Connectors / JDBC
    Affects Versions: 1.15.1
            Reporter: macdoor615
             Fix For: 1.16.0


execute following code in sql-client.sh
{code:java}
CREATE CATALOG mysql_bnpmp3 WITH(
 'type' = 'jdbc',
 'default-database' = 'gem_tmp',
 'username' = 'bnpmp',
 'password' = '*********',
 'base-url' = 'jdbc:mysql://hb3-prod-mysql:32759?rewriteBatchedStatements=true'
);{code}
output an error
{code:java}
[ERROR] Could not execute SQL statement. Reason:
java.lang.IllegalArgumentException: No enum constant com.mysql.cj.conf.BooleanPropertyDefinition.AllowableValues."TRUE"/GEM_TMP{code}
rewriteBatchedStatements is a very import parameter, without it, data insertion performance will be very poor. 


I found a trick to overcome this problem. I changed jdbcUrl format and it works.
{code:java}
CREATE CATALOG mysql_bnpmp WITH(
    'type' = 'jdbc',
    'default-database' = 'gem_tmp',
    'username' = 'bnpmp',
    'password' = '*******',
    'base-url' = 'jdbc:mysql://(host=hb3-prod-mysql,port=32759,rewriteBatchedStatements=true)'
);
 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)