Skip to content

Commit b23b90a

Browse files
committed
Metadata update is now in the same transaction as the AXFR. Add sqlite3-presigned tests to the regression test suite.
1 parent 95cea9b commit b23b90a

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

pdns/slavecommunicator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
7676
UeberBackend *B=dynamic_cast<UeberBackend *>(P.getBackend()); // copy of the same UeberBackend
7777
NSEC3PARAMRecordContent ns3pr, hadNs3pr;
7878
bool narrow, hadNarrow=false;
79-
DNSSECKeeper dk; // has its own ueberbackend
79+
DNSSECKeeper dk (B); // reuse our backend for DNSSECKeeper
8080
bool dnssecZone = false;
8181
bool haveNSEC3=false;
8282
if(dk.isSecuredZone(domain)) {

regression-tests/start-test-stop

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,39 @@ then
558558
break
559559
fi
560560
done
561+
elif [ ${context:0:8} = gsqlite3 ]
562+
then
563+
rm -f pdns.sqlite31
564+
sqlite3 pdns.sqlite31 < ../pdns/no-dnssec.schema.sqlite3.sql
565+
sqlite3 pdns.sqlite31 < ../pdns/dnssec.schema.sqlite3.sql
566+
567+
for zone in $(grep zone named.conf | cut -f2 -d\" | tac)
568+
do
569+
sqlite3 pdns.sqlite31 "INSERT INTO domains (name, type, master) VALUES('$zone','SLAVE','127.0.0.1:$port');"
570+
done
571+
572+
port=$((port+100))
573+
574+
$RUNWRAPPER ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./ \
575+
--no-shuffle --launch=gsqlite3 --gsqlite3-dnssec \
576+
--fancy-records --send-root-referral \
577+
--cache-ttl=0 --query-cache-ttl=0 --no-config --slave --retrieval-threads=1 \
578+
--gsqlite3-database=pdns.sqlite31 --gsqlite3-pragma-synchronous=0 |& egrep -v "update records set ordername|insert into records" &
579+
echo 'waiting for zones to be slaved'
580+
set +e
581+
while sleep 10
582+
do
583+
todo=$(sqlite3 pdns.sqlite31 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL')
584+
if [ $? -eq 0 ]
585+
then
586+
if [ $todo = 0 ]
587+
then
588+
break
589+
fi
590+
fi
591+
done
592+
set -e
593+
sqlite3 pdns.sqlite31 ANALYZE;
561594
elif [ ${context:0:4} = bind ]
562595
then
563596
context=${context}-presigned

0 commit comments

Comments
 (0)