]> granicus.if.org Git - postgresql/commitdiff
Merge two assertions to make comment clearer
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 12 Sep 2019 13:34:50 +0000 (10:34 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 12 Sep 2019 13:37:04 +0000 (10:37 -0300)
Authored by Tom Lane, after a gripe from James Coleman.

Discussion: https://postgr.es/m/CAAaqYe9GD__4Crm=ddz+-XXcNhfY_V5gFYdLdmkFNq=2VHO56Q@mail.gmail.com

src/backend/utils/sort/tuplesort.c

index d2bd2aee9f023307afd946a169b0f94a9b150126..152daa72e1c1f300f816aa062ebfbb8b4fc82f53 100644 (file)
@@ -1186,8 +1186,8 @@ void
 tuplesort_set_bound(Tuplesortstate *state, int64 bound)
 {
        /* Assert we're called before loading any tuples */
-       Assert(state->status == TSS_INITIAL);
-       Assert(state->memtupcount == 0);
+       Assert(state->status == TSS_INITIAL && state->memtupcount == 0);
+
        Assert(!state->bounded);
        Assert(!WORKER(state));