~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/schema.h

  • Committer: lbieber
  • Date: 2010-09-07 22:29:56 UTC
  • mfrom: (1747.1.3 build)
  • Revision ID: lbieber@orisndriz03-20100907222956-d60u695b7hx3zs0d
Merge Andrew - bug 597778 - Timestamp cannot reliably store leap seconds, so don't try. Leave that to datetime only
Merge Andrew - bug 621862 - Add / clean-up error messages for unireg_abort
Merge Andrew - bug 629563 - Drop the broken --mysql options and Change the --protocol option to accept 'mysql' or 'drizzle' ('mysql' currently default)

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
class Schema
31
31
{
32
32
  Session &session;
33
 
  message::schema::shared_ptr schema;
 
33
  message::Schema schema;
34
34
 
35
 
  SchemaIdentifier::vector schema_names;
36
 
  SchemaIdentifier::vector::const_iterator schema_iterator;
 
35
  SchemaIdentifiers schema_names;
 
36
  SchemaIdentifiers::const_iterator schema_iterator;
37
37
 
38
38
public:
39
39
 
40
40
  Schema(Session &arg);
41
41
 
42
 
  operator const drizzled::message::schema::shared_ptr()
 
42
  operator const drizzled::message::Schema*()
43
43
  {
44
44
    while (schema_iterator != schema_names.end())
45
45
    {
 
46
      schema.Clear();
46
47
      SchemaIdentifier schema_identifier(*schema_iterator);
47
48
      bool is_schema_parsed= plugin::StorageEngine::getSchemaDefinition(schema_identifier, schema);
48
49
      schema_iterator++;
49
50
 
50
51
      if (is_schema_parsed)
51
 
        return schema;
 
52
        return &schema;
52
53
    }
53
54
 
54
 
    return message::schema::shared_ptr();
 
55
    return NULL;
55
56
  }
56
57
 
57
58
  operator const drizzled::SchemaIdentifier*()