~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump_data.cc

  • Committer: Brian Aker
  • Date: 2011-11-24 00:05:44 UTC
  • mto: This revision was merged to the branch mainline in revision 2465.
  • Revision ID: brian@tangent.org-20111124000544-186obn61qr3b7r9x
First pass, drizzle_create() no longer takes an argument. This means that we can now change drizzle_st without being concerned about ABI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "drizzledump_data.h"
21
 
#include "client_priv.h"
 
20
#include <config.h>
 
21
 
 
22
#include "client/drizzledump_data.h"
 
23
#include "client/client_priv.h"
22
24
#include <drizzled/definitions.h>
23
25
#include <drizzled/gettext.h>
24
26
#include <string>
544
546
  drizzle_return_t ret;
545
547
 
546
548
  if (host.empty())
 
549
  {
547
550
    host= "localhost";
 
551
  }
548
552
 
549
553
  std::string protocol= (drizzle_protocol) ? "Drizzle" : "MySQL";
550
554
  if (verbose)
552
556
    std::cerr << _("-- Connecting to ") << host  << _(" using protocol ")
553
557
      << protocol << "..." << std::endl;
554
558
  }
555
 
  drizzle_create(&drizzle);
556
 
  drizzle_con_create(&drizzle, &connection);
 
559
 
 
560
  drizzle= drizzle_create();
 
561
 
 
562
  if (drizzle == NULL)
 
563
  {
 
564
    std::cerr << "drizzle_create() failed" << std::endl;
 
565
  }
 
566
 
 
567
  drizzle_con_create(drizzle, &connection);
557
568
  drizzle_con_set_tcp(&connection, (char *)host.c_str(), port);
558
569
  drizzle_con_set_auth(&connection, (char *)username.c_str(),
559
570
    (char *)password.c_str());
675
686
DrizzleDumpConnection::~DrizzleDumpConnection()
676
687
{
677
688
  if (verbose)
 
689
  {
678
690
    std::cerr << _("-- Disconnecting from ") << hostName << "..." << std::endl;
 
691
  }
 
692
 
679
693
  drizzle_con_free(&connection);
680
 
  drizzle_free(&drizzle);
 
694
  drizzle_free(drizzle);
681
695
}