fix: reject autocommit=False override and IS NULL condition handling

_where() rendered None conditions as col = %s bound to NULL, which sql
never matches, so get/get_one/exists/delete silently missed NULL rows
despite insert() writing NULL fine — fixed to emit col IS NULL, in
lockstep with the psql lib's identical fix.

Separately, __init__ now rejects autocommit=False in pool_kwargs: with
it, _run/_fetchall never commit, so on pool release aiomysql closes the
in-transaction connection and MySQL rolls back server-side while
insert()/delete()/upsert()/execute() still return success signals
(lastrowid/rowcount) for writes that were silently discarded.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-07-02 16:44:34 -04:00
parent a46c4b13fc
commit 50388de22c
3 changed files with 26 additions and 9 deletions
+3 -3
View File
@@ -11,18 +11,18 @@ wire-compatible and share the driver, so this covers both.
`requirements.txt`:
```
mysql @ git+ssh://git@git.rethinkstudios.io/rethink-public/mysql.git@v0.1.2
mysql @ git+ssh://git@git.rethinkstudios.io/rethink-public/mysql.git@v0.1.3
```
Direct:
```bash
pip install "mysql @ git+ssh://git@git.rethinkstudios.io/rethink-public/mysql.git@v0.1.2"
pip install "mysql @ git+ssh://git@git.rethinkstudios.io/rethink-public/mysql.git@v0.1.3"
```
Pulls `aiomysql` (which pulls `PyMySQL`).
Drop the `@v0.1.2` suffix from the line above to install the latest unpinned.
Drop the `@v0.1.3` suffix from the line above to install the latest unpinned.
## The two-layer API