From 0b68b1629ed173818a6b5bb6ada1c4c78744348e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 27 Nov 2017 20:09:02 +0300 Subject: add a sanity check for tt-rss myisam tables --- include/functions.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/functions.php') diff --git a/include/functions.php b/include/functions.php index 4265692ec..ed6f78eef 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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; + } + -- cgit v1.2.3-54-g00ecf