~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Brian Aker
  • Date: 2010-12-31 01:14:13 UTC
  • mto: (2054.1.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2049.
  • Revision ID: brian@tangent.org-20101231011413-sc5wvqfxuotho3yv
removeĀ goto

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
  */
237
237
  if (session->wait_if_global_read_lock(false, true))
238
238
  {
239
 
    return -1;
 
239
    return true;
240
240
  }
241
241
 
 
242
  do
242
243
  {
243
244
    boost::mutex::scoped_lock scopedLock(LOCK_create_db);
244
245
 
258
259
      {
259
260
        error= -1;
260
261
        my_error(ER_DB_DROP_EXISTS, MYF(0), path.c_str());
261
 
        goto exit;
 
262
        break;
262
263
      }
263
264
    }
264
265
    else
289
290
      char *query, *query_pos, *query_end, *query_data_start;
290
291
 
291
292
      if (!(query= (char*) session->alloc(MAX_DROP_TABLE_Q_LEN)))
292
 
        goto exit; /* not much else we can do */
 
293
      {
 
294
        break; /* not much else we can do */
 
295
      }
 
296
 
293
297
      query_pos= query_data_start= strcpy(query,"drop table ")+11;
294
298
      query_end= query + MAX_DROP_TABLE_Q_LEN;
295
299
 
322
326
      }
323
327
    }
324
328
 
325
 
exit:
326
329
    /*
327
330
      If this database was the client's selected database, we silently
328
331
      change the client's selected database to nothing (to have an empty
331
334
    */
332
335
    if (schema_identifier.compare(*session->schema()))
333
336
      change_db_impl(session);
334
 
  }
 
337
  } while (0);
335
338
 
336
339
  session->startWaitingGlobalReadLock();
337
340