Hi devs, According to my research I couldn't find any place where the variable $selected is set which is used in sql.php. Also this variable is used to check indexes if indexes should be checked in sql.lib.php. I am not sure about what is meant by checking an index. But since $selected seems to be not initialized this code will never run. I would like to know your opinion on this issue.
regards supun.
Le 2013-07-16 12:17, Supun Nakandala a écrit :
Hi devs, According to my research I couldn't find any place where the variable $selected is set which is used in sql.php. Also this variable is used to check indexes if indexes should be checked in sql.lib.php. I am not sure about what is meant by checking an index. But since $selected seems to be not initialized this code will never run. I would like to know your opinion on this issue.
regards supun.
Hi Supun,
this is a very good example of the improvements I hope you'll achieve with this refactoring.
To run this code, do the following: - ensure you have a table having two indexes on the same column - open the db containing this table - go to Structure for this db - tick the checkbox for this table name - in the dropdown, pick "Check table"
You'll see the "Problems with indexes of table" message. To prove that it's coming from sql.lib.php, make a slight change in one of the messages output by PMA_getHtmlForIndexesProblems().
Finding the code path that leads to this result is an interesting exercise that I have done, but I suggest you do it by yourself to gain experience with the code.
Once you understand this code path, you'll be able to remove one place where sql.php is included.
On Tue, Jul 16, 2013 at 6:17 PM, Supun Nakandala supun.nakandala@gmail.com wrote:
Hi devs, According to my research I couldn't find any place where the variable $selected is set which is used in sql.php. Also this variable is used to check indexes if indexes should be checked in sql.lib.php. I am not sure about what is meant by checking an index. But since $selected seems to be not initialized this code will never run. I would like to know your opinion on this issue.
it might be set in other code that includes sql.php. you can use git grep to look at all the files and check if anyof the files that include/call sql.php set this variable
regards supun.
See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clk... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel