Skip to content

Commit

Permalink
DEBUG_PRESORT_GP code has to be reached before the Assert() call
Browse files Browse the repository at this point in the history
  • Loading branch information
dim committed Jan 24, 2008
1 parent cf4a835 commit 5593c9d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions prefix.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* writting of this opclass, on the PostgreSQL internals, GiST inner
* working and prefix search analyses.
*
* $Id: prefix.c,v 1.9 2008/01/24 15:38:25 dim Exp $
* $Id: prefix.c,v 1.10 2008/01/24 20:51:49 dim Exp $
*/

#include <stdio.h>
Expand All @@ -23,6 +23,7 @@
#include <math.h>

#define DEBUG
#define DEBUG_PRESORT_GP
/**
* We use those DEBUG defines in the code, uncomment them to get very
* verbose output.
Expand Down Expand Up @@ -329,10 +330,6 @@ text **prefix_presort(GistEntryVector *list)
gp = greater_prefix_internal(cur, unions[u].prefix);
gplen = VARSIZE(gp) - VARHDRSZ;

if(gplen > 0 ) {
Assert(prefix_contains_internal(gp, cur, true));
}

#ifdef DEBUG_PRESORT_GP
if(gplen > 0 ) {
elog(NOTICE, " prefix_presort(): gplen=%2d, %s @> %s = %s",
Expand All @@ -343,6 +340,10 @@ text **prefix_presort(GistEntryVector *list)
}
#endif

if(gplen > 0 ) {
Assert(prefix_contains_internal(gp, cur, true));
}

if( gplen > 0 ) {
/**
* Current list entry share a common prefix with some previous
Expand Down

0 comments on commit 5593c9d

Please sign in to comment.