<div dir="ltr"><div><div><div><div><div>Hi Marc,<br><br></div>4.1.0 is no worse in this regard than 4.0.x, however given that the performance issues appeared to be the primary reason for the dropping of 5.1 in 4.1 (at least that was the implications from postings in the discussions of the show databases command and disableIS issues), I thought it important to express that, not just so the underlying issue can be resolved for MySQL versions 5.5 and above, but also because a number of distros still ship MySQL 5.1 as its default version, as do multiple shared hosting providers and that keeping 5.1 support would probably benefit a reasonable percentage of your userbase.<br>
<br></div>Unfortunately due to time constraints, offering a fully working solution is not something I am able to do at present, however I can provide my (admittedly horrifically hacky) solution that solves the most severe issue experienced.<br>
<br></div>I added code to getData (libraries/navigation/Nodes/Node.class.php) which is provided at the close of this message. The purpose of this was to simply return a query object that contained the static information based on the only_db contents. This way, the related node building functions did not also need to be edited. For the start of a more complete solution, I would add a check in there to make sure only_db is actually set before building it, otherwise having it fall back over to the non database code, as the code provided will fail if only_db is not set.<br>
<br>The only downside to this base approach is that if an only_db database does not exist, it will still display on the navigation (whereas currently it would not), however its children of course wont as they still use the classic checks. It might however be an opportunity to display that fact, so users who use only_db are informed they have non existent databases in their list.<br>
<br>Following is probably some of the most horrible code to hit the mailing list, but hopefully it gives someone who is more familiar with the PMA codebase an idea. I shall also keep an eye on the mailing list in case I get the time to offer something a little more substantial.<br>
<br><div><br><div>        if ($type == 'databases')<br>        {<br></div><div>                $db_list = $GLOBALS['cfg']['Server']['only_db'];<br>                $query = "SELECT * FROM ( SELECT '";<br>
<br>                if (is_string($db_list))<br>                {<br>                        $db_list = array($db_list);<br>                }<br><br>                if (count($db_list))<br>                {<br>                        $query .= implode("' UNION ALL SELECT '",$db_list);<br>
                        $query .= "' ";<br>                }<br>                return $GLOBALS['dbi']->fetchResult($query . ") as alias");<br>        }<br>        else<br>        {<br></div>
<div>                // ORIGINAL getData CODE<br></div><div>        }<br><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 4:42 AM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Martyn Dale a écrit :<br>
<div class="im">> Hi,<br>
><br>
> Personally I do not think it is advisable to move forward until certain<br>
> issues have been addressed. I am talking about<br>
> <a href="https://sourceforge.net/p/phpmyadmin/bugs/3944" target="_blank">https://sourceforge.net/p/phpmyadmin/bugs/3944</a> and related bug reports.<br>
><br>
> The alleged solution for 4.1 is requiring MySQL 5.5 as a minimum version.<br>
> This is not going to solve the problems that people have reported when<br>
> using the 4.x series with large systems, since while 5.5 is better than 5.1<br>
> and below, a full directory scan can still be triggered by any number of<br>
> combinations of variables as described here:<br>
> <a href="http://dev.mysql.com/doc/refman/5.6/en/information-schema-optimization.html" target="_blank">http://dev.mysql.com/doc/refman/5.6/en/information-schema-optimization.html</a><br>
><br>
> I explained this in that bug report where i showed PMAs default usage of IS<br>
</div>> for the navigation on a *5.6* system (with innodb_stats_on_metadata<br>
<div class="im">> switched off). While that was just a 2 second example, I have seen that get<br>
> up to 60 seconds before query killers kick in. Reports of users on shared<br>
> hosting accounts, where this kind of behavior can get users accounts<br>
> terminated has also already been reported (<br>
> <a href="https://sourceforge.net/p/phpmyadmin/bugs/3945" target="_blank">https://sourceforge.net/p/phpmyadmin/bugs/3945</a>, second page "Here is what<br>
</div>> one provider sent as a warning before *deleting my account*")<br>
<div class="im">><br>
> If you remove the use of disableIS and related functionality, it will not<br>
> solve any issues. Take the SCHEMATA queries for example for getting<br>
> database lists, this still effectively does a full directory scan, as<br>
> documented: <a href="http://dev.mysql.com/doc/refman/5.6/en/schemata-table.html" target="_blank">http://dev.mysql.com/doc/refman/5.6/en/schemata-table.html</a><br>
> In this case for example, switching to IS to avoid using the slow<br>
> performing show databases is redundant since they basically do the same<br>
> thing. As a basic example, take a directory, with tens of thousands of<br>
> files, and attempt to do an ls in it, even unsorted (-U) it will take a<br>
> long time, simply because traversal of the filesystem takes time. Requiring<br>
> higher versions isnt going to miraculously speed up the iteration of<br>
> directories.<br>
><br>
</div>> On a similar note, when I referenced *innodb_stats_on_metadata *in earlier<br>
<div class="im">> mentioned bug report, I was using it as an example of why relying on IS can<br>
> be as bad, or worse than directly doing a show tables, since it can<br>
> potentially end up doing additional work.<br>
> I am pretty worried that modifying the variable was considered as a<br>
> potential solution. The description of that very setting describes how it<br>
> affects how the system handles IS queries. An administrator should be able<br>
> to trust that installing something like PMA is not going to change any<br>
> system variables that could otherwise affect the operation of the system<br>
><br>
> Thank you for your consideration.<br>
><br>
> Regards,<br>
> Martyn<br>
<br>
</div>Thanks Martyn for your report. We'll discuss this issue before taking a<br>
decision about 4.1.0-rc1.<br>
<br>
Sadly, 4.1.0 will be released with some bugs in it, but we should avoid<br>
regressions. So, in your opinion, is the current state of 4.1.0-beta<br>
worse than 4.0.9, regarding this IS issue?<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Marc Delisle<br>
<a href="http://infomarc.info" target="_blank">http://infomarc.info</a><br>
<br>
------------------------------------------------------------------------------<br>
Shape the Mobile Experience: Free Subscription<br>
Software experts and developers: Be at the forefront of tech innovation.<br>
Intel(R) Software Adrenaline delivers strategic insight and game-changing<br>
conversations that shape the rapidly evolving mobile landscape. Sign up now.<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</div></div></blockquote></div><br></div>