~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/ha_myisam.cc

Merged padraig's removal of list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
                        const char *sfile, uint32_t sline)
463
463
{
464
464
  Session *cur_session;
465
 
  LIST *element;
466
465
  pthread_mutex_lock(&file->s->intern_lock);
467
 
  if ((cur_session= (Session*) file->in_use.data))
 
466
  if ((cur_session= file->in_use))
468
467
    errmsg_printf(ERRMSG_LVL_ERROR, _("Got an error from thread_id=%"PRIu64", %s:%d"),
469
468
                    cur_session->thread_id,
470
469
                    sfile, sline);
472
471
    errmsg_printf(ERRMSG_LVL_ERROR, _("Got an error from unknown thread, %s:%d"), sfile, sline);
473
472
  if (message)
474
473
    errmsg_printf(ERRMSG_LVL_ERROR, "%s", message);
475
 
  for (element= file->s->in_use; element; element= list_rest(element))
 
474
  list<Session *>::iterator it= file->s->in_use->begin();
 
475
  while (it != file->s->in_use->end())
476
476
  {
477
477
    errmsg_printf(ERRMSG_LVL_ERROR, "%s", _("Unknown thread accessing table"));
 
478
    ++it;
478
479
  }
479
480
  pthread_mutex_unlock(&file->s->intern_lock);
480
481
}
1614
1615
 
1615
1616
int ha_myisam::external_lock(Session *session, int lock_type)
1616
1617
{
1617
 
  file->in_use.data= session;
 
1618
  file->in_use= session;
1618
1619
  return mi_lock_database(file, !table->s->tmp_table ?
1619
1620
                          lock_type : ((lock_type == F_UNLCK) ?
1620
1621
                                       F_UNLCK : F_EXTRA_LCK));