~mordred/drizzle/devel

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/tables.cc

  • Committer: Brian Aker
  • Date: 2010-03-17 01:02:38 UTC
  • mfrom: (1340.1.4 build)
  • Revision ID: brian@gaz-20100317010238-sejk2ingvaqoiab3
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  add_field("ENGINE");
59
59
  add_field("ROW_FORMAT", 10);
60
60
  add_field("TABLE_COLLATION");
 
61
  add_field("TABLE_CREATION_TIME");
 
62
  add_field("TABLE_UPDATE_TIME");
61
63
  add_field("TABLE_COMMENT", 2048);
62
64
}
63
65
 
213
215
void TablesTool::Generator::fill()
214
216
{
215
217
 
 
218
  /**
 
219
    @note use --replace-column
 
220
  */
 
221
 
216
222
  /* TABLE_SCHEMA */
217
223
  push(schema_name());
218
224
 
248
254
  /* TABLE_COLLATION */
249
255
  push(table_proto.options().collation());
250
256
 
 
257
  /* TABLE_CREATION_TIME */
 
258
  time_t time_arg= table_proto.creation_timestamp();
 
259
  char buffer[40];
 
260
  struct tm tm_buffer;
 
261
 
 
262
  localtime_r(&time_arg, &tm_buffer);
 
263
  strftime(buffer, sizeof(buffer), "%a %b %d %H:%M:%S %Y", &tm_buffer);
 
264
  push(buffer);
 
265
 
 
266
  /* TABLE_UPDATE_TIME */
 
267
  time_arg= table_proto.update_timestamp();
 
268
  localtime_r(&time_arg, &tm_buffer);
 
269
  strftime(buffer, sizeof(buffer), "%a %b %d %H:%M:%S %Y", &tm_buffer);
 
270
  push(buffer);
 
271
 
251
272
  /* TABLE_COMMENT */
252
273
  push(table_proto.options().comment());
253
274
}