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

Regression with unexpected collation error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.5.2
    • 1.5.3
    • Failover
    • None
    • MariaDB 10.1.17 (MacOS X, Ubuntu 16.04), Java 8u102, 64bit

    Description

      A query that worked fine with mariadb-connector-j 1.4.6 is failing with 1.5.2.

      The table structure.

       CREATE TABLE `index` (
        `uid` int(11) NOT NULL DEFAULT '0',
        `term` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
        `prio` int(11) NOT NULL DEFAULT '0',
        `LENGTH` int(11) DEFAULT NULL,
        KEY `ix_ig_term_uid_length` (`term`(191),`uid`,`LENGTH`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
      

      The query.

      SELECT uid,length 
                  FROM index USE INDEX(ix_ig_term_uid_length)
                  WHERE term LIKE "a" COLLATE utf8mb4_unicode_ci
                  GROUP BY uid
                  ORDER BY length,prio DESC
      

      The error message when 1.5.2 is used.

      SQL Error: 1253, SQLState: 42000
      Error preparing query: COLLATION 'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'binary'
      

      The reported server configuration from the obtained connection. This doesn't change between 1.4.6 and 1.5.2.

      ========== DB character set configuration ===========
      character_set_client = utf8mb4
      character_set_connection = utf8mb4
      character_set_database = utf8mb4
      character_set_filesystem = binary
      character_set_results = utf8mb4
      character_set_server = utf8mb4
      character_set_system = utf8
      ========== DB collation configuration ===========
      collation_connection = utf8mb4_general_ci
      collation_database = utf8mb4_general_ci
      collation_server = utf8mb4_general_ci
      

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              Dan Dan
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.