[MDEV-20232] View defined with table value constructor does not preserve given column names Created: 2019-08-01  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.3
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Igor Babaev Assignee: Igor Babaev
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The following demonstrates the problem:

MariaDB [test]> create view v1(a) as  values (3), (7), (1);                                                                                                                                                
                                                                                                                        
MariaDB [test]> show create view v1;                                                                                    
+------+--------------------------------------------------------------------------------------------+----------------------+----------------------+
| View | Create View                                                                                | character_set_client | collation_connection |
+------+--------------------------------------------------------------------------------------------+----------------------+----------------------+
| v1   | CREATE ALGORITHM=UNDEFINED DEFINER=`` SQL SECURITY DEFINER VIEW `v1` AS values (3),(7),(1) | utf8                 | utf8_general_ci      |
+------+--------------------------------------------------------------------------------------------+----------------------+----------------------+
 
MariaDB [test]> select * from v1;
+---+
| 3 |
+---+
| 3 |
| 7 |
| 1 |
+---+


Generated at Thu Feb 08 08:57:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.