~ubuntu-branches/ubuntu/utopic/pdns/utopic-updates

« back to all changes in this revision

Viewing changes to modules/mysqlbackend/mysqlcbackend.hh

  • Committer: Package Import Robot
  • Author(s): Marc Haber, Marc Haber, Evgeni Golov
  • Date: 2012-05-11 23:51:27 UTC
  • mfrom: (1.1.9) (12.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120511235127-v0qjuaplfckcb2cd
Tags: 3.1-1
[ Marc Haber ]
* Imported Upstream version 3.1
  * reduce column size for 'algorithm' to 50. Closes: #662935
  * handle smallcaps RRs. Closes: #656788
* refresh patches
* remove unused patches
* add patch to turn off the traceback handler at run time
* add patch for changeset 2575 (race condition with supermasters)
* fix mysql multiarch build failure, set cflags etc to hardening defaults
* do not run bootstrap a build time, using autotools_dev
* use dh-autoreconf, remove autofoo created files from
  patches/fix-mongodb-backend-patch
* fix dh invocation
* create MySQL databases with engine=innodb instead of type
* set debian/compat to 9
* Standards-Version: 3.9.3 (no changes needed)
* add myself to uploaders, change Vcs-Header to my git. Closes: #672550

[ Evgeni Golov ]
* use system libpolarssl if present, local copy otherwise.
  Closes: #671856, #656861

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef MYSQLCBACKEND_HH
2
 
#define MYSQLCBACKEND_HH
3
 
 
4
 
#include <string>
5
 
#include <map>
6
 
 
7
 
#include "pdns/namespaces.hh"
8
 
 
9
 
#include <mysql.h>
10
 
 
11
 
 
12
 
/** The MySQLBackend is a DNSBackend that can answer DNS related questions. It looks up data
13
 
    in MySQL */
14
 
class MySQLBackend : public DNSBackend
15
 
{
16
 
public:
17
 
  MySQLBackend(const string &suffix="");
18
 
  ~MySQLBackend();
19
 
  MYSQL_RES *d_res;
20
 
  MySQLBackend *parent;
21
 
  string d_qname;
22
 
  QType d_qtype;
23
 
  
24
 
  void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1);
25
 
  bool list(const string &target, int domain_id);
26
 
  bool get(DNSResourceRecord &r);
27
 
    
28
 
private:
29
 
  MYSQL db; 
30
 
 
31
 
  string sqlEscape(const string &nanme); //!< Escape ' and \ for SQL purposes
32
 
  string d_table;
33
 
};
34
 
#endif /* MYSQLCBACKEND_HH */