Implement our own sqlite3_exec

Should fix issue related to unlock notify: #767
Caveat: many CString allocated.
This commit is contained in:
gwenn
2020-06-26 19:35:14 +02:00
parent 57db338537
commit dd886578d2
6 changed files with 40 additions and 35 deletions

View File

@@ -622,7 +622,7 @@ impl Statement<'_> {
}
fn finalize_(&mut self) -> Result<()> {
let mut stmt = unsafe { RawStatement::new(ptr::null_mut(), false) };
let mut stmt = unsafe { RawStatement::new(ptr::null_mut(), 0) };
mem::swap(&mut stmt, &mut self.stmt);
self.conn.decode_result(stmt.finalize())
}
@@ -707,7 +707,7 @@ impl Statement<'_> {
/// connection has closed is illegal, but `RawStatement` does not enforce
/// this, as it loses our protective `'conn` lifetime bound.
pub(crate) unsafe fn into_raw(mut self) -> RawStatement {
let mut stmt = RawStatement::new(ptr::null_mut(), false);
let mut stmt = RawStatement::new(ptr::null_mut(), 0);
mem::swap(&mut stmt, &mut self.stmt);
stmt
}