MySQL Stand-in structure for view. What is it?

前端 未结 1 474
旧时难觅i
旧时难觅i 2021-01-13 12:43

We \'ve been exporting a database using phpmyadmin 4. The database contains some views and before the usual CREATE VIEW command there is a CREATE TABLE command with a comme

相关标签:
1条回答
  • 2021-01-13 12:51

    A "stand-in" or "standin" structure is a table that is created from a view, that has the same structure as the view. It is used to ensure dependencies are met when a number of interdependent views are being exported.

    I'm not sure why the export should fail if the stand-in structures are present (the implication of having these is actually the reverse), but there could be a bug in the process. I'd have to see the relevant section of the export file to really tell.

    The phpmyadmin sourceforge site mentions the use of stand-in structures in bug #3846 (http://sourceforge.net/p/phpmyadmin/bugs/3846/):

    When exporting, phpMyAdmin creates a stand-in structure for the view (with CREATE TABLE), then later it drops this table and uses CREATE VIEW.

    and there is another reference in the comments for phpmyadmin bug #11711 on github (https://github.com/phpmyadmin/phpmyadmin/commit/2f2b505):

    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.

    0 讨论(0)
提交回复
热议问题