-
Notifications
You must be signed in to change notification settings - Fork 76
Unable to open Sqlite storage #41
Comments
thank you @senden9. This is a bug in sqlite storage which handles SQL statements initialization order incorrectly. I will fix it soon. |
Hi! If I see it right the fix is is zbox 0.8.3. If i now try to run the code I can not open the repository (or a newly created one) because of an Error on opening. Stack-trace of the same code as above:
let mut repo = RepoOpener::new()
.create(true)
.open("sqlite://./myRepoSqlite", "your password")
.unwrap(); |
That issue is happened at the FFI boundary between rust and libsqlite. When binding eid as CString to SQL parameter, its life time isn't long enough so a dangling pointer is passed to libsqlite. It used to work on my mac, but I think it is largely by luck. I have worked out a fix, @senden9 could you try test it again and let me know if it is working? Thanks. |
Used master branch as dependency (ed1a2cb). Seem to work now 🎉 |
Hi!
I can create a sqlite backend file, open some files in it, read them and close. But i am not able to reopen the same sqlite file again. Then zbox crashes with the given error below. Somehow in a frame below the
RepoOpener
call.To reproduce simply execute the attached rust program two times.
It seems that I am able to use the file backend, but not the sqlite backend. If I replace
sqlite://./myRepoSqlite
withfile://./myRepo
it works. 🤔.Dependencies:
Error:
Environment information:
Zipped Sqlite file for inspection:
myRepoSqlite.zip
The text was updated successfully, but these errors were encountered: