Bugfix: We should only search in the current database for MyISAM tables

This commit is contained in:
Michael 2016-11-22 16:47:08 +00:00
commit edbdd0e34a
2 changed files with 13 additions and 1 deletions

View file

@ -430,7 +430,8 @@ function admin_page_queue(&$a) {
function admin_page_summary(&$a) {
global $db;
// are there MyISAM tables in the DB? If so, trigger a warning message
$r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine`='myisam' LIMIT 1");
$r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine` = 'myisam' AND `table_schema` = '%s' LIMIT 1",
dbesc($db->database_name()));
$showwarning = false;
$warningtext = array();
if (dbm::is_result($r)) {