Skip to content

Commit

Permalink
Fixes ##11711 Clarify the meaning of "Stand-in structure for view" in…
Browse files Browse the repository at this point in the history
… SQL export

Signed-off-by: Marc Delisle <marc@infomarc.info>
  • Loading branch information
lem9 committed Dec 2, 2015
1 parent f4358bb commit 2f2b505
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -21,6 +21,7 @@ phpMyAdmin - ChangeLog
- issue #11668 Table header is empty with browsing an empty table
+ issue #11701 Allow changing parameter order of routines
- issue #11708 Remove no password warning
+ issue #11711 Clarify the meaning of "Stand-in structure for view" in SQL export

4.5.3.0 (not yet released)
- issue #11664 Online syntax verifier bug - "IF" on SELECT statement
Expand Down
5 changes: 4 additions & 1 deletion libraries/plugins/export/ExportSql.php
Expand Up @@ -2084,7 +2084,10 @@ public function exportStructure(
$dump .= $this->_exportComment(
__('Stand-in structure for view') . ' ' . $formatted_table_name
)
. $this->_exportComment();
. $this->_exportComment(
__('(See below for the actual view)')
)
. $this->_exportComment();
// export a stand-in definition to resolve view dependencies
$dump .= $this->getTableDefStandIn($db, $table, $crlf, $aliases);
} // end switch
Expand Down

7 comments on commit 2f2b505

@offsides
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that works just fine. I'm curious as to why the stand-in structure is even needed if there's a view, but that's a separate discussion :)

@lem9
Copy link
Contributor Author

@lem9 lem9 commented on 2f2b505 Dec 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@offsides
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not completely clear on why the stand-in table is required during the export, but I think I get it well enough, and that's OK. Thanks for the additional explanation.

@lem9
Copy link
Contributor Author

@lem9 lem9 commented on 2f2b505 Dec 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View A may depend on another view B that is defined below, so the view A creation would fail if we did not use stand-in. Dependencies may be more complex that that, so instead of computing all dependencies we use stand-ins.

@offsides
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so it's not that you can't do just views, it's that it's a lot easier to do stand-ins which also makes it harder to mess up. That makes sense. Thanks again for the explanation - perhaps it should go in the FAQ?

@lem9
Copy link
Contributor Author

@lem9 lem9 commented on 2f2b505 Dec 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@offsides Well, F means Frequently and I don't remember seeing this question during the 9 years since the implementation.

@offsides
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. :)

Please sign in to comment.