#3846 PMA doesn't recognise views on drop / export / import

3.5.7
works-for-me
5
2013-06-11
2013-03-14
Fiber
No

PHPMyadmin doesn't recognise views on drop, create: tries to handle like a table.

For example, I have a view_userinfo view, if I export the database, the query assoicated with the view is:
CREATE TABLE IF NOT EXISTS view_userlist (.....

(I prefer to create views with view_ prefix);

Same happens when I want to drop a view trough the myadmin's UI, it creates a "DROP TABLE view_name" query instead of "DROP VIEW view_name";

MyAdmin V: 3.5.7
MySql V: 5.0.51a-24+lenny5-log - (Debian)
libmysql: 5.0.51a

Discussion

  • Marc Delisle

    Marc Delisle - 2013-03-18

    (I tested with phpMyAdmin 3.5.7, mysqli and mysqlnd, PHP 5.4.10, MySQL 5.6.4).

    When exporting, phpMyAdmin creates a stand-in structure for the view (with CREATE TABLE), then later it drops this table and uses CREATE VIEW. Did you try to import your exported database? You should find that everything is all right.

    When clicking on Drop, I see a "DROP VIEW" statement generated.

     
  • Marc Delisle

    Marc Delisle - 2013-03-18
    • status: open --> pending
    • assigned_to: Marc Delisle
     
  • Fiber

    Fiber - 2013-03-18

    You are right, I can't reproduce it either. It happened more than twice, probably I looked over something on dropping / exporting the tables and that caused this.
    If it happens again, I'll look into it more thoroughly.

    Sorry for wasting your time :(

     
    Last edit: Fiber 2013-03-18
  • Marc Delisle

    Marc Delisle - 2013-03-18
    • status: pending --> closed-works-for-me
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-works-for-me --> works-for-me