~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memory/ha_heap.cc

  • Committer: Lee Bieber
  • Date: 2010-11-12 19:03:08 UTC
  • mfrom: (1923.1.4 trunk)
  • Revision ID: kalebral@gmail.com-20101112190308-lyejhhgpfaf9r8f3
Merge Brian - Encapsulate up the cache we use in Session for tracking table proto for temp tables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
 
116
116
bool HeapEngine::doDoesTableExist(Session& session, const TableIdentifier &identifier)
117
117
{
118
 
  return session.doesTableMessageExist(identifier);
 
118
  return session.getMessageCache().doesTableMessageExist(identifier);
119
119
}
120
120
 
121
121
int HeapEngine::doGetTableDefinition(Session &session,
122
122
                                     const TableIdentifier &identifier,
123
123
                                     message::Table &table_proto)
124
124
{
125
 
  if (session.getTableMessage(identifier, table_proto))
 
125
  if (session.getMessageCache().getTableMessage(identifier, table_proto))
126
126
    return EEXIST;
127
127
 
128
128
  return ENOENT;
133
133
*/
134
134
int HeapEngine::doDropTable(Session &session, const TableIdentifier &identifier)
135
135
{
136
 
  session.removeTableMessage(identifier);
 
136
  session.getMessageCache().removeTableMessage(identifier);
137
137
 
138
138
  int error= heap_delete_table(identifier.getPath().c_str());
139
139
 
626
626
 
627
627
int HeapEngine::doRenameTable(Session &session, const TableIdentifier &from, const TableIdentifier &to)
628
628
{
629
 
  session.renameTableMessage(from, to);
 
629
  session.getMessageCache().renameTableMessage(from, to);
630
630
  return heap_rename(from.getPath().c_str(), to.getPath().c_str());
631
631
}
632
632
 
667
667
 
668
668
  if (error == 0)
669
669
  {
670
 
    session.storeTableMessage(identifier, create_proto);
 
670
    session.getMessageCache().storeTableMessage(identifier, create_proto);
671
671
  }
672
672
 
673
673
  return error;