~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2010-11-09 17:12:40 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1922.
  • Revision ID: brian@tangent.org-20101109171240-9b7pvlxb68cany87
Check simple cache performance hit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
#include <drizzled/table/shell.h>
58
58
 
 
59
#include "drizzled/message/cache.h"
 
60
 
59
61
#include <boost/algorithm/string/compare.hpp>
60
62
 
61
63
static bool shutdown_has_begun= false; // Once we put in the container for the vector/etc for engines this will go away.
383
385
    }
384
386
  }
385
387
 
 
388
  drizzled::message::TablePtr table_ptr;
 
389
  if ((table_ptr= drizzled::message::Cache::singleton().find(identifier)))
 
390
  {
 
391
    table_message.CopyFrom(*(table_ptr.get()));
 
392
  }
 
393
 
386
394
  EngineVector::iterator iter=
387
395
    find_if(vector_of_engines.begin(), vector_of_engines.end(),
388
396
            StorageEngineGetTableDefinition(session, identifier, table_message, err));
392
400
    return ENOENT;
393
401
  }
394
402
 
 
403
 drizzled::message::Cache::singleton().insert(identifier, table_message);
 
404
 
395
405
  return err;
396
406
}
397
407
 
489
499
    }
490
500
  }
491
501
 
 
502
  drizzled::message::Cache::singleton().erase(identifier);
492
503
 
493
504
  return error;
494
505
}