diff options
Diffstat (limited to 'Modules/_sqlite/statement.c')
-rw-r--r-- | Modules/_sqlite/statement.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c index b20c91d..66fadb6 100644 --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -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; |