~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/concurrent.cc

merge innobase 1.0.9 build fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
{
64
64
  safe_mutex_assert_owner(LOCK_open.native_handle());
65
65
 
66
 
  if (session->killed)
 
66
  if (session->getKilled())
67
67
    return true;
68
68
 
69
69
  TableIdentifier identifier(table_list->getSchemaName(), table_list->getTableName());
129
129
retry:
130
130
  if (not (share= TableShare::getShareCreate(session,
131
131
                                             identifier,
132
 
                                             &error)))
 
132
                                             error)))
 
133
  {
133
134
    return 1;
 
135
  }
134
136
 
135
137
  while ((error= share->open_table_from_share(session,
136
138
                                              identifier,
177
179
      /* Free share and wait until it's released by all threads */
178
180
      TableShare::release(share);
179
181
 
180
 
      if (!session->killed)
 
182
      if (not session->getKilled())
181
183
      {
182
184
        drizzle_reset_errors(session, 1);         // Clear warnings
183
185
        session->clear_error();                 // Clear error message
194
196
  return 0;
195
197
}
196
198
 
 
199
void table::Concurrent::release(void)
 
200
{
 
201
  // During an ALTER TABLE we could see the proto go away when the
 
202
  // definition is pushed out of this table object. In this case we would
 
203
  // not release from the cache because we were not in the cache. We just
 
204
  // delete if this happens.
 
205
  if (getShare()->getType() == message::Table::STANDARD)
 
206
  {
 
207
    TableShare::release(getMutableShare());
 
208
  }
 
209
  else
 
210
  {
 
211
    delete _share;
 
212
  }
 
213
  _share= NULL;
 
214
}
 
215
 
197
216
} /* namespace table */
198
217
} /* namespace drizzled */