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

"Unexpected datatype NULL" in ColumnDefinitionPacket.getDefaultCodec()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.0.4
    • Component/s: Other
    • Labels:
      None

      Description

      This problem was reported for Liquibase: https://github.com/liquibase/liquibase/issues/2431#issue-1116123555

      I ran into that myself via Quarkus: https://github.com/liquibase/liquibase/issues/2431#issuecomment-1028363583

      java.lang.IllegalArgumentException: Unexpected datatype NULL
              at org.mariadb.jdbc.message.server.ColumnDefinitionPacket.getDefaultCodec(ColumnDefinitionPacket.java:396)
              at org.mariadb.jdbc.client.result.Result.getObject(Result.java:601)
              at liquibase.util.JdbcUtil.getResultSetValue(JdbcUtil.java:80)
              at liquibase.executor.jvm.ColumnMapRowMapper.getColumnValue(ColumnMapRowMapper.java:72)
              at liquibase.snapshot.ResultSetCache$ResultSetExtractor$1.getColumnValue(ResultSetCache.java:320)
              at liquibase.executor.jvm.ColumnMapRowMapper.mapRow(ColumnMapRowMapper.java:34)
              at liquibase.executor.jvm.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:72)
              at liquibase.snapshot.ResultSetCache$ResultSetExtractor.extract(ResultSetCache.java:343)
              at liquibase.snapshot.ResultSetCache$ResultSetExtractor.extract(ResultSetCache.java:308)
              at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData$2.fastFetchQuery(JdbcDatabaseSnapshot.java:1032)
              at liquibase.snapshot.ResultSetCache$SingleResultSetExtractor.fastFetch(ResultSetCache.java:367)
              at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:72)
              at liquibase.snapshot.JdbcDatabaseSnapshot$CachingDatabaseMetaData.getTables(JdbcDatabaseSnapshot.java:989)
              at liquibase.snapshot.jvm.TableSnapshotGenerator.snapshotObject(TableSnapshotGenerator.java:34)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:66)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69)
              at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
              at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:312)
              at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:105)
              at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:58)
              at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:34)
              at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:215)
              at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:244)
              at liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(SnapshotGeneratorFactory.java:252)
              at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:109)
              at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1913)
              at liquibase.Liquibase.lambda$update$1(Liquibase.java:226)
              at liquibase.Scope.lambda$child$0(Scope.java:180)
              at liquibase.Scope.child(Scope.java:189)
              at liquibase.Scope.child(Scope.java:179)
              at liquibase.Scope.child(Scope.java:158)
              at liquibase.Liquibase.runInScope(Liquibase.java:2405)
              at liquibase.Liquibase.update(Liquibase.java:211)
              at liquibase.Liquibase.update(Liquibase.java:197)
              at io.quarkus.liquibase.runtime.LiquibaseRecorder.doStartActions(LiquibaseRecorder.java:64)
              [...]
      

      But to me it seems it's more of a regression in MariaDB Connector/J, because Result.getObject() shouldn't just fail like that.

        Attachments

          Activity

            People

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            famod Falko Modler
            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.