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

JDBC connector reads incorrect data from unix socket when the text is too large

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.9, 3.0.10, 3.1.2
    • 3.1.3
    • Other
    • None
    • Linux, Mac OS, 10.10.3-MariaDB, penJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode)

    Description

      I created the following table:

      create table test_table
      (
          int_column int        null,
          mediumtext_column     mediumtext null
      )
          collate = utf8mb3_bin;
      

      I stored 100 in the int_column and a large text (30000 chars) in the mediumtext_colum.
      Then I read the data via Unix socket (jdbc:mariadb:///test-int?user=<user>>&password=<password>&localSocket=/tmp/mysql.sock).

      Instead of reading the 100 for the int value I get -624824290 and the text length is 98 characters instead of 30000.

      The error does not occur when using a TCP/IP database connection.

      I attached my test case .

      Attachments

        1. TestMariaDBSQLError.java
          3 kB
          Heiko Bensch
        2. trace.log.gz
          20 kB
          Heiko Bensch

        Activity

          People

            diego dupin Diego Dupin
            HBensch Heiko Bensch
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.