~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2010-11-08 08:02:36 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108080236-8gaumfjlec0webqm
Second pass on move code to global lock encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
 
150
150
  LOCK_open.lock(); /* Part 2 of rm a table */
151
151
 
152
 
  if (not drop_temporary && lock_table_names_exclusively(session, tables))
 
152
  if (not drop_temporary && session->lock_table_names_exclusively(tables))
153
153
  {
154
154
    LOCK_open.unlock();
155
155
    return 1;
1676
1676
 
1677
1677
  table->cursor->extra(function);
1678
1678
  /* Mark all tables that are in use as 'old' */
1679
 
  mysql_lock_abort(session, table);     /* end threads waiting on lock */
 
1679
  session->mysql_lock_abort(table);     /* end threads waiting on lock */
1680
1680
 
1681
1681
  /* Wait until all there are no other threads that has this table open */
1682
1682
  TableIdentifier identifier(table->getShare()->getSchemaName(), table->getShare()->getTableName());
1707
1707
  /* Close lock if this is not got with LOCK TABLES */
1708
1708
  if (lock)
1709
1709
  {
1710
 
    mysql_unlock_tables(this, lock);
 
1710
    mysql_unlock_tables(lock);
1711
1711
    lock= NULL;                 // Start locked threads
1712
1712
  }
1713
1713
  /* Close all copies of 'table'.  This also frees all LOCK TABLES lock */
1829
1829
      LOCK_open.lock(); /* Lock type is TL_WRITE and we lock to repair the table */
1830
1830
      const char *old_message=session->enter_cond(COND_refresh, LOCK_open,
1831
1831
                                                  "Waiting to get writelock");
1832
 
      mysql_lock_abort(session,table->table);
 
1832
      session->mysql_lock_abort(table->table);
1833
1833
      TableIdentifier identifier(table->table->getShare()->getSchemaName(), table->table->getShare()->getTableName());
1834
1834
      table::Cache::singleton().removeTable(session, identifier, RTFC_WAIT_OTHER_THREAD_FLAG | RTFC_CHECK_KILLED_FLAG);
1835
1835
      session->exit_cond(old_message);