File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1665,6 +1665,7 @@ private function execute_use_statement( WP_Parser_Node $node ): void {
16651665 *
16661666 * This emulates the following MySQL statements:
16671667 * - ANALYZE TABLE
1668+ * - CHECK TABLE
16681669 *
16691670 * @param WP_Parser_Node $node A "tableAdministrationStatement" AST node.
16701671 * @throws WP_SQLite_Driver_Exception When the query execution fails.
@@ -1682,6 +1683,13 @@ private function execute_administration_statement( WP_Parser_Node $node ): void
16821683 $ stmt = $ this ->execute_sqlite_query ( "ANALYZE $ quoted_table_name " );
16831684 $ errors = $ stmt ->fetchAll ( PDO ::FETCH_COLUMN );
16841685 break ;
1686+ case WP_MySQL_Lexer::CHECK_SYMBOL :
1687+ $ stmt = $ this ->execute_sqlite_query ( "PRAGMA integrity_check( $ quoted_table_name) " );
1688+ $ errors = $ stmt ->fetchAll ( PDO ::FETCH_COLUMN );
1689+ if ( 'ok ' === $ errors [0 ] ) {
1690+ array_shift ( $ errors );
1691+ }
1692+ break ;
16851693 default :
16861694 throw $ this ->new_not_supported_exception (
16871695 sprintf (
You can’t perform that action at this time.
0 commit comments