~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-05-20 23:51:08 UTC
  • mfrom: (1022.2.18 mordred)
  • Revision ID: brian@gaz-20090520235108-nb5he1em112798pb
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
 
361
361
FILE *stderror_file=0;
362
362
 
363
 
I_List<Session> session_list;
 
363
vector<Session*> session_list;
364
364
I_List<NAMED_LIST> key_caches;
365
365
 
366
366
struct system_variables global_system_variables;
481
481
 
482
482
  (void) pthread_mutex_lock(&LOCK_thread_count); // For unlink from list
483
483
 
484
 
  I_List_iterator<Session> it(session_list);
485
 
  while ((tmp=it++))
 
484
  for( vector<Session*>::iterator it= session_list.begin(); it != session_list.end(); ++it )
486
485
  {
 
486
    tmp= *it;
487
487
    tmp->killed= Session::KILL_CONNECTION;
488
488
    thread_scheduler.post_kill_notification(tmp);
489
489
    if (tmp->mysys_var)
512
512
  for (;;)
513
513
  {
514
514
    (void) pthread_mutex_lock(&LOCK_thread_count); // For unlink from list
515
 
    if (!(tmp= session_list.get()))
 
515
    if (session_list.empty())
516
516
    {
517
517
      (void) pthread_mutex_unlock(&LOCK_thread_count);
518
518
      break;
519
519
    }
 
520
    tmp= session_list.front();
520
521
    (void) pthread_mutex_unlock(&LOCK_thread_count);
521
522
    tmp->protocol->forceClose();
522
523
  }
967
968
 
968
969
  (void) pthread_mutex_lock(&LOCK_thread_count);
969
970
  pthread_mutex_lock(&session->LOCK_delete);
 
971
 
 
972
  session_list.erase(remove(session_list.begin(),
 
973
                     session_list.end(),
 
974
                     session));
 
975
 
970
976
  delete session;
971
977
  (void) pthread_mutex_unlock(&LOCK_thread_count);
972
978
 
1868
1874
    If we error on creation we drop the connection and delete the session.
1869
1875
  */
1870
1876
  pthread_mutex_lock(&LOCK_thread_count);
1871
 
  session_list.append(session);
 
1877
  session_list.push_back(session);
1872
1878
  pthread_mutex_unlock(&LOCK_thread_count);
1873
1879
  if (thread_scheduler.add_connection(session))
1874
1880
  {
2776
2782
  strcpy(server_version, VERSION);
2777
2783
  myisam_recover_options_str= "OFF";
2778
2784
  myisam_stats_method_str= "nulls_unequal";
2779
 
  session_list.empty();
 
2785
  session_list.clear();
2780
2786
  key_caches.empty();
2781
2787
  if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str,
2782
2788
                                                default_key_cache_base.length)))