~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/scheduler.cc

  • Committer: Brian Aker
  • Date: 2008-08-18 04:35:40 UTC
  • mfrom: (342 codestyle)
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818043540-numg7vydi7b0bzcd
Mering Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    
119
119
  if (!io_event)
120
120
  {
121
 
    sql_print_error("Memory allocation error in thd_scheduler::init\n");
 
121
    sql_print_error(_("Memory allocation error in thd_scheduler::init\n"));
122
122
    return true;
123
123
  }
124
124
  
209
209
  /* set up the pipe used to add new thds to the event pool */
210
210
  if (init_pipe(thd_add_pipe))
211
211
  {
212
 
    sql_print_error("init_pipe(thd_add_pipe) error in libevent_init\n");
 
212
    sql_print_error(_("init_pipe(thd_add_pipe) error in libevent_init\n"));
213
213
    return(1);
214
214
  }
215
215
  /* set up the pipe used to kill thds in the event queue */
216
216
  if (init_pipe(thd_kill_pipe))
217
217
  {
218
 
    sql_print_error("init_pipe(thd_kill_pipe) error in libevent_init\n");
 
218
    sql_print_error(_("init_pipe(thd_kill_pipe) error in libevent_init\n"));
219
219
    close(thd_add_pipe[0]);
220
220
    close(thd_add_pipe[1]);
221
221
    return(1);
227
227
 
228
228
 if (event_add(&thd_add_event, NULL) || event_add(&thd_kill_event, NULL))
229
229
 {
230
 
   sql_print_error("thd_add_event event_add error in libevent_init\n");
 
230
   sql_print_error(_("thd_add_event event_add error in libevent_init\n"));
231
231
   libevent_end();
232
232
   return(1);
233
233
   
243
243
    if ((error= pthread_create(&thread, &connection_attrib,
244
244
                               libevent_thread_proc, 0)))
245
245
    {
246
 
      sql_print_error("Can't create completion port thread (error %d)",
 
246
      sql_print_error(_("Can't create completion port thread (error %d)"),
247
247
                      error);
248
248
      pthread_mutex_unlock(&LOCK_thread_count);
249
249
      libevent_end();                      // Cleanup
356
356
      /* Add to libevent */
357
357
      if (event_add(thd->scheduler.io_event, NULL))
358
358
      {
359
 
        sql_print_error("event_add error in libevent_add_thd_callback\n");
 
359
        sql_print_error(_("event_add error in libevent_add_thd_callback\n"));
360
360
        libevent_connection_close(thd);
361
361
      } 
362
362
      else
382
382
{
383
383
  if (thd->scheduler.init(thd))
384
384
  {
385
 
    sql_print_error("Scheduler init error in libevent_add_new_connection\n");
 
385
    sql_print_error(_("Scheduler init error in libevent_add_new_connection\n"));
386
386
    pthread_mutex_unlock(&LOCK_thread_count);
387
387
    libevent_connection_close(thd);
388
388
    return;
464
464
  if (init_new_connection_handler_thread())
465
465
  {
466
466
    my_thread_global_end();
467
 
    sql_print_error("libevent_thread_proc: my_thread_init() failed\n");
 
467
    sql_print_error(_("libevent_thread_proc: my_thread_init() failed\n"));
468
468
    exit(1);
469
469
  }
470
470