~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_share.h

  • Committer: Brian Aker
  • Date: 2010-03-16 17:52:35 UTC
  • Revision ID: brian@gaz-20100316175235-hp5cuqqx1aewadrv
Update/fix for leak.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
typedef drizzled::hash_map<std::string, TableShare *> TableDefinitionCache;
40
40
 
 
41
const static std::string STANDARD_STRING("STANDARD");
 
42
const static std::string TEMPORARY_STRING("TEMPORARY");
 
43
const static std::string INTERNAL_STRING("INTERNAL");
 
44
const static std::string FUNCTION_STRING("FUNCTION");
 
45
 
41
46
class TableShare
42
47
{
43
48
public:
208
213
    return table_name.str;
209
214
  }
210
215
 
 
216
  const std::string &getTableName(std::string &name_arg) const
 
217
  {
 
218
    name_arg.clear();
 
219
    name_arg.append(table_name.str, table_name.length);
 
220
 
 
221
    return name_arg;
 
222
  }
 
223
 
211
224
  const char *getSchemaName() const
212
225
  {
213
226
    return db.str;
246
259
  message::Table *table_proto;
247
260
public:
248
261
 
249
 
  const char * getTableTypeAsString() const
 
262
  const std::string &getTableTypeAsString() const
250
263
  {
251
264
    switch (table_proto->type())
252
265
    {
253
266
    default:
254
267
    case message::Table::STANDARD:
255
 
      return "STANDARD";
 
268
      return STANDARD_STRING;
256
269
    case message::Table::TEMPORARY:
257
 
      return "TEMPORARY";
 
270
      return TEMPORARY_STRING;
258
271
    case message::Table::INTERNAL:
259
 
      return "INTERNAL";
 
272
      return INTERNAL_STRING;
260
273
    case message::Table::FUNCTION:
261
 
      return "FUNCTION";
 
274
      return FUNCTION_STRING;
262
275
    }
263
276
  }
264
277