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

Wrong VIEW column data type for COALESCE(int_column)

    XMLWordPrintable

    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

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: