Browse Source

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

tags/3.5.1
Michael 3 years ago
parent
commit
edbdd0e34a
2 changed files with 13 additions and 1 deletions
  1. +11
    -0
      include/dba.php
  2. +2
    -1
      mod/admin.php

+ 11
- 0
include/dba.php View File

@@ -109,6 +109,17 @@ class dba {
return $return;
}

/**
* @brief Returns the selected database name
*
* @return string
*/
public function database_name() {
$r = $this->q("SELECT DATABASE() AS `db`");

return $r[0]['db'];
}

/**
* @brief Returns the number of rows
*


+ 2
- 1
mod/admin.php 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)) {


Loading…
Cancel
Save