~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Andrew Hutchings
  • Date: 2010-10-15 18:30:08 UTC
  • mto: (1856.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 1857.
  • Revision ID: andrew@linuxjedi.co.uk-20101015183008-zkjr1nz08f8rhgbm
Fix several bugs dumping tables with many rows
Fix error handling on database destination

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
  }
208
208
  sbuf.setConnection(destination_connection);
209
209
  std::ostream sout(&sbuf);
 
210
  sout.exceptions(ios_base::badbit);
210
211
 
211
212
  if (path.empty())
212
213
  {
219
220
 
220
221
  for (i= database_store.begin(); i != database_store.end(); ++i)
221
222
  {
222
 
    DrizzleDumpDatabase *database= *i;
223
 
    sout << *database;
 
223
    try
 
224
    {
 
225
      DrizzleDumpDatabase *database= *i;
 
226
      sout << *database;
 
227
    }
 
228
    catch (...)
 
229
    {
 
230
      std::cout << _("Error inserting into destnation database") << std::endl;
 
231
      if (not ignore_errors)
 
232
        maybe_exit(EX_DRIZZLEERR);
 
233
    }
224
234
  }
225
235
 
226
236
  if (path.empty())