~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2010-01-22 00:53:13 UTC
  • Revision ID: brian@gaz-20100122005313-jmizcbcdi1lt4tcx
Revert db patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
303
303
  return false;
304
304
}
305
305
 
306
 
bool mysqld_show_create_db(Session *session, const NormalisedDatabaseName &database_name, bool if_not_exists)
 
306
bool mysqld_show_create_db(Session *session, char *dbname, bool if_not_exists)
307
307
{
308
308
  char buff[2048];
309
309
  String buffer(buff, sizeof(buff), system_charset_info);
310
310
 
311
 
  if (store_db_create_info(database_name.to_string().c_str(), &buffer, if_not_exists))
 
311
  if (store_db_create_info(dbname, &buffer, if_not_exists))
312
312
  {
313
313
    /*
314
314
      This assumes that the only reason for which store_db_create_info()
315
315
      can fail is incorrect database name (which is the case now).
316
316
    */
317
 
    my_error(ER_BAD_DB_ERROR, MYF(0), database_name.to_string().c_str());
 
317
    my_error(ER_BAD_DB_ERROR, MYF(0), dbname);
318
318
    return true;
319
319
  }
320
320
 
325
325
  if (session->client->sendFields(&field_list))
326
326
    return true;
327
327
 
328
 
  session->client->store(database_name.to_string().c_str(), database_name.to_string().length());
 
328
  session->client->store(dbname, strlen(dbname));
329
329
  session->client->store(buffer.ptr(), buffer.length());
330
330
 
331
331
  if (session->client->flush())