[MDEV-5700] Cannot SHOW CREATE VIEW if underlying tabels are ALTERed Created: 2014-02-18 Updated: 2014-04-18 Resolved: 2014-04-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.1.67, 5.2.14, 5.3.12, 5.5.35, 10.0.8 |
| Fix Version/s: | 5.5.37, 10.0.11 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jonathan Monahan | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Environment: |
Ubuntu Precise Pangolin |
||
| Description |
|
From MySQL bug #61718 (see below for explanation why): Description: This ia a problem because the VIEW definition needs to be adjusted. That can be difficult it you cannot display it as it was created. Affects various GUI clients. How to repeat:
So workaround is to SELECT from I_S. Suggested fix: ----------- We use MariaDb, and Oracle make registering and entering a comment on an existing bug way too difficult! This issue was originally raised as MySQL bug #54139 (1 June 2010) and then again as bug #61718 (1 July 2011) with more information. However, #61718 is closed, but the only progress was to note it as a known bug in the 5.7.0 changelog! It is noted that it affects late versions of 5.0, 5.1, 5.5, etc onwards. Meanwhile bug #54139 was closed as a duplicate of #61718 on 10 January 2013, so there is no open bug report anywhere, and just an acknowledgement of the bug in the 5.7.0 changelog. There is a workaround:
but all of the sensible SQL commands for displaying the VIEW no longer work:
This just makes diagnosing a problem with a VIEW difficult - if you cannot see the definition of the VIEW then you cannot work out what needs to be fixed: the VIEW or the underlying tables (and which ones). There is a comment on bug #61718: Hopefully MariaDb can make better progress... |
| Comments |
| Comment by Elena Stepanova [ 2014-02-18 ] | ||||||||||||||||||||||||||||
|
Despite obscure information in the public reports or the lack thereof, the bug is actually fixed in 5.7. Now SHOW CREATE VIEW produces the desired output with a warning about referenced tables. Here is the commit comment which provides more details:
It would be nice to backport the bugfix into 10.0 line if possible. |