[MDEV-12875] Wrong VIEW column data type for COALESCE(int_column) Created: 2017-05-23  Updated: 2017-05-27  Resolved: 2017-05-25

Status: Closed
Project: MariaDB Server
Component/s: Data types, Views
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.3.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype


 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.



 Comments   
Comment by Alexander Barkov [ 2017-05-25 ]

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
Generated at Thu Feb 08 08:01:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.