Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-589

Unexpected behaviors for utf8mb4 in MariaDbClob.

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0, 2.4.0
    • Other
    • None

    Description

      In the MariaDbClob.getSubString use java.lang.String.substring but MariaDbClob.length uses codePointCount.

      It means String will be truncated unexpectedly in next code if String contains 4 byte UTF-8. because Java uses 2 chars for 4 byte unicode.

      clob.getSubString(1L, (int)clob.length());

      It makes issue with mybatis ClobTypeHandler.
      https://github.com/mybatis/mybatis-3/blob/master/src/main/java/org/apache/ibatis/type/ClobTypeHandler.java

      Attachments

        Activity

          hackexpert Jicheol Ryu created issue -
          diego dupin Diego Dupin made changes -
          Field Original Value New Value
          Fix Version/s 2.4.0 [ 23154 ]
          diego dupin Diego Dupin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          diego dupin Diego Dupin made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          diego dupin Diego Dupin made changes -
          Labels need_feedback
          diego dupin Diego Dupin made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          diego dupin Diego Dupin made changes -
          Priority Critical [ 2 ] Major [ 3 ]
          diego dupin Diego Dupin made changes -
          Fix Version/s 1.8.0 [ 23312 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 86060 ] MariaDB v4 [ 135055 ]

          People

            diego dupin Diego Dupin
            hackexpert Jicheol Ryu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.