summaryrefslogtreecommitdiff
path: root/include/sanity_check.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-xinclude/sanity_check.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php
index f06cf0a39..b1b4571b2 100755
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -27,7 +27,23 @@
return $url_path;
}
- /**
+ function check_mysql_tables() {
+ $pdo = Db::pdo();
+
+ $sth = $pdo->prepare("SELECT engine, table_name FROM information_schema.tables WHERE
+ table_schema = ? AND table_name LIKE 'ttrss_%' AND engine != 'InnoDB'");
+ $sth->execute([DB_NAME]);
+
+ $bad_tables = [];
+
+ while ($line = $sth->fetch()) {
+ array_push($bad_tables, $line);
+ }
+
+ return $bad_tables;
+ }
+
+/**
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
function initial_sanity_check() {