~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
StorageEngine::StorageEngine(const string name_arg,
75
75
                                     const bitset<HTON_BIT_SIZE> &flags_arg)
76
76
    : Plugin(name_arg, "StorageEngine"),
77
 
      enabled(true),
78
77
      flags(flags_arg),
79
 
      slot(0)
 
78
      slot(total_ha++)
80
79
{
81
 
  if (enabled)
82
 
  {
83
 
    slot= total_ha++;
84
 
  }
85
80
  pthread_mutex_init(&proto_cache_mutex, NULL);
86
81
}
87
82
 
275
270
  */
276
271
  inline result_type operator() (argument_type engine)
277
272
  {
278
 
    if (engine->is_enabled() && (*session->getEngineData(engine)))
 
273
    if (*session->getEngineData(engine))
279
274
      engine->close_connection(session);
280
275
  }
281
276
};
307
302
  }
308
303
  else
309
304
  {
310
 
    if ((!engine->is_enabled()) ||
311
 
        (engine->flush_logs()))
 
305
    if (engine->flush_logs())
312
306
      return true;
313
307
  }
314
308
  return false;
618
612
    }
619
613
  }
620
614
 
621
 
  if (! share.storage_engine->is_enabled())
622
 
  {
623
 
    error= HA_ERR_UNSUPPORTED;
624
 
    goto err2;
625
 
  }
626
 
 
627
 
 
628
615
  {
629
616
    char name_buff[FN_REFLEN];
630
617
    const char *table_name_arg;
655
642
 
656
643
Cursor *StorageEngine::getCursor(TableShare &share, memory::Root *alloc)
657
644
{
658
 
  assert(enabled);
659
645
  return create(share, alloc);
660
646
}
661
647