From 12aa1a5ed2ca5a3307395d20ad4776f8b9077571 Mon Sep 17 00:00:00 2001 From: no author Date: Wed, 8 Jan 2003 21:31:06 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'rel-2-9-4'. git-svn-id: svn://svn.powerdns.com/pdns/tags/rel-2-9-4/pdns@123 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- modules/gmysqlbackend/.cvsignore | 2 - modules/gmysqlbackend/INSTALL | 5 - modules/gmysqlbackend/Makefile.am | 16 -- modules/gmysqlbackend/Makefile.in | 356 ------------------------- modules/gmysqlbackend/OBJECTFILES | 1 - modules/gmysqlbackend/OBJECTLIBS | 1 - modules/gmysqlbackend/gmysqlbackend.cc | 86 ------ modules/gmysqlbackend/gmysqlbackend.hh | 16 -- modules/gmysqlbackend/smysql.cc | 126 --------- modules/gmysqlbackend/smysql.hh | 31 --- 10 files changed, 640 deletions(-) delete mode 100644 modules/gmysqlbackend/.cvsignore delete mode 100644 modules/gmysqlbackend/INSTALL delete mode 100644 modules/gmysqlbackend/Makefile.am delete mode 100644 modules/gmysqlbackend/Makefile.in delete mode 100644 modules/gmysqlbackend/OBJECTFILES delete mode 100644 modules/gmysqlbackend/OBJECTLIBS delete mode 100644 modules/gmysqlbackend/gmysqlbackend.cc delete mode 100644 modules/gmysqlbackend/gmysqlbackend.hh delete mode 100644 modules/gmysqlbackend/smysql.cc delete mode 100644 modules/gmysqlbackend/smysql.hh diff --git a/modules/gmysqlbackend/.cvsignore b/modules/gmysqlbackend/.cvsignore deleted file mode 100644 index 3dda72986..000000000 --- a/modules/gmysqlbackend/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/modules/gmysqlbackend/INSTALL b/modules/gmysqlbackend/INSTALL deleted file mode 100644 index 427fff1b2..000000000 --- a/modules/gmysqlbackend/INSTALL +++ /dev/null @@ -1,5 +0,0 @@ -Edit the Makefile so it can find the main PowerDNS sources. This is the -first line of the Makefile. - -You may want to change other things so it can find your PostgreSQL and MySQL -sources. diff --git a/modules/gmysqlbackend/Makefile.am b/modules/gmysqlbackend/Makefile.am deleted file mode 100644 index e750045df..000000000 --- a/modules/gmysqlbackend/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -lib_LTLIBRARIES = libgmysqlbackend.la - -EXTRA_DIST=OBJECTFILES OBJECTLIBS - -INCLUDES=-I@MYSQL_incdir@ - -libgmysqlbackend_la_SOURCES=gmysqlbackend.cc gmysqlbackend.hh \ - smysql.hh smysql.cc - - -libgmysqlbackend_la_LDFLAGS=-module -lmysqlclient - -# -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -lssl -lcrypt -lcrypto - - - diff --git a/modules/gmysqlbackend/Makefile.in b/modules/gmysqlbackend/Makefile.in deleted file mode 100644 index 008047027..000000000 --- a/modules/gmysqlbackend/Makefile.in +++ /dev/null @@ -1,356 +0,0 @@ -# Makefile.in generated automatically by automake 1.5 from Makefile.am. - -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_HEADER = $(INSTALL_DATA) -transform = @program_transform_name@ -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -AMTAR = @AMTAR@ -AS = @AS@ -AWK = @AWK@ -CC = @CC@ -CXX = @CXX@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DYNLINKFLAGS = @DYNLINKFLAGS@ -ECHO = @ECHO@ -EXEEXT = @EXEEXT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LEX = @LEX@ -LIBDL = @LIBDL@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MYSQL_incdir = @MYSQL_incdir@ -MYSQL_lib = @MYSQL_lib@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PGSQL_incdir = @PGSQL_incdir@ -PGSQL_lib = @PGSQL_lib@ -RANLIB = @RANLIB@ -STRIP = @STRIP@ -VERSION = @VERSION@ -YACC = @YACC@ -am__include = @am__include@ -am__quote = @am__quote@ -install_sh = @install_sh@ -moduledirs = @moduledirs@ -modulelibs = @modulelibs@ -moduleobjects = @moduleobjects@ -programdescend = @programdescend@ -socketdir = @socketdir@ - -lib_LTLIBRARIES = libgmysqlbackend.la - -EXTRA_DIST = OBJECTFILES OBJECTLIBS - -INCLUDES = -I@MYSQL_incdir@ - -libgmysqlbackend_la_SOURCES = gmysqlbackend.cc gmysqlbackend.hh \ - smysql.hh smysql.cc - - -libgmysqlbackend_la_LDFLAGS = -module -lmysqlclient -subdir = modules/gmysqlbackend -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(lib_LTLIBRARIES) - -libgmysqlbackend_la_LIBADD = -am_libgmysqlbackend_la_OBJECTS = gmysqlbackend.lo smysql.lo -libgmysqlbackend_la_OBJECTS = $(am_libgmysqlbackend_la_OBJECTS) - -DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/gmysqlbackend.Plo $(DEPDIR)/smysql.Plo -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CXXFLAGS = @CXXFLAGS@ -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ - $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(libgmysqlbackend_la_SOURCES) -DIST_COMMON = INSTALL Makefile.am Makefile.in -SOURCES = $(libgmysqlbackend_la_SOURCES) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cc .lo .o .obj - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign modules/gmysqlbackend/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && \ - CONFIG_HEADERS= CONFIG_LINKS= \ - CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) -libgmysqlbackend.la: $(libgmysqlbackend_la_OBJECTS) $(libgmysqlbackend_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libgmysqlbackend_la_LDFLAGS) $(libgmysqlbackend_la_OBJECTS) $(libgmysqlbackend_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gmysqlbackend.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/smysql.Plo@am__quote@ - -distclean-depend: - -rm -rf $(DEPDIR) - -.cc.o: -@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< - -.cc.obj: -@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(CXXCOMPILE) -c -o $@ `cygpath -w $<` - -.cc.lo: -@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< -CXXDEPMODE = @CXXDEPMODE@ -uninstall-info-am: - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) - -GTAGS: - here=`CDPATH=: && cd $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH - -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = ../.. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) - -distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - $(mkinstalldirs) "$(distdir)/$$dir"; \ - fi; \ - if test -d $$d/$$file; then \ - cp -pR $$d/$$file $(distdir) \ - || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) - -installdirs: - $(mkinstalldirs) $(DESTDIR)$(libdir) - -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: install-libLTLIBRARIES - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES - -.PHONY: GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool distclean distclean-compile \ - distclean-depend distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES - - -# -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -lssl -lcrypt -lcrypto -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/modules/gmysqlbackend/OBJECTFILES b/modules/gmysqlbackend/OBJECTFILES deleted file mode 100644 index 6a8ed864b..000000000 --- a/modules/gmysqlbackend/OBJECTFILES +++ /dev/null @@ -1 +0,0 @@ -gmysqlbackend.o smysql.o diff --git a/modules/gmysqlbackend/OBJECTLIBS b/modules/gmysqlbackend/OBJECTLIBS deleted file mode 100644 index 73c143795..000000000 --- a/modules/gmysqlbackend/OBJECTLIBS +++ /dev/null @@ -1 +0,0 @@ --lmysqlclient diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc deleted file mode 100644 index 812aeae25..000000000 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ /dev/null @@ -1,86 +0,0 @@ -// $Id: gmysqlbackend.cc,v 1.7 2002/12/16 18:02:24 ahu Exp $ -#include -#include - -using namespace std; - -#include "pdns/dns.hh" -#include "pdns/dnsbackend.hh" -#include "gmysqlbackend.hh" -#include "pdns/dnspacket.hh" -#include "pdns/ueberbackend.hh" -#include "pdns/ahuexception.hh" -#include "pdns/logger.hh" -#include "pdns/arguments.hh" - -#include "smysql.hh" - - -#include - -gMySQLBackend::gMySQLBackend(const string &mode, const string &suffix) : GSQLBackend(mode,suffix) -{ - try { - setDB(new SMySQL(getArg("dbname"), - getArg("host"), - getArg("socket"), - getArg("user"), - getArg("password"))); - - } - - catch(SSqlException &e) { - L< -#include - -#include "pdns/backends/gsql/gsqlbackend.hh" - -using namespace std; - -/** The gMySQLBackend is a DNSBackend that can answer DNS related questions. It looks up data - in PostgreSQL */ -class gMySQLBackend : public GSQLBackend -{ -public: - gMySQLBackend(const string &mode, const string &suffix); //!< Makes our connection to the database. Throws an exception if it fails. - -private: -}; diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc deleted file mode 100644 index f31812ee5..000000000 --- a/modules/gmysqlbackend/smysql.cc +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright 2001 Netherlabs BV, bert.hubert@netherlabs.nl. See LICENSE - for more information. - $Id: smysql.cc,v 1.2 2002/12/16 18:02:24 ahu Exp $ */ -#include "smysql.hh" -#include -#include -#include "pdns/logger.hh" -#include "pdns/dns.hh" -using namespace std; - -bool SMySQL::s_dolog; - -SMySQL::SMySQL(const string &database, const string &host, const string &msocket, const string &user, - const string &password) -{ - mysql_init(&d_db); - if (!mysql_real_connect(&d_db, host.empty() ? 0 : host.c_str(), - user.empty() ? 0 : user.c_str(), - password.empty() ? 0 : password.c_str(), - database.c_str(), 0, - msocket.empty() ? 0 : msocket.c_str(), - 0)) { - throw sPerrorException("Unable to connect to database"); - } - d_rres=0; -} - -void SMySQL::setLog(bool state) -{ - s_dolog=state; -} - -SMySQL::~SMySQL() -{ - mysql_close(&d_db); -} - -SSqlException SMySQL::sPerrorException(const string &reason) -{ - return SSqlException(reason+string(": ")+mysql_error(&d_db)); -} - -int SMySQL::doQuery(const string &query) -{ - if(d_rres) - throw SSqlException("Attempt to start new MySQL query while old one still in progress"); - - if(s_dolog) - L< -#include "pdns/backends/gsql/ssql.hh" - -class SMySQL : public SSql -{ -public: - SMySQL(const string &database, const string &host="", - const string &msocket="",const string &user="", - const string &password=""); - - ~SMySQL(); - - SSqlException sPerrorException(const string &reason); - int doQuery(const string &query, result_t &result); - int doQuery(const string &query); - bool getRow(row_t &row); - string escape(const string &str); - void setLog(bool state); -private: - MYSQL d_db; - MYSQL_RES *d_rres; - static bool s_dolog; -}; - -#endif /* SSMYSQL_HH */ -- 2.40.0