~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.h

  • Committer: Brian Aker
  • Date: 2010-11-04 20:51:35 UTC
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: brian@tangent.org-20101104205135-vci0i54v1d0loai8
Merge of partial set of patches for locks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
  virtual bool hasShare() const= 0; /* Get rid of this long term */
386
386
  virtual void setShare(TableShare *new_share)= 0; /* Get rid of this long term */
387
387
 
 
388
  virtual void release(void)= 0;
 
389
 
388
390
  uint32_t sizeKeys() { return getMutableShare()->sizeKeys(); }
389
391
  uint32_t sizeFields() { return getMutableShare()->sizeFields(); }
390
392
  uint32_t getRecordLength() const { return getShare()->getRecordLength(); }
629
631
 
630
632
  friend std::ostream& operator<<(std::ostream& output, const Table &table)
631
633
  {
632
 
    output << "Table:(";
633
 
    output << table.getShare()->getSchemaName();
634
 
    output << ", ";
635
 
    output <<  table.getShare()->getTableName();
636
 
    output << ", ";
637
 
    output <<  table.getShare()->getTableTypeAsString();
638
 
    output << ")";
 
634
    if (table.getShare())
 
635
    {
 
636
      output << "Table:(";
 
637
      output << table.getShare()->getSchemaName();
 
638
      output << ", ";
 
639
      output <<  table.getShare()->getTableName();
 
640
      output << ", ";
 
641
      output <<  table.getShare()->getTableTypeAsString();
 
642
      output << ")";
 
643
    }
 
644
    else
 
645
    {
 
646
      output << "Table:(has no share)";
 
647
    }
639
648
 
640
649
    return output;  // for multiple << operators.
641
650
  }