New submission from Montana Low <montana...@gmail.com>:
SQLite driver returns an incorrect row count (-1) for UPDATE statements that begin with a comment. Downstream Reference: https://github.com/sqlalchemy/sqlalchemy/issues/4396 Test Case: ``` import sqlite3 conn = sqlite3.connect(":memory:") cursor = conn.cursor() cursor.execute(""" CREATE TABLE foo ( id INTEGER NOT NULL, updated_at DATETIME, PRIMARY KEY (id) ) """) cursor.execute(""" /* watermarking bug */ INSERT INTO foo (id, updated_at) VALUES (?, ?) """, [1, None]) cursor.execute(""" UPDATE foo SET updated_at=? WHERE foo.id = ? """, ('2018-12-02 14:55:57.169785', 1)) assert cursor.rowcount == 1 cursor.execute(""" /* watermarking bug */ UPDATE foo SET updated_at=? WHERE foo.id = ? """, ('2018-12-03 14:55:57.169785', 1)) assert cursor.rowcount == 1 ``` ---------- components: Library (Lib) messages: 331006 nosy: Montana Low priority: normal severity: normal status: open title: SQLite incorrect row count for UPDATE versions: Python 2.7, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35398> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com