Created
June 9, 2020 15:13
-
-
Save Habbie/89c9833d6dd4d2e06449cd9e00f0750c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc | |
index 3687c61a5..c0ed58ced 100644 | |
--- a/pdns/backends/gsql/gsqlbackend.cc | |
+++ b/pdns/backends/gsql/gsqlbackend.cc | |
@@ -1088,6 +1088,29 @@ bool GSQLBackend::setDomainMetadata(const DNSName& name, const std::string& kind | |
void GSQLBackend::lookup(const QType &qtype,const DNSName &qname, int domain_id, DNSPacket *pkt_p) | |
{ | |
+ try { | |
+ ostringstream out; | |
+ | |
+ auto stmt = d_db->prepare("PRAGMA optimize(0x3)",0); | |
+ | |
+ stmt->execute(); | |
+ | |
+ SSqlStatement::row_t row; | |
+ | |
+ while(stmt->hasNextRow()) { | |
+ stmt->nextRow(row); | |
+ for(const auto& col: row) | |
+ out<<"\'"<<col<<"\'\t"; | |
+ out<<endl; | |
+ } | |
+ | |
+ cout<< out.str()<<endl; | |
+ } | |
+ catch (SSqlException &e) { | |
+ cerr<<"GSQLBackend unable to execute PRAGMA optimize(0x3): "<<e.txtReason()<<endl; | |
+ } | |
+ | |
+ | |
try { | |
reconnectIfNeeded(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment