~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/ha_myisam.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-28 06:01:24 UTC
  • mto: (968.2.5 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: osullivan.padraig@gmail.com-20090328060124-fdjygihvmr0kpf58
Reverting some refactoring changes I made to MyISAM that didn't really work
out.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/error.h>
25
25
#include <drizzled/errmsg_print.h>
26
26
#include <drizzled/gettext.h>
 
27
#include <drizzled/session.h>
27
28
#include <drizzled/protocol.h>
28
29
#include <drizzled/table.h>
29
30
#include <drizzled/field/timestamp.h>
30
 
#include <drizzled/session.h>
31
31
 
32
32
#include <string>
33
33
 
462
462
                        const char *sfile, uint32_t sline)
463
463
{
464
464
  Session *cur_session;
 
465
  LIST *element;
465
466
  pthread_mutex_lock(&file->s->intern_lock);
466
 
  if ((cur_session= (Session*) file->in_use))
 
467
  if ((cur_session= (Session*) file->in_use.data))
467
468
    errmsg_printf(ERRMSG_LVL_ERROR, _("Got an error from thread_id=%"PRIu64", %s:%d"),
468
469
                    cur_session->thread_id,
469
470
                    sfile, sline);
471
472
    errmsg_printf(ERRMSG_LVL_ERROR, _("Got an error from unknown thread, %s:%d"), sfile, sline);
472
473
  if (message)
473
474
    errmsg_printf(ERRMSG_LVL_ERROR, "%s", message);
474
 
  list<Session *>::iterator it= file->s->in_use.begin();
475
 
  while (it != file->s->in_use.end())
 
475
  for (element= file->s->in_use; element; element= list_rest(element))
476
476
  {
477
477
    errmsg_printf(ERRMSG_LVL_ERROR, "%s", _("Unknown thread accessing table"));
478
478
  }
1614
1614
 
1615
1615
int ha_myisam::external_lock(Session *session, int lock_type)
1616
1616
{
1617
 
  file->in_use= session;
 
1617
  file->in_use.data= session;
1618
1618
  return mi_lock_database(file, !table->s->tmp_table ?
1619
1619
                          lock_type : ((lock_type == F_UNLCK) ?
1620
1620
                                       F_UNLCK : F_EXTRA_LCK));