Re: MySQL concerns ... ?
Todd Lyons <[email protected]> Fri, 15 Jul 2011 07:33:23 -0700
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Message-ID | <CAFG21ohyJwYJYjaq4bqGSC_djPnqqWkNn5srh-QSeep+d_qBWA@mail.gmail.com> |
2011/7/13 Dos Wizard <[email protected]> > Assuming that I have read your documentation, how I would know what bind is looking for? e.g. > > dlz "Mysql zone" { > database "mysql > {host=localhost dbname=dns_data ssl=tRue} > {select zone from dns_records where zone = '%zone%'} > {select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"') > else data end from dns_records where zone = '%zone%' and host = '%record%' > and not (type = 'SOA' or type = 'NS')} The above line is line 4 ---^ > {select ttl, type, mx_priority, data, resp_person, serial, refresh, retry, expire, minimum > from dns_records where zone = '%zone%' and (type = 'SOA' or type='NS')} The above line is line 5 ---^ > {select ttl, type, host, mx_priority, data, resp_person, serial, refresh, retry, expire, > minimum from dns_records where zone = '%zone%' and not (type = 'SOA' or type = 'NS')} and the above line is line 6 ---^ > Your main paradigm, doesn't have something which pinpoints if bind should use the A or the B query. So assuming that I have customized tables to my own way, how I could be sure that it would work, if I can't distinguish the needed queries? Which line above is the "A" query and which line above is the "B" query? They each serve very specific functions, and depending on what records line 4 returns, you may or may not need lines 5 and 6. Personally I have my queries structured so that I don't need lines 5 or 6, but your needs may be different than mine (I don't do zone transfers). The description on the page specifies that if you don't exclude NS and SOA responses in line 4, then you don't need line 5. I'm not 100% sure about line 6. I know it's necessary for zone transfers to succeed, and in my case it's obviously not needed for normal operation, so we'd need more details about your use case to give more advice. Also, feel free to experiment with it. Try things with it, and without it. Also pay *SPECIAL* attention to the note about being thread safe. In general, I start all my named instances that use dlz with: OPTIONS="-n 1" to keep it from spawning multiple threads. ...Todd -- If Americans could eliminate sugary beverages, potatoes, white bread, pasta, white rice and sugary snacks, we would wipe out almost all the problems we have with weight and diabetes and other metabolic diseases. -- Dr. Walter Willett, Harvard School of Public Health ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev