~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

Big merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
  return false;
297
297
}
298
298
 
299
 
bool mysqld_show_create_db(Session *session, char *dbname, bool if_not_exists)
 
299
bool mysqld_show_create_db(Session *session, const NormalisedDatabaseName &database_name, bool if_not_exists)
300
300
{
301
301
  char buff[2048];
302
302
  String buffer(buff, sizeof(buff), system_charset_info);
303
303
 
304
 
  if (store_db_create_info(dbname, &buffer, if_not_exists))
 
304
  if (store_db_create_info(database_name.to_string().c_str(), &buffer, if_not_exists))
305
305
  {
306
306
    /*
307
307
      This assumes that the only reason for which store_db_create_info()
308
308
      can fail is incorrect database name (which is the case now).
309
309
    */
310
 
    my_error(ER_BAD_DB_ERROR, MYF(0), dbname);
 
310
    my_error(ER_BAD_DB_ERROR, MYF(0), database_name.to_string().c_str());
311
311
    return true;
312
312
  }
313
313
 
318
318
  if (session->client->sendFields(&field_list))
319
319
    return true;
320
320
 
321
 
  session->client->store(dbname, strlen(dbname));
 
321
  session->client->store(database_name.to_string().c_str(), database_name.to_string().length());
322
322
  session->client->store(buffer.ptr(), buffer.length());
323
323
 
324
324
  if (session->client->flush())