~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-10-26 21:56:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1886.
  • Revision ID: brian@tangent.org-20101026215622-6fcmp520ouj5446p
Update Key to work a bit faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
 
194
194
static UnusedTables unused_tables;
195
195
 
196
 
unsigned char *table_cache_key(const unsigned char *record,
197
 
                               size_t *length,
198
 
                               bool );
199
 
 
200
 
unsigned char *table_cache_key(const unsigned char *record,
201
 
                               size_t *length,
202
 
                               bool )
203
 
{
204
 
  Table *entry=(Table*) record;
205
 
  *length= entry->getShare()->getCacheKey().size();
206
 
  return (unsigned char*) &entry->getShare()->getCacheKey()[0];
207
 
}
208
 
 
209
196
bool table_cache_init(void)
210
197
{
211
198
  return false;
256
243
  const TableIdentifier::Key &key(identifier.getKey());
257
244
  TableShare *share= new TableShare(identifier.getType(),
258
245
                                    identifier,
259
 
                                    const_cast<char *>(&key[0]),  static_cast<uint32_t>(table->getShare()->getCacheKeySize()));
 
246
                                    const_cast<char *>(key.vector()),  static_cast<uint32_t>(table->getShare()->getCacheKeySize()));
260
247
 
261
248
  table->cursor->close();
262
249
  table->db_stat= 0;                            // Mark cursor closed