~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Jay Pipes
  • Date: 2009-08-25 12:50:26 UTC
  • mfrom: (1124 staging)
  • mto: This revision was merged to the branch mainline in revision 1125.
  • Revision ID: jpipes@serialcoder-20090825125026-rowp34afwb4zkft3
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
  return str ? str : "<nil>";
64
64
}
65
65
 
66
 
/* Match the values of enum ha_choice */
67
 
static const char *ha_choice_values[] = {"", "0", "1"};
68
 
 
69
66
static void store_key_options(String *packet, Table *table, KEY *key_info);
70
67
 
71
68
static vector<InfoSchemaTable *> all_schema_tables;
291
288
 
292
289
static bool store_db_create_info(const char *dbname, String *buffer, bool if_not_exists)
293
290
{
294
 
  drizzled::message::Schema schema;
 
291
  message::Schema schema;
295
292
 
296
293
  if (!my_strcasecmp(system_charset_info, dbname,
297
294
                     INFORMATION_SCHEMA_NAME.c_str()))
384
381
}
385
382
 
386
383
 
387
 
/* Append directory name (if exists) to CREATE INFO */
388
 
 
389
 
static void append_directory(String *packet, const char *dir_type,
390
 
                             const char *filename)
391
 
{
392
 
  if (filename)
393
 
  {
394
 
    uint32_t length= dirname_length(filename);
395
 
    packet->append(' ');
396
 
    packet->append(dir_type);
397
 
    packet->append(STRING_WITH_LEN(" DIRECTORY='"));
398
 
    packet->append(filename, length);
399
 
    packet->append('\'');
400
 
  }
401
 
}
402
 
 
403
 
 
404
384
#define LIST_PROCESS_HOST_LEN 64
405
385
 
406
386
static bool get_field_default_value(Field *timestamp_field,
690
670
      packet->append(STRING_WITH_LEN(" PACK_KEYS=1"));
691
671
    if (share->db_create_options & HA_OPTION_NO_PACK_KEYS)
692
672
      packet->append(STRING_WITH_LEN(" PACK_KEYS=0"));
693
 
    if (share->page_checksum != HA_CHOICE_UNDEF)
694
 
    {
695
 
      packet->append(STRING_WITH_LEN(" PAGE_CHECKSUM="));
696
 
      packet->append(ha_choice_values[(uint32_t) share->page_checksum], 1);
697
 
    }
698
673
    if (create_info.row_type != ROW_TYPE_DEFAULT)
699
674
    {
700
675
      packet->append(STRING_WITH_LEN(" ROW_FORMAT="));
719
694
      append_unescaped(packet, share->getComment(),
720
695
                       share->getCommentLength());
721
696
    }
722
 
    if (share->connect_string.length)
723
 
    {
724
 
      packet->append(STRING_WITH_LEN(" CONNECTION="));
725
 
      append_unescaped(packet, share->connect_string.str, share->connect_string.length);
726
 
    }
727
 
    append_directory(packet, "DATA",  create_info.data_file_name);
728
 
    append_directory(packet, "INDEX", create_info.index_file_name);
729
697
  }
730
698
  table->restore_column_map(old_map);
731
699
  return(0);