summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-03 14:16:24 (GMT)
committerGitHub <noreply@github.com>2021-03-03 14:16:24 (GMT)
commit3b4b2cf418707c79f96689e401e3c703c0fdd4d2 (patch)
tree9b6feb5cc3c352f360c575ca90b986ab50d08ee0 /Lib/sqlite3
parent09605ad7269c8d9828fa3c175ad7c9efe8d12762 (diff)
downloadcpython-3b4b2cf418707c79f96689e401e3c703c0fdd4d2.zip
cpython-3b4b2cf418707c79f96689e401e3c703c0fdd4d2.tar.gz
cpython-3b4b2cf418707c79f96689e401e3c703c0fdd4d2.tar.bz2
bpo-43368: Fix fetching empty bytes in sqlite3 (GH-24706)
Regression introduced in 47feb1feb28631b6647699b7633109aa85340966.
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r--Lib/sqlite3/test/regression.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py
index c8e0b27..417a531 100644
--- a/Lib/sqlite3/test/regression.py
+++ b/Lib/sqlite3/test/regression.py
@@ -409,6 +409,10 @@ class RegressionTests(unittest.TestCase):
self.con.execute("select 1") # trigger seg fault
method(None)
+ def test_return_empty_bytestring(self):
+ cur = self.con.execute("select X''")
+ val = cur.fetchone()[0]
+ self.assertEqual(val, b'')
def suite():