Message331006
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
``` |
|
Date |
User |
Action |
Args |
2018-12-04 02:27:45 | Montana Low | set | recipients:
+ Montana Low |
2018-12-04 02:27:45 | Montana Low | set | messageid: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> |
2018-12-04 02:27:45 | Montana Low | link | issue35398 messages |
2018-12-04 02:27:44 | Montana Low | create | |
|