diff options
author | Andrew Dolgov <[email protected]> | 2017-11-27 20:09:02 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-11-27 20:09:02 +0300 |
commit | 0b68b1629ed173818a6b5bb6ada1c4c78744348e (patch) | |
tree | f45989e2c7e765d4807923fa2106a893f38f4706 /include/functions.php | |
parent | d7effa92a49b5ed64d0f4cfa87a6aabaf9cfaa93 (diff) |
add a sanity check for tt-rss myisam tables
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 15 |
1 files changed, 15 insertions, 0 deletions
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; + } + |