~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/schemas.cc

  • Committer: Brian Aker
  • Date: 2010-03-16 23:42:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1350.
  • Revision ID: brian@gaz-20100316234210-t1vr23lqw48vy5o9
A first pass through adding a timestamp to our proto.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
{
30
30
  add_field("SCHEMA_NAME");
31
31
  add_field("DEFAULT_COLLATION_NAME");
 
32
  add_field("SCHEMA_CREATION_TIME");
 
33
  add_field("SCHEMA_UPDATE_TIME");
32
34
}
33
35
 
34
36
SchemasTool::Generator::Generator(Field **arg) :
119
121
    push(schema.collation());
120
122
  else
121
123
    push(scs->name);
 
124
 
 
125
  /* SCHEMA_CREATION_TIME */
 
126
  time_t time_arg= schema.creation_timestamp();
 
127
  char buffer[40];
 
128
  struct tm tm_buffer;
 
129
 
 
130
  localtime_r(&time_arg, &tm_buffer);
 
131
  strftime(buffer, sizeof(buffer), "%a %b %d %H:%M:%S %Y", &tm_buffer);
 
132
  push(buffer);
 
133
 
 
134
  /* SCHEMA_UPDATE_TIME */
 
135
  time_arg= schema.update_timestamp();
 
136
  localtime_r(&time_arg, &tm_buffer);
 
137
  strftime(buffer, sizeof(buffer), "%a %b %d %H:%M:%S %Y", &tm_buffer);
 
138
  push(buffer);
122
139
}