~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Lee Bieber
  • Date: 2011-03-23 23:16:25 UTC
  • mfrom: (2247.1.2 build)
  • Revision ID: kalebral@gmail.com-20110323231625-61k77qbh7n1iu776
Merge Olaf - Use BOOST_FOREACH
Merge Olaf - Remove std::nothrow from new()

Show diffs side-by-side

added added

removed removed

Lines of Context:
592
592
    }
593
593
 
594
594
    if (error == ER_TABLE_PERMISSION_DENIED)
595
 
    {
596
595
      my_error(ER_TABLE_PERMISSION_DENIED, identifier);
597
 
    }
598
596
    else if (error)
599
 
    {
600
 
      std::string path;
601
 
      identifier.getSQLPath(path);
602
 
      my_error(ER_CANT_CREATE_TABLE, MYF(ME_BELL+ME_WAITTANG), path.c_str(), error);
603
 
    }
604
 
 
 
597
      my_error(ER_CANT_CREATE_TABLE, MYF(ME_BELL+ME_WAITTANG), identifier.getSQLPath().c_str(), error);
605
598
    table.delete_table();
606
599
  }
607
 
 
608
600
  return(error == EE_OK);
609
601
}
610
602
 
641
633
  CachedDirectory directory(schema_identifier.getPath(), set_of_table_definition_ext);
642
634
 
643
635
  if (schema_identifier == INFORMATION_SCHEMA_IDENTIFIER)
644
 
  { }
 
636
  { 
 
637
        }
645
638
  else if (schema_identifier == DATA_DICTIONARY_IDENTIFIER)
646
 
  { }
647
 
  else
 
639
  { 
 
640
        }
 
641
  else if (directory.fail())
648
642
  {
649
 
    if (directory.fail())
650
 
    {
651
 
      errno= directory.getError();
652
 
      if (errno == ENOENT)
653
 
      {
654
 
        std::string path;
655
 
        schema_identifier.getSQLPath(path);
656
 
        my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), path.c_str());
657
 
      }
658
 
      else
659
 
      {
660
 
        my_error(ER_CANT_READ_DIR, MYF(ME_BELL+ME_WAITTANG), directory.getPath(), errno);
661
 
      }
662
 
 
663
 
      return;
664
 
    }
 
643
    errno= directory.getError();
 
644
    if (errno == ENOENT)
 
645
      my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), schema_identifier.getSQLPath().c_str());
 
646
    else
 
647
      my_error(ER_CANT_READ_DIR, MYF(ME_BELL+ME_WAITTANG), directory.getPath(), errno);
 
648
    return;
665
649
  }
666
650
 
667
651
  std::for_each(vector_of_engines.begin(), vector_of_engines.end(),
1108
1092
 
1109
1093
  if (not success)
1110
1094
  {
1111
 
    std::string error_message;
1112
 
    identifier.getSQLPath(error_message);
1113
 
 
1114
 
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
1115
 
             error_message.c_str(),
1116
 
             table_message.InitializationErrorString().c_str());
 
1095
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), identifier.getSQLPath().c_str(), table_message.InitializationErrorString().c_str());
1117
1096
    delete output;
1118
1097
 
1119
1098
    if (close(fd) == -1)