mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
If an error occurs within sqlite3_step() on a statement prepared using sqlite3_prepare_v2(), transfer both the error code and error message to the database handle before sqlite3_step() returns (so that they are available via sqlite3_errcode() and sqlite3_errmsg(). Prior to this commit, only the error code was transfered. The error message was not available until after either sqlite3_reset() or sqlite3_finalize() had been called on the statement handle.
FossilOrigin-Name: 8f88cc4e616b4b30ed349f89e148f782da5cb6c4
This commit is contained in:
@@ -454,7 +454,7 @@ end_of_step:
|
||||
** error has occured, then return the error code in p->rc to the
|
||||
** caller. Set the error code in the database handle to the same value.
|
||||
*/
|
||||
rc = db->errCode = p->rc;
|
||||
rc = sqlite3VdbeTransferError(p);
|
||||
}
|
||||
return (rc&db->errMask);
|
||||
}
|
||||
|
Reference in New Issue
Block a user