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

Wrong VIEW column data type for COALESCE(int_column)

Details

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT);
      CREATE OR REPLACE VIEW v1 AS SELECT COALESCE(a) FROM t1;
      DESCRIBE v1;
      

      +-------------+------------+------+-----+---------+-------+
      | Field       | Type       | Null | Key | Default | Extra |
      +-------------+------------+------+-----+---------+-------+
      | COALESCE(a) | bigint(11) | YES  |     | NULL    |       |
      +-------------+------------+------+-----+---------+-------+
      

      Notice, the column data type is bigint. The expected data type is int, like in the table t1.

      Attachments

        Activity

          Pushed to bb-10.2-ext.

          Reporting 5 hours, as it took around 15 hours for a joint patch fixing 3 bugs:

          • MDEV-12875 Wrong VIEW column data type for COALESCE(int_column)
          • MDEV-12886 Different default for INT and BIGINT column in a VIEW for a SELECT with ROLLUP
          • MDEV-12916 Wrong column data type for an INT field of a cursor-anchored ROW variable
          bar Alexander Barkov added a comment - Pushed to bb-10.2-ext. Reporting 5 hours, as it took around 15 hours for a joint patch fixing 3 bugs: MDEV-12875 Wrong VIEW column data type for COALESCE(int_column) MDEV-12886 Different default for INT and BIGINT column in a VIEW for a SELECT with ROLLUP MDEV-12916 Wrong column data type for an INT field of a cursor-anchored ROW variable

          People

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