~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

First pass on cleanup of Stewart's patch, plus re-engineer to make it work a
bit more with the current system. Engines approve key/pair.

Show diffs side-by-side

added added

removed removed

Lines of Context:
372
372
  Cursor *cursor= table->cursor;
373
373
  TableShare *share= table->s;
374
374
  HA_CREATE_INFO create_info;
375
 
  bool show_table_options= false;
376
375
  my_bitmap_map *old_map;
377
376
 
378
377
  table->restoreRecordAsDefault(); // Get empty record
540
539
 
541
540
  packet->append(STRING_WITH_LEN("\n)"));
542
541
  {
543
 
    show_table_options= true;
544
542
    /*
545
543
      Get possible table space definitions and append them
546
544
      to the CREATE TABLE statement
554
552
    packet->append(STRING_WITH_LEN(" ENGINE="));
555
553
    packet->append(cursor->getEngine()->getName().c_str());
556
554
 
 
555
    size_t num_engine_options= share->getTableProto()->engine().options_size();
 
556
    for (size_t x= 0; x < num_engine_options; ++x)
 
557
    {
 
558
      const message::Table::StorageEngine::EngineOption &option= share->getTableProto()->engine().options(x);
 
559
      packet->append(" ");
 
560
      packet->append(option.name().c_str());
 
561
      packet->append("=");
 
562
      append_unescaped(packet, option.state().c_str(), option.state().length());
 
563
    }
 
564
 
 
565
#if 0
557
566
    if (create_info.row_type != ROW_TYPE_DEFAULT)
558
567
    {
559
568
      packet->append(STRING_WITH_LEN(" ROW_FORMAT="));
560
569
      packet->append(ha_row_type[(uint32_t) create_info.row_type]);
561
570
    }
 
571
#endif
562
572
    if (share->block_size)
563
573
    {
564
574
      packet->append(STRING_WITH_LEN(" BLOCK_SIZE="));