[
https://issues.apache.org/jira/browse/FLINK-29057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
macdoor615 updated FLINK-29057:
-------------------------------
Description:
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 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}
was:
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 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}
> can not set rewriteBatchedStatements parameter for JDBC catalog for MySQL
> -------------------------------------------------------------------------
>
> Key: FLINK-29057
> URL: https://issues.apache.org/jira/browse/FLINK-29057
> Project: Flink
> Issue Type: Bug
> Components: Connectors / JDBC
> Affects Versions: 1.15.0
> Reporter: macdoor615
> Priority: Major
> 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 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)