Bug #5159 Views: Comments are not preserved
Submitted: 23 Aug 2004 1:42 Modified: 4 Aug 2005 3:03
Reporter: Peter Gulutzan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Views Severity:S4 (Feature request)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: CPU Architecture:Any

[23 Aug 2004 1:42] Peter Gulutzan
Description:
This is a feature request. 
 
I think that if I put a comment in a view definition, 
the comment should stay so I can see it with SHOW 
CREATE VIEW. But MySQL destroys the comment. 
 

How to repeat:
mysql> create view v9a as select 9 /* I want this comment to stay */; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> show create view v9a; 
+-------+----------------------------------------+ 
| Table | Create Table                           | 
+-------+----------------------------------------+ 
| v9a   | CREATE VIEW db5.v9a AS select 9 AS `9` | 
+-------+----------------------------------------+ 
1 row in set (0.00 sec)
[2 Sep 2006 9:12] Valeriy Kravchuk
Bug #19602 was marked as a duplicate of this one. Will this feature, one of the most often requested, ever be implemented?
[3 Oct 2008 21:10] Konstantin Osipov
Bug#13109 was marked a duplicate of this bug.
[4 Oct 2008 9:46] Konstantin Osipov
Bug #14369 Views are stored without text formatting was marked a duplicate of this bug.
[4 Oct 2008 10:13] Konstantin Osipov
See also Bug#15344 which requests a similar feature.
[6 Oct 2008 15:10] Valeriy Kravchuk
Bug #11082 was marked as a duplicate of this one.
[16 Feb 2009 5:59] Valeriy Kravchuk
Bug #42870, "I_S.VIEWS VIEW_DEFINITION stores in lower", was marked as a duplicate of this one.
[16 Feb 2009 6:27] Jared S
http://bugs.mysql.com/bug.php?id=5159 is duplicate of this.
[16 Feb 2009 6:29] Jared S
Oops, http://bugs.mysql.com/bug.php?id=38137 is duplicate of this.
[13 Mar 2009 13:13] Pierre de LESPINAY
Where are we with this issue ?
Is ALTER VIEW in ANSI specifications ?
I'm not sure.
Who uses ALTER VIEW instead of DROP/CREATE ?
Isn't it the only problem why we can't keep the formatting in views ?
[28 May 2009 12:48] Susanne Ebrecht
Bug #38137 is a duplicate of this bug here.
[15 Nov 2012 11:18] Pavel Dobryakov
There-do you have  any plans to fix this problem?
[6 Jul 2017 22:51] Bruno Aquino Filardi Filho
Please put this feature! Anyone working on this?
[20 Jul 2017 11:09] Paolo Puddu
Allowing comments to views would prevent me having to have maintain separate documentation for explaining some of the calculated fields I am producing in the view.
I would appreciate this feature being added.
Thanks
[20 Jul 2017 11:19] Federico Razzoli
This feature request is 18 years old now. People still express interest about this and other related feature requests. You may not consider it vital, but please don't understimate what Bruno Aquino Filardi Filho wrote: self documenting database is really important.
[12 Apr 2019 16:42] Truphone DBA
Will we see this in MySQL 8.0 stream?
[17 Jan 2020 12:35] Razvan Cucos
Issue still persists in version 8.0.18. Seems this "feature" is considered of next to no importance, as this thread is almost 16 years old with no change.
[11 Aug 2020 6:54] Turker Tunali
It is very hard to use MySQL when we lost all the information about views, procedures, functions when we save it.
[11 Aug 2020 12:07] Federico Razzoli
You don't lose comments in procedures and functions. Only views.
[2 Aug 2023 10:05] Sébastien F.
It would be appreciated :)