~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2010-06-11 17:53:40 UTC
  • mfrom: (1608.1.3 build)
  • Revision ID: brian@gaz-20100611175340-9ok4r35ait2sb2de
Rollup merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1091
1091
  google::protobuf::io::ZeroCopyOutputStream* output=
1092
1092
    new google::protobuf::io::FileOutputStream(fd);
1093
1093
 
1094
 
  if (not table_message.SerializeToZeroCopyStream(output))
 
1094
  bool success;
 
1095
 
 
1096
  try {
 
1097
    success= table_message.SerializeToZeroCopyStream(output);
 
1098
  }
 
1099
  catch (...)
 
1100
  {
 
1101
    success= false;
 
1102
  }
 
1103
 
 
1104
  if (not success)
1095
1105
  {
1096
1106
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
1097
1107
             table_message.InitializationErrorString().c_str());
1172
1182
 
1173
1183
  if (input.good())
1174
1184
  {
1175
 
    if (table_message.ParseFromIstream(&input))
 
1185
    try {
 
1186
      if (table_message.ParseFromIstream(&input))
 
1187
      {
 
1188
        return true;
 
1189
      }
 
1190
    }
 
1191
    catch (...)
1176
1192
    {
1177
 
      return true;
 
1193
      my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
 
1194
               table_message.InitializationErrorString().empty() ? "": table_message.InitializationErrorString().c_str());
1178
1195
    }
1179
 
 
1180
 
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
1181
 
             table_message.InitializationErrorString().c_str());
1182
1196
  }
1183
1197
  else
1184
1198
  {