~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-08-17 15:34:55 UTC
  • mto: (1117.1.9 merge)
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090817153455-emrlqx6cbxo9knfm
Fix for Stewart's patch (includes hack to solve MAX rows problem).

Show diffs side-by-side

added added

removed removed

Lines of Context:
704
704
      packet->append(buff.c_str(), buff.length());
705
705
    }
706
706
 
707
 
    if (share->min_rows)
 
707
    if (table->s->hasMinRows() && table->s->getMinRows())
708
708
    {
709
709
      packet->append(STRING_WITH_LEN(" MIN_ROWS="));
710
 
      buff= to_string(share->min_rows);
 
710
      buff= to_string(table->s->getMinRows());
711
711
      packet->append(buff.c_str(), buff.length());
712
712
    }
713
 
 
714
 
    if (share->max_rows && !table_list->schema_table)
 
713
    if (table->s->hasMaxRows() && table->s->getMaxRows()
 
714
        && ! table_list->schema_table)
715
715
    {
716
716
      packet->append(STRING_WITH_LEN(" MAX_ROWS="));
717
 
      buff= to_string(share->max_rows);
 
717
      buff= to_string(table->s->getMaxRows());
718
718
      packet->append(buff.c_str(), buff.length());
719
719
    }
720
 
 
721
 
    if (share->avg_row_length)
 
720
    if (table->s->hasAverageRowLength() && table->s->getAverageRowLength())
722
721
    {
723
722
      packet->append(STRING_WITH_LEN(" AVG_ROW_LENGTH="));
724
 
      buff= to_string(share->avg_row_length);
 
723
      buff= to_string(table->s->getAverageRowLength());
725
724
      packet->append(buff.c_str(), buff.length());
726
725
    }
727
726
 
757
756
      packet->append(buff.c_str(), buff.length());
758
757
    }
759
758
    table->file->append_create_info(packet);
760
 
    if (share->comment.length)
 
759
    if (share->hasComment() && share->getCommentLength())
761
760
    {
762
761
      packet->append(STRING_WITH_LEN(" COMMENT="));
763
 
      append_unescaped(packet, share->comment.str, share->comment.length);
 
762
      append_unescaped(packet, share->getComment(),
 
763
                       share->getCommentLength());
764
764
    }
765
765
    if (share->connect_string.length)
766
766
    {