2
中使用Sqlite“PRAGMA integrity_check”我有损坏的数据库。在命令行我输入我应该如何在C
PRAGMA integrity_check
和SQLite返回
On tree page 441 cell 17: Rowid 205 out of order (min less than parent max of 12258)
On tree page 26 cell 12: 2nd reference to page 441
On tree page 26 cell 12: Child page depth differs
On tree page 26 cell 13: Child page depth differs
Page 65 is never used
Page 66 is never used
wrong # of entries in index sqlite_autoindex_TBL_1
在我的C程序中,我输入
sqlite3 *glbDBHandle;
sqlite3_open(DB_FILE, &glbDBHandle);
int result=sqlite3_exec(glbDBHandle, "PRAGMA integrity_check", 0, 0, 0);
这个代码用碎和健康数据库总是返回0。
我应该如何在C中使用“PRAGMA integrity_check”?或者我怎么能知道我的sqlite数据库已损坏?