Fix a rare crash on startup (#19922)
Release Notes: - Fixed a rare crash that could happen when certain SQL statements are prepared
This commit is contained in:
parent
fc5cde9434
commit
f3b7f5944d
1 changed files with 3 additions and 3 deletions
|
@ -58,13 +58,13 @@ impl<'a> Statement<'a> {
|
|||
&mut remaining_sql_ptr,
|
||||
);
|
||||
|
||||
remaining_sql = CStr::from_ptr(remaining_sql_ptr);
|
||||
statement.raw_statements.push(raw_statement);
|
||||
|
||||
connection.last_error().with_context(|| {
|
||||
format!("Prepare call failed for query:\n{}", query.as_ref())
|
||||
})?;
|
||||
|
||||
remaining_sql = CStr::from_ptr(remaining_sql_ptr);
|
||||
statement.raw_statements.push(raw_statement);
|
||||
|
||||
if !connection.can_write() && sqlite3_stmt_readonly(raw_statement) == 0 {
|
||||
let sql = CStr::from_ptr(sqlite3_sql(raw_statement));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue