Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-29060

can not set rewriteBatchedStatements parameter for JDBC catalog for MySQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.15.1
    • 1.20.0
    • Connectors / JDBC
    • None

    Description

      execute following code in sql-client.sh

      CREATE CATALOG mysql_bnpmp3 WITH(
       'type' = 'jdbc',
       'default-database' = 'gem_tmp',
       'username' = 'bnpmp',
       'password' = '*********',
       'base-url' = 'jdbc:mysql://hb3-prod-mysql:32759?rewriteBatchedStatements=true'
      );

      output an error

      [ERROR] Could not execute SQL statement. Reason:
      java.lang.IllegalArgumentException: No enum constant com.mysql.cj.conf.BooleanPropertyDefinition.AllowableValues."TRUE"/GEM_TMP

      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.

      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)'
      );
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            macdoor615 macdoor615
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: