#3820 (ok 4.3) hide_db, only_db not working in left panel

4.2.5
fixed
None
1
2014-12-05
2013-02-11
Timo Gurr
No

$cfg['Servers'][$i]['hide_db'] = '^(information_schema|performance_schema|mysql)$';

Does work in 3.5.6 but doesn't seem to do anything in 4.0.0(_beta1). I also tried something simpler without regex but it also doesn't work, the databases are still displayed in the navigation sidebar.

Discussion

1 2 > >> (Page 1 of 2)
  • Marc Delisle

    Marc Delisle - 2013-02-13

    However, hide_db works in the Databases tab.

     
  • Marc Delisle

    Marc Delisle - 2013-02-14

    Also, the only_db directive is not respected in the navigation panel.

    Rouslan, any particular reason why PMA_DBI_get_databases_full() was not used in the navigation?

     
  • Rouslan Placella

    I'm not sure how using PMA_DBI_get_databases_full would help with this bug. I had a look at that function, it doesn't do any filtering on hide_db or only_db. And it's slow...

     
  • Michal Čihař

    Michal Čihař - 2013-02-14

    The Node should use PMA_List_Database class for listing databases or integrate it's functionality - it was only used in navigation and current is not used at all.

     
  • Marc Delisle

    Marc Delisle - 2013-02-14

    Talking about being slow, we had to add the DisableIS directive which disables the use of information_schema, and it's true by default. The reason is explained in Documentation.html for this directive.
    So, PMA_DBI_get_databases_full(), by default, executes the "else" part starting with
    foreach ($GLOBALS['pma']->databases as $database_name) {

    and this references the object created with libraries/PMA.php, which does the filtering later in the code (see checkHideDatabase() in libraries/List_Database.class.php).

     
  • Marc Delisle

    Marc Delisle - 2013-02-14

    Michal, PMA_List_Database is used, that's why in the Databases tab, the hide_db and only_db directives work.

     
  • Rouslan Placella

    @nijel: It's used in the PMA class

    @lem9: I know about the DisableIS directive, the Node class uses that, too.
    So, what you're saying is that if DisableIS is set to false, the code will run the if clause instead of the else clause, thus ignoring the hide_db and only_db directives? That sounds like another bug to me...

     
    • Michal Čihař

      Michal Čihař - 2013-02-14

      Ah okay, I did miss that PMA class overrides __get method.

      Also it should do filtering in both cases - in if(!DisableIS) there is array_diff against filtered database list, the else part uses that directly. I can say I understand fully the logic, but it seems to do the filtering in both cases.

       
  • Marc Delisle

    Marc Delisle - 2013-02-14

    Rouslan,
    if DisableIS is set to false, the "if" clause will run but the hide_db and only_db directives are obeyed, I just tested the case.

     
  • Marc Delisle

    Marc Delisle - 2013-02-17
    • summary: hide_db not working --> hide_db, only_db not working in left panel
     
  • Marc Delisle

    Marc Delisle - 2013-02-23
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2013-02-24
    • assigned_to: Marc Delisle --> nobody
     
  • Marc Delisle

    Marc Delisle - 2013-03-07
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2013-03-12
    • status: open --> closed-fixed
     
  • Marc Delisle

    Marc Delisle - 2013-03-16
    • status: closed-fixed --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2013-03-17
    • Status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
  • rjk

    rjk - 2014-06-30

    This appears to be broken again in 4.2.5. Regex works correctly in Databases tab, but not in left panel. Have not tested any other versions at this time.

    EDIT: using hide_db, haven't tested only_db yet either.

     
    Last edit: rjk 2014-06-30
  • Marc Delisle

    Marc Delisle - 2014-07-08
    • status: fixed --> open
    • assigned_to: Marc Delisle --> nobody
    • Group: 4.0.0 --> 4.2.5
     
  • Madhura Jayaratne

    • assigned_to: Madhura Jayaratne
     
  • Madhura Jayaratne

    This should be fixed when PR #1375[1] is merged. I've tested both only_db and hide_db directives when DisableIS = true as well as when DisableIS = false.

    [1] https://github.com/phpmyadmin/phpmyadmin/pull/1375

     
  • Madhura Jayaratne

    • summary: hide_db, only_db not working in left panel --> (ok 4.3) hide_db, only_db not working in left panel
    • status: open --> resolved
    • Priority: 5 --> 1
     
1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks