-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Milestone
Description
Describe the bug
Doing a SELECT, if the result set is empty (no row found), cursor.fetchall() returns () (empty tuple)
To Reproduce
import pymysql
con = pymysql.connect(...)
with con.cursor() as cursor:
cursor.execute("select * from information_schema.TABLES where TABLE_NAME = 'patate';")
data = cursor.fetchall()Expected behavior
PEP-0249 mentions:
returning them as a sequence of sequences (e.g. a list of tuples)
https://peps.python.org/pep-0249/#fetchall
I would expect an empty list []
Environment
- OS: Manjaro Linux
- Server and version: MySQL 8.0.20
- PyMySQL version: 1.0.2
Metadata
Metadata
Assignees
Labels
No labels