~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-08-18 07:20:29 UTC
  • mfrom: (1117.1.9 merge)
  • Revision ID: brian@gaz-20090818072029-s9ch5lcmltxwidn7
Merge of Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
686
686
      packet->append(file->engine->getName().c_str());
687
687
    }
688
688
 
689
 
    /*
690
 
      Add AUTO_INCREMENT=... if there is an AUTO_INCREMENT column,
691
 
      and NEXT_ID > 1 (the default).  We must not print the clause
692
 
      for engines that do not support this as it would break the
693
 
      import of dumps, but as of this writing, the test for whether
694
 
      AUTO_INCREMENT columns are allowed and wether AUTO_INCREMENT=...
695
 
      is supported is identical, !(file->table_flags() & HA_NO_AUTO_INCREMENT))
696
 
      Because of that, we do not explicitly test for the feature,
697
 
      but may extrapolate its existence from that of an AUTO_INCREMENT column.
698
 
    */
699
 
 
700
 
    if (create_info.auto_increment_value > 1)
701
 
    {
702
 
      packet->append(STRING_WITH_LEN(" AUTO_INCREMENT="));
703
 
      buff= to_string(create_info.auto_increment_value);
704
 
      packet->append(buff.c_str(), buff.length());
705
 
    }
706
 
 
707
 
    if (share->min_rows)
708
 
    {
709
 
      packet->append(STRING_WITH_LEN(" MIN_ROWS="));
710
 
      buff= to_string(share->min_rows);
711
 
      packet->append(buff.c_str(), buff.length());
712
 
    }
713
 
 
714
 
    if (share->max_rows && !table_list->schema_table)
715
 
    {
716
 
      packet->append(STRING_WITH_LEN(" MAX_ROWS="));
717
 
      buff= to_string(share->max_rows);
718
 
      packet->append(buff.c_str(), buff.length());
719
 
    }
720
 
 
721
 
    if (share->avg_row_length)
722
 
    {
723
 
      packet->append(STRING_WITH_LEN(" AVG_ROW_LENGTH="));
724
 
      buff= to_string(share->avg_row_length);
725
 
      packet->append(buff.c_str(), buff.length());
726
 
    }
727
 
 
728
689
    if (share->db_create_options & HA_OPTION_PACK_KEYS)
729
690
      packet->append(STRING_WITH_LEN(" PACK_KEYS=1"));
730
691
    if (share->db_create_options & HA_OPTION_NO_PACK_KEYS)
731
692
      packet->append(STRING_WITH_LEN(" PACK_KEYS=0"));
732
 
    /* We use CHECKSUM, instead of TABLE_CHECKSUM, for backward compability */
733
 
    if (share->db_create_options & HA_OPTION_CHECKSUM)
734
 
      packet->append(STRING_WITH_LEN(" CHECKSUM=1"));
735
693
    if (share->page_checksum != HA_CHOICE_UNDEF)
736
694
    {
737
695
      packet->append(STRING_WITH_LEN(" PAGE_CHECKSUM="));
738
696
      packet->append(ha_choice_values[(uint32_t) share->page_checksum], 1);
739
697
    }
740
 
    if (share->db_create_options & HA_OPTION_DELAY_KEY_WRITE)
741
 
      packet->append(STRING_WITH_LEN(" DELAY_KEY_WRITE=1"));
742
698
    if (create_info.row_type != ROW_TYPE_DEFAULT)
743
699
    {
744
700
      packet->append(STRING_WITH_LEN(" ROW_FORMAT="));
757
713
      packet->append(buff.c_str(), buff.length());
758
714
    }
759
715
    table->file->append_create_info(packet);
760
 
    if (share->comment.length)
 
716
    if (share->hasComment() && share->getCommentLength())
761
717
    {
762
718
      packet->append(STRING_WITH_LEN(" COMMENT="));
763
 
      append_unescaped(packet, share->comment.str, share->comment.length);
 
719
      append_unescaped(packet, share->getComment(),
 
720
                       share->getCommentLength());
764
721
    }
765
722
    if (share->connect_string.length)
766
723
    {