Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1(EOL), 10.2(EOL), 10.3(EOL)
    • 10.3.1
    • OTHER

    Description

      SELECT 2 DIV 1;
      

      Field   1:  `2 DIV 1`
      Type:       LONGLONG
      Collation:  binary (63)
      Length:     1
      Max_length: 1
      Decimals:   0
      Flags:      BINARY NUM
      

      CREATE OR REPLACE TABLE t1 AS SELECT 2 DIV 1 AS c;
      DESCRIBE t1;
      

      +-------+--------+------+-----+---------+-------+
      | Field | Type   | Null | Key | Default | Extra |
      +-------+--------+------+-----+---------+-------+
      | c     | int(1) | YES  |     | NULL    |       |
      +-------+--------+------+-----+---------+-------+
      

      Notice, result set metadata for SELECT 2 DIV 1 reports the data type as LONGLONG. This looks wrong.
      A CREATE..SELECT query for the same expression correctly makes an INT column.
      Result set metadata should be fixed to report LONG for all DIV expressions creating an INT column. LONGLONG should be reported only for DIV making a BIGINT column in CREATE..SELECT.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            Pushed into bb-10.2-ext

            bar Alexander Barkov added a comment - Pushed into bb-10.2-ext
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2017-05-21 05:35:05.0 2017-05-21 05:35:05.129
            bar Alexander Barkov made changes -
            Fix Version/s 10.3.1 [ 22532 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 80868 ] MariaDB v4 [ 152186 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.