[Pdns-dev] Here is the generic SQLite backend, please test

Michel Stol michel at powerdns.com
Sun Sep 21 14:46:58 CEST 2003


Hello,

Attached to this mail you'll find the files necessary to build the brand 
new generic SQLite backend and configure.in. The files should go in the 
modules/gsqlitebackend/ (except configure.in).
You can find the library needed to build this backend on 
http://www.sqlite.org/ (or just apt if you use debian :)).

Documentation has still to be written, but in short:
- Create a database using: sqlite powerdns.sqlite
- Create tables (yes, copy/pasted from the manual ;))

create table domains (
 id INT auto_increment,
 name VARCHAR(255) NOT NULL,
 master VARCHAR(20) DEFAULT NULL,
 last_check INT DEFAULT NULL,
 type VARCHAR(6) NOT NULL,
 notified_serial INT DEFAULT NULL, account         VARCHAR(40) DEFAULT 
NULL,
 primary key (id)
);

CREATE UNIQUE INDEX name_index ON domains(name);

CREATE TABLE records (
  id              INT auto_increment,
  domain_id       INT DEFAULT NULL,
  name            VARCHAR(255) DEFAULT NULL,
  type            VARCHAR(6) DEFAULT NULL,
  content         VARCHAR(255) DEFAULT NULL,
  ttl             INT DEFAULT NULL,
  prio            INT DEFAULT NULL,
  change_date     INT DEFAULT NULL,
  primary key(id)
);

CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);

create table supermasters (
  ip VARCHAR(25) NOT NULL, nameserver VARCHAR(255) NOT NULL, account 
VARCHAR(40) DEFAULT NULL
);

- Fill the database with data; I used zone2sql to create gmysql output and 
then: cat zone2sql.output | sqlite powerdns.sqlite

- Launch, and have fun testing: pdns_server --launch=gsqlite --gsqlite- 
database=<path to your SQLite database>

Can you guys give it a go? I'm particulary interested in benchmarking 
results, and maybe some problems with AXFR (which is currently untested).

Thanks in advance,

- Michel Stol

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OBJECTLIBS.
Type: application/octet-stream
Size: 8 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/OBJECTLIBS-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsqlitebackend.hh
Type: application/octet-stream
Size: 547 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/gsqlitebackend-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OBJECTFILES.
Type: application/octet-stream
Size: 26 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/OBJECTFILES-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsqlitebackend.cc
Type: application/octet-stream
Size: 4485 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/gsqlitebackend-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssqlite.cc
Type: application/octet-stream
Size: 2465 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/ssqlite-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssqlite.hh
Type: application/octet-stream
Size: 977 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/ssqlite-0003.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.am
Type: application/octet-stream
Size: 255 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/Makefile-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.in
Type: application/octet-stream
Size: 12682 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030921/48d52f88/configure-0001.obj


More information about the Pdns-dev mailing list