~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Brian Aker
  • Date: 2010-11-08 18:24:58 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108182458-twv4hyix43ojno80
Merge in changes such that lock is now broken out into its own directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
      opt_destination_port, opt_destination_user, opt_destination_password,
201
201
      false);
202
202
  }
203
 
  catch (std::exception&)
 
203
  catch (...)
204
204
  {
205
205
    cerr << "Could not connect to destination database server" << endl;
206
206
    maybe_exit(EX_DRIZZLEERR);
225
225
      DrizzleDumpDatabase *database= *i;
226
226
      sout << *database;
227
227
    }
228
 
    catch (std::exception&)
 
228
    catch (...)
229
229
    {
230
230
      std::cout << _("Error inserting into destination database") << std::endl;
231
231
      if (not ignore_errors)
575
575
 
576
576
  std::string user_config_dir((getenv("XDG_CONFIG_HOME")? getenv("XDG_CONFIG_HOME"):"~/.config"));
577
577
 
578
 
  if (user_config_dir.compare(0, 2, "~/") == 0)
579
 
  {
580
 
    char *homedir;
581
 
    homedir= getenv("HOME");
582
 
    if (homedir != NULL)
583
 
      user_config_dir.replace(0, 1, homedir);
584
 
  }
585
 
 
586
578
  po::positional_options_description p;
587
579
  p.add("database-used", 1);
588
580
  p.add("Table-used",-1);
754
746
    db_connection = new DrizzleDumpConnection(current_host, opt_drizzle_port,
755
747
      current_user, opt_password, use_drizzle_protocol);
756
748
  }
757
 
  catch (std::exception&)
 
749
  catch (...)
758
750
  {
759
751
    maybe_exit(EX_DRIZZLEERR);
760
752
  }
801
793
    dump_selected_tables(database_used, vm["Table-used"].as< vector<string> >());
802
794
  }
803
795
 
804
 
  if (vm.count("Table-used") and opt_databases)
 
796
  if (vm.count("Table-used") && opt_databases)
805
797
  {
 
798
/*
 
799
 * This is not valid!
806
800
    vector<string> database_used= vm["database-used"].as< vector<string> >();
807
801
    vector<string> table_used= vm["Table-used"].as< vector<string> >();
808
802
 
812
806
    {
813
807
      database_used.insert(database_used.end(), *it);
814
808
    }
815
 
 
816
809
    dump_databases(database_used);
817
 
    dump_all_tables();
 
810
    dump_tables();
 
811
*/
818
812
  }
819
 
 
 
813
  
820
814
  if (vm.count("database-used") && ! vm.count("Table-used"))
821
815
  {
822
816
    dump_databases(vm["database-used"].as< vector<string> >());
823
817
    dump_all_tables();
824
818
  }
825
 
 
826
819
  if (opt_destination == DESTINATION_STDOUT)
827
820
    generate_dump();
828
821
  else