Changeset 35049

Show
Ignore:
Timestamp:
08/26/09 04:45:45 (4 years ago)
Author:
kazuho
Message:

degradation fix (invalid stack address causing open table failure)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/mysql/mycached/trunk/mycached.cc

    r35048 r35049  
    4040static cac_mutex_t<mycached_server_info> server_info_(NULL); 
    4141 
    42 inline void setup_thd(THD** thd) { 
     42inline void setup_thd(THD* thd) { 
     43  char dummy; 
    4344  my_thread_init(); 
    44   (*thd)->thread_stack = (char*)thd; 
    45   (*thd)->store_globals(); 
    46   lex_start(*thd); 
    47   (*thd)->db = my_strdup("mysql", MYF(0)); 
    48   (*thd)->db_length = 5; 
     45  thd->thread_stack = &dummy; 
     46  thd->store_globals(); 
     47  lex_start(thd); 
     48  thd->db = my_strdup("mysql", MYF(0)); 
     49  thd->db_length = 5; 
    4950} 
    5051 
     
    356357thread_t::event_loop() 
    357358{ 
    358   setup_thd(&thd_); 
     359  setup_thd(thd_); 
    359360 
    360361  // main loop