Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27023

Type difference when returning integer column value from JAVA in MariaDB 10.2 and MariaDB 10.5

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2.29, 10.5.12
    • 10.5
    • None
    • [DB]
      MariaDB 10.2.29
      MariaDB 10.5.12

      [Development]
      JAVA 1.7
      Mybatis
      Framework spring
      mysql-connector-java-5.1.43-bin.jar

    Description

      [Problem]
      In JAVA, the BOX_CNT column of MariaDB 10.2.29 is returned as a long.
      In JAVA, the BOX_CNT column of MariaDB 10.5.12 is returned as an integer.
      Different versions have different return types, which causes casting problems.
      What is causing the problem?

      [DDL]
      CREATE TABLE `tb_order_item_distbox` (
      `ORDER_ITEM_SEQ` bigint(20) NOT NULL COMMENT '',
      `BOX_SEQ` bigint(20) NOT NULL COMMENT '',
      `ORDER_KG` double(11,2) NOT NULL COMMENT '',
      `FIX_KG` double(11,2) DEFAULT NULL COMMENT '',
      `BOX_CNT` int(11) DEFAULT 1 COMMENT '',
      PRIMARY KEY (`ORDER_ITEM_SEQ`,`BOX_SEQ`),
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';

      [Read Query]
      SELECT A.order_item_seq
      , A.box_seq
      , ifnull(A.box_cnt, 0) box_cnt
      FROM tb_order_item_distbox A

      Attachments

        Activity

          People

            bar Alexander Barkov
            jmlee 이종명
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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