~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/schema_engine.cc

Remove dead memset call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
class AddSchemaNames : 
39
39
  public unary_function<StorageEngine *, void>
40
40
{
41
 
  SchemaIdentifierList &schemas;
 
41
  SchemaIdentifiers &schemas;
42
42
 
43
43
public:
44
44
 
45
 
  AddSchemaNames(SchemaIdentifierList &of_names) :
 
45
  AddSchemaNames(SchemaIdentifiers &of_names) :
46
46
    schemas(of_names)
47
47
  {
48
48
  }
53
53
  }
54
54
};
55
55
 
56
 
void StorageEngine::getSchemaIdentifiers(Session &session, SchemaIdentifierList &schemas)
 
56
void StorageEngine::getIdentifiers(Session &session, SchemaIdentifiers &schemas)
57
57
{
58
58
  // Add hook here for engines to register schema.
59
59
  for_each(StorageEngine::getSchemaEngines().begin(), StorageEngine::getSchemaEngines().end(),
64
64
 
65
65
class StorageEngineGetSchemaDefinition: public unary_function<StorageEngine *, bool>
66
66
{
67
 
  SchemaIdentifier &identifier;
 
67
  const SchemaIdentifier &identifier;
68
68
  message::Schema &schema_proto;
69
69
 
70
70
public:
71
 
  StorageEngineGetSchemaDefinition(SchemaIdentifier &identifier_arg,
 
71
  StorageEngineGetSchemaDefinition(const SchemaIdentifier &identifier_arg,
72
72
                                   message::Schema &schema_proto_arg) :
73
73
    identifier(identifier_arg),
74
74
    schema_proto(schema_proto_arg) 
84
84
/*
85
85
  Return value is "if parsed"
86
86
*/
87
 
bool StorageEngine::getSchemaDefinition(TableIdentifier &identifier, message::Schema &proto)
 
87
bool StorageEngine::getSchemaDefinition(const drizzled::TableIdentifier &identifier, message::Schema &proto)
88
88
{
89
89
  return StorageEngine::getSchemaDefinition(identifier, proto);
90
90
}
91
91
 
92
 
bool StorageEngine::getSchemaDefinition(SchemaIdentifier &identifier, message::Schema &proto)
 
92
bool StorageEngine::getSchemaDefinition(const SchemaIdentifier &identifier, message::Schema &proto)
93
93
{
94
94
  proto.Clear();
95
95
 
105
105
  return false;
106
106
}
107
107
 
108
 
bool StorageEngine::doesSchemaExist(SchemaIdentifier &identifier)
 
108
bool StorageEngine::doesSchemaExist(const SchemaIdentifier &identifier)
109
109
{
110
110
  message::Schema proto;
111
111
 
113
113
}
114
114
 
115
115
 
116
 
const CHARSET_INFO *StorageEngine::getSchemaCollation(SchemaIdentifier &identifier)
 
116
const CHARSET_INFO *StorageEngine::getSchemaCollation(const SchemaIdentifier &identifier)
117
117
{
118
118
  message::Schema schmema_proto;
119
119
  bool found;
128
128
    if (not cs)
129
129
    {
130
130
      errmsg_printf(ERRMSG_LVL_ERROR,
131
 
                    _("Error while loading database options: '%s':"), identifier.getSQLPath().c_str());
 
131
                    _("Error while loading database options: '%s':"), const_cast<SchemaIdentifier &>(identifier).getSQLPath().c_str());
132
132
      errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_UNKNOWN_COLLATION), buffer.c_str());
133
133
 
134
134
      return default_charset_info;
172
172
  public unary_function<StorageEngine *, void>
173
173
{
174
174
  uint64_t &success_count;
175
 
  SchemaIdentifier &identifier;
 
175
  const SchemaIdentifier &identifier;
176
176
 
177
177
public:
178
178
 
179
 
  DropSchema(SchemaIdentifier &arg, uint64_t &count_arg) :
 
179
  DropSchema(const SchemaIdentifier &arg, uint64_t &count_arg) :
180
180
    success_count(count_arg),
181
181
    identifier(arg)
182
182
  {
192
192
  }
193
193
};
194
194
 
195
 
bool StorageEngine::dropSchema(SchemaIdentifier &identifier)
 
195
bool StorageEngine::dropSchema(const SchemaIdentifier &identifier)
196
196
{
197
197
  uint64_t counter= 0;
198
198
  // Add hook here for engines to register schema.