~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/sql_db.cc

  • Committer: Stewart Smith
  • Date: 2008-06-30 05:33:25 UTC
  • mfrom: (12.2.8 drizzle)
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: stewart@flamingspork.com-20080630053325-mwrv6bjaufcpvj8n
merge my work

Show diffs side-by-side

added added

removed removed

Lines of Context:
607
607
  char   tmp_query[FN_REFLEN+16];
608
608
  long result= 1;
609
609
  int error= 0;
610
 
  MY_STAT stat_info;
 
610
  struct stat stat_info;
611
611
  uint create_options= create_info ? create_info->options : 0;
612
612
  uint path_len;
613
613
  DBUG_ENTER("mysql_create_db");
643
643
  path_len= build_table_filename(path, sizeof(path), db, "", "", 0);
644
644
  path[path_len-1]= 0;                    // Remove last '/' from path
645
645
 
646
 
  if (my_stat(path,&stat_info,MYF(0)))
 
646
  if (!stat(path,&stat_info))
647
647
  {
648
648
    if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS))
649
649
    {
660
660
  }
661
661
  else
662
662
  {
663
 
    if (my_errno != ENOENT)
 
663
    if (errno != ENOENT)
664
664
    {
665
 
      my_error(EE_STAT, MYF(0), path, my_errno);
 
665
      my_error(EE_STAT, MYF(0), path, errno);
666
666
      goto exit;
667
667
    }
668
668
    if (my_mkdir(path,0777,MYF(0)) < 0)