~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

  • Committer: Brian Aker
  • Date: 2008-12-09 17:33:02 UTC
  • mfrom: (656.1.54 devel)
  • Revision ID: brian@tangent.org-20081209173302-aptngvc7efxnatnt
Merge from Monty.

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= my_strndup(new_db_name->str, new_db_name->length,
1324
 
                                   MYF(MY_WME));
1325
1323
  new_db_file_name.length= new_db_name->length;
1326
 
 
 
1324
  new_db_file_name.str= (char *)malloc(new_db_name->length + 1);
1327
1325
  if (new_db_file_name.str == NULL)
1328
1326
    return(true);                             /* the error is set */
 
1327
  memcpy(new_db_file_name.str, new_db_name->str, new_db_name->length);
 
1328
  new_db_file_name.str[new_db_name->length]= 0;
 
1329
 
1329
1330
 
1330
1331
  /*
1331
1332
    NOTE: if check_db_name() fails, we should throw an error in any case,