8000 bpo-32215: Fix performance regression in sqlite3 (GH-8511) · python/cpython@8d1e190 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d1e190

Browse files
authored
bpo-32215: Fix performance regression in sqlite3 (GH-8511)
1 parent ffef50f commit 8d1e190

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix performance regression in :mod:`sqlite3` when a DML statement appeared
2+
in a different line than the rest of the SQL query.

Modules/_sqlite/statement.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* con
8585
continue;
8686
}
8787

88-
self->is_dml = (PyOS_strnicmp(p, "insert ", 7) == 0)
89-
|| (PyOS_strnicmp(p, "update ", 7) == 0)
90-
|| (PyOS_strnicmp(p, "delete ", 7) == 0)
91-
|| (PyOS_strnicmp(p, "replace ", 8) == 0);
88+
self->is_dml = (PyOS_strnicmp(p, "insert", 6) == 0)
89+
|| (PyOS_strnicmp(p, "update", 6) == 0)
90+
|| (PyOS_strnicmp(p, "delete", 6) == 0)
91+
|| (PyOS_strnicmp(p, "replace", 7) == 0);
9292
break;
9393
}
9494

0 commit comments

Comments
 (0)
0