1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 18:35:57 +00:00

add a sanity check for tt-rss myisam tables

This commit is contained in:
Andrew Dolgov
2017-11-27 20:09:02 +03:00
parent d7effa92a4
commit 0b68b1629e
3 changed files with 48 additions and 6 deletions

View File

@@ -2546,3 +2546,18 @@
}
}
function check_mysql_tables() {
$schema = db_escape_string(DB_NAME);
$result = db_query("SELECT engine, table_name FROM information_schema.tables WHERE
table_schema = '$schema' AND table_name LIKE 'ttrss_%' AND engine != 'InnoDB'");
$bad_tables = [];
while ($line = db_fetch_assoc($result)) {
array_push($bad_tables, $line);
}
return $bad_tables;
}