~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memory/ha_heap.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-01 22:04:06 UTC
  • mfrom: (1897 merge)
  • mto: This revision was merged to the branch mainline in revision 1907.
  • Revision ID: andrew@linuxjedi.co.uk-20101101220406-nj6i29uzja17u1hn
Merge trunk into branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
  bool doDoesTableExist(Session& session, const TableIdentifier &identifier);
105
105
  void doGetTableIdentifiers(CachedDirectory &directory,
106
106
                             const SchemaIdentifier &schema_identifier,
107
 
                             TableIdentifier::vector &set_of_identifiers);
 
107
                             TableIdentifiers &set_of_identifiers);
108
108
};
109
109
 
110
110
void HeapEngine::doGetTableIdentifiers(CachedDirectory&,
111
111
                                       const SchemaIdentifier&,
112
 
                                       TableIdentifier::vector&)
 
112
                                       TableIdentifiers&)
113
113
{
114
114
}
115
115
 
116
116
bool HeapEngine::doDoesTableExist(Session& session, const TableIdentifier &identifier)
117
117
{
118
 
  return session.getMessageCache().doesTableMessageExist(identifier);
 
118
  return session.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.getMessageCache().getTableMessage(identifier, table_proto))
 
125
  if (session.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.getMessageCache().removeTableMessage(identifier);
 
136
  session.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.getMessageCache().renameTableMessage(from, to);
 
629
  session.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.getMessageCache().storeTableMessage(identifier, create_proto);
 
670
    session.storeTableMessage(identifier, create_proto);
671
671
  }
672
672
 
673
673
  return error;
770
770
        auto_key= key+ 1;
771
771
        auto_key_type= field->key_type();
772
772
      }
773
 
      if ((uint)field->position() + 1 > max_key_fieldnr)
 
773
      if ((uint)field->field_index + 1 > max_key_fieldnr)
774
774
      {
775
775
        /* Do not use seg->fieldnr as it's not reliable in case of temp tables */
776
 
        max_key_fieldnr= field->position() + 1;
 
776
        max_key_fieldnr= field->field_index + 1;
777
777
      }
778
778
    }
779
779
  }