~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Olaf van der Spek
  • Date: 2011-04-20 09:27:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2285.
  • Revision ID: olafvdspek@gmail.com-20110420092749-hw1q9rfj1pumc2no
Session Cache

Show diffs side-by-side

added added

removed removed

Lines of Context:
439
439
 
440
440
  {
441
441
    boost::mutex::scoped_lock scopedLock(session::Cache::mutex());
442
 
    session::Cache::list list= session::Cache::singleton().getCache();
 
442
    session::Cache::list list= session::Cache::getCache();
443
443
 
444
444
    BOOST_FOREACH(session::Cache::list::reference tmp, list)
445
445
    {
451
451
    }
452
452
  }
453
453
 
454
 
  if (session::Cache::singleton().count())
 
454
  if (session::Cache::count())
455
455
    sleep(2);                                   // Give threads time to die
456
456
 
457
457
  /*
462
462
  for (;;)
463
463
  {
464
464
    boost::mutex::scoped_lock scopedLock(session::Cache::mutex());
465
 
    session::Cache::list list= session::Cache::singleton().getCache();
 
465
    session::Cache::list list= session::Cache::getCache();
466
466
 
467
467
    if (list.empty())
468
468
    {
513
513
  if (print_message && server_start_time)
514
514
    errmsg_printf(drizzled::error::INFO, _(ER(ER_SHUTDOWN_COMPLETE)),internal::my_progname);
515
515
 
516
 
  session::Cache::singleton().shutdownFirst();
 
516
  session::Cache::shutdownFirst();
517
517
 
518
518
  /*
519
519
    The following lines may never be executed as the main thread may have
624
624
 
625
625
void Session::unlink(session_id_t &session_id)
626
626
{
627
 
  Session::shared_ptr session= session::Cache::singleton().find(session_id);
 
627
  Session::shared_ptr session= session::Cache::find(session_id);
628
628
 
629
629
  if (session)
630
630
    unlink(session);
642
642
  {
643
643
    // We should do something about an error...
644
644
  }
645
 
  session::Cache::singleton().erase(session);
 
645
  session::Cache::erase(session);
646
646
}
647
647
 
648
648
 
2054
2054
  session_startup_options= (OPTION_AUTO_IS_NULL | OPTION_SQL_NOTES);
2055
2055
  g_refresh_version= 1L;        /* Increments on each reload */
2056
2056
  global_thread_id= 1UL;
2057
 
  session::Cache::singleton().getCache().clear();
 
2057
  session::Cache::getCache().clear();
2058
2058
 
2059
2059
  /* Variables in libraries */
2060
2060
  default_character_set_name= "utf8";