Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.78k stars 1.41k forks source link

检查数据库是否崩溃的函数checkIfCorrupted一直返回true #1137

Closed 593607226 closed 1 month ago

593607226 commented 2 months ago

The language of WCDB

c++

The version of WCDB

2.1.6

The platform of WCDB

Windows10

The installation of WCDB

Git clone

What's the issue?

我希望在进程启动时检查数据库是否崩溃,如果崩溃就进行修复。手动删除数据库部分内容后,程序启动调用checkIfCorrupted查询是否崩溃返回true,然后调用retrieve进行修复。修复返回成功,调用checkIfCorrupted函数依然返回true。看代码确实是没有把奔溃结果清除的操作,我尝试在checkIfCorrupted返回true时调用removeFiles清空数据库,后面再次调用checkIfCorrupted还是返回true。对于已经恢复正常的数据库,checkIfCorrupted函数是否可以返回false image

Qiuwen-chen commented 2 months ago

Get

Qiuwen-chen commented 1 month ago

Fixed in v2.1.7