Exemplo n.º 1
0
void dump_mi (struct mallinfo *mi)
{
    PRINTIT (arena);
    PRINTIT (ordblks);
    PRINTIT (smblks);
    fprintf (stderr, "\n");
    PRINTIT (hblks);
    PRINTIT (hblkhd);
    PRINTIT (usmblks);
    fprintf (stderr, "\n");
    PRINTIT (fsmblks);
    PRINTIT (uordblks);
    PRINTIT (keepcost);
    fprintf (stderr, "\n");
}
void NAColumnArray::print(FILE* ofd, const char* indent, const char* title,
                          CollHeap *c, char *buf) const
{
  Space * space = (Space *)c;
  char mybuf[1000];
#pragma nowarn(1506)   // warning elimination
  BUMP_INDENT(indent);
#pragma warn(1506)  // warning elimination
  for (CollIndex i = 0; i < entries(); i++)
  {
    snprintf(mybuf, sizeof(mybuf), "%s%s[%2d] =", NEW_INDENT, title, i);
    PRINTIT(ofd, c, space, buf, mybuf);
    at(i)->print(ofd, "", "", c, buf);
  }
}
// LCOV_EXCL_START :dpm
// -----------------------------------------------------------------------
// Print function for debugging
// -----------------------------------------------------------------------
void NAColumn::print(FILE* ofd, const char* indent, const char* title,
                     CollHeap *c, char *buf) const
{
    const Int32 A = 0x18, D = 0x19; // up-arrow, down-arrow; just to be cute
  char ckstr[3+1];
  SortOrdering cko = getClusteringKeyOrdering();
  if (cko == ASCENDING)		sprintf(ckstr, "ck%c", A);
  else if (cko == DESCENDING)	sprintf(ckstr, "ck%c", D);
  else				ckstr[0] = '\0';

  Space * space = (Space *)c;
  char mybuf[1000];
  sprintf(mybuf,"%s%s %-8s %-16s %d\t| %2s %2s %2s %3s %s %s\n",
          title, indent, colName_.data(),
          type_->getTypeSQLname(TRUE/*terse*/).data(), position_,
          isIndexKey()        ? "ik"  : "",
          isPartitioningKey() ? "hp"  : "",
          isPrimaryKey()      ? "pk"  : "",
          ckstr,
          isComputedColumn() ? computedColumnExpression_ : "",
          isReferencedForHistogram() ? "refForHist" :
          isReferenced() ? "ref" : "");
  PRINTIT(ofd, c, space, buf, mybuf);
}