~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Monty Taylor
  • Date: 2008-12-08 07:41:44 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208074144-bcv10c8p9g1h2n0z
Got closer...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1320
1320
    TODO: fix check_db_name().
1321
1321
  */
1322
1322
 
1323
 
  new_db_file_name.str= (char *)malloc(new_db_name->length+1);
 
1323
  new_db_file_name.length= new_db_name->length;
 
1324
  new_db_file_name.str= (char *)malloc(new_db_name->length + 1);
 
1325
  memcpy(new_db_file_name.str, new_db_name->str, new_db_name->length);
 
1326
  new_db_file_name.str[new_db_name->length]= 0;
 
1327
 
1324
1328
  if (new_db_file_name.str == NULL)
1325
 
    return true;
1326
 
  strncpy(new_db_file_name.str, new_db_name->str, new_db_name->length);
1327
 
  new_db_file_name.str[new_db_name->length]= 0;
1328
 
  new_db_file_name.length= new_db_name->length;
 
1329
    return(true);                             /* the error is set */
1329
1330
 
1330
1331
  /*
1331
1332
    NOTE: if check_db_name() fails, we should throw an error in any case,