mirror of
https://github.com/python/cpython.git
synced 2026-02-13 19:04:37 +00:00
bpo-43290: Remove workaround from pysqlite_step() (GH-24638)
From the SQLite 3.5.3 changelog: sqlite3_step() returns SQLITE_MISUSE instead of crashing when called with a NULL parameter. The workaround no longer needed because we no longer support SQLite releases older than 3.7.15.
This commit is contained in:
parent
cc3df6368d
commit
91ea37c84a
1 changed files with 3 additions and 9 deletions
|
|
@ -28,15 +28,9 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection)
|
|||
{
|
||||
int rc;
|
||||
|
||||
if (statement == NULL) {
|
||||
/* this is a workaround for SQLite 3.5 and later. it now apparently
|
||||
* returns NULL for "no-operation" statements */
|
||||
rc = SQLITE_OK;
|
||||
} else {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
rc = sqlite3_step(statement);
|
||||
Py_END_ALLOW_THREADS
|
||||
}
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
rc = sqlite3_step(statement);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue