mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-43258: Don't allocate sqlite3 aggregate context for empty queries (GH-24569)
This commit is contained in:
parent
e92d67dfbb
commit
979b23cbe4
3 changed files with 13 additions and 2 deletions
|
@ -429,6 +429,11 @@ class AggregateTests(unittest.TestCase):
|
|||
val = cur.fetchone()[0]
|
||||
self.assertEqual(val, 60)
|
||||
|
||||
def test_aggr_no_match(self):
|
||||
cur = self.con.execute("select mysum(i) from (select 1 as i) where i == 0")
|
||||
val = cur.fetchone()[0]
|
||||
self.assertIsNone(val)
|
||||
|
||||
class AuthorizerTests(unittest.TestCase):
|
||||
@staticmethod
|
||||
def authorizer_cb(action, arg1, arg2, dbname, source):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue