mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489)
This commit is contained in:
parent
4cdeee5978
commit
c1323d4b8c
5 changed files with 14 additions and 11 deletions
|
@ -60,8 +60,8 @@ pysqlite_statement_create(pysqlite_Connection *connection, PyObject *sql)
|
|||
}
|
||||
|
||||
sqlite3 *db = connection->db;
|
||||
int max_length = sqlite3_limit(db, SQLITE_LIMIT_LENGTH, -1);
|
||||
if (size >= max_length) {
|
||||
int max_length = sqlite3_limit(db, SQLITE_LIMIT_SQL_LENGTH, -1);
|
||||
if (size > max_length) {
|
||||
PyErr_SetString(connection->DataError,
|
||||
"query string is too large");
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue