~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Lee Bieber
  • Date: 2010-12-23 23:11:00 UTC
  • mfrom: (2024.1.1 clean)
  • Revision ID: kalebral@gmail.com-20101223231100-0rqirgz7ugkl10yp
Merge Brian - session list cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
453
453
    std::string error_message;
454
454
    identifier.getSQLPath(error_message);
455
455
 
456
 
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
457
 
             error_message.c_str(),
458
 
             src_proto->InitializationErrorString().c_str());
 
456
    error_message.append(" : ");
 
457
    error_message.append(src_proto->InitializationErrorString());
 
458
 
 
459
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), error_message.c_str());
459
460
 
460
461
    return ER_CORRUPT_TABLE_DEFINITION;
461
462
  }
469
470
  {
470
471
    std::string error_message;
471
472
    identifier.getSQLPath(error_message);
472
 
 
473
 
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), error_message.c_str(), "");
 
473
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), error_message.c_str());
474
474
 
475
475
    return ER_CORRUPT_TABLE_DEFINITION;
476
476
  }
768
768
 
769
769
void StorageEngine::print_error(int error, myf errflag, Table *table)
770
770
{
771
 
  drizzled::error_t textno= ER_GET_ERRNO;
 
771
  int textno= ER_GET_ERRNO;
772
772
  switch (error) {
773
773
  case EACCES:
774
774
    textno=ER_OPEN_AS_READONLY;
846
846
    textno=ER_CRASHED_ON_USAGE;
847
847
    break;
848
848
  case HA_ERR_NOT_A_TABLE:
849
 
    textno= static_cast<drizzled::error_t>(error);
 
849
    textno= error;
850
850
    break;
851
851
  case HA_ERR_CRASHED_ON_REPAIR:
852
852
    textno=ER_CRASHED_ON_REPAIR;
1076
1076
 
1077
1077
  if (not success)
1078
1078
  {
1079
 
    std::string error_message;
1080
 
    identifier.getSQLPath(error_message);
1081
 
 
1082
1079
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
1083
 
             error_message.c_str(),
1084
1080
             table_message.InitializationErrorString().c_str());
1085
1081
    delete output;
1086
1082
 
1168
1164
    catch (...)
1169
1165
    {
1170
1166
      my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
1171
 
               table_message.name().empty() ? path.c_str() : table_message.name().c_str(),
1172
1167
               table_message.InitializationErrorString().empty() ? "": table_message.InitializationErrorString().c_str());
1173
1168
    }
1174
1169
  }
1180
1175
  return false;
1181
1176
}
1182
1177
 
1183
 
std::ostream& operator<<(std::ostream& output, const StorageEngine &engine)
1184
 
{
1185
 
  output << "StorageEngine:(";
1186
 
  output <<  engine.getName();
1187
 
  output << ")";
1188
1178
 
1189
 
  return output;
1190
 
}
1191
1179
 
1192
1180
} /* namespace plugin */
1193
1181
} /* namespace drizzled */