Error in mysql_dlz

Михаил Продан <[email protected]> Fri, 02 Jul 2010 00:37:55 +0400
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
Hello,
I have such a problem:
bind 9.7.1 with dlz mysql enabled
named.conf:
dlz "mysql zone" {
 database "mysql {host=192.168.170.220 port=3306 dbname=dyn_dns user=dynuser pass=dynpdw ssl=false}
                 {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')}
                 {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')}
                 {select ttl, type, host, mx_priority, data, resp_person, serial, refresh, retry, expire, minimum from dns_records where zone = '%zone%' and n
ot (type = 'SOA' or type = 'NS')}
                 {select zone from xfr_table where zone = '%zone%' and client = '%client%'}
                 {update data_count set count = count + 1 where zone ='%zone%'}";
};

But when i start bind an error occurs. The log as follows:

vpn# named -g
01-Jul-2010 23:35:10.819 starting BIND 9.7.1 -g
01-Jul-2010 23:35:10.819 built with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-randomdev=/dev/random' '--with-openssl=/usr' '--with-libxml2=/usr/local' '--without-idn' '--with-dlz-mysql=yes' '--disable-threads' '--sysconfdir=/etc/namedb' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info/' '--build=i386-portbld-freebsd7.2' 'build_alias=i386-portbld-freebsd7.2' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe' 'LDFLAGS= -rpath=/usr/lib:/usr/local/lib' 'CXX=c++' 'CXXFLAGS=-O2 -fno-strict-aliasing -pipe'
01-Jul-2010 23:35:10.819 using up to 4096 sockets
01-Jul-2010 23:35:10.828 loading configuration from '/etc/namedb/named.conf'
01-Jul-2010 23:35:10.829 using default UDP/IPv4 port range: [49152, 65535]
01-Jul-2010 23:35:10.829 using default UDP/IPv6 port range: [49152, 65535]
01-Jul-2010 23:35:10.832 no IPv6 interfaces found
01-Jul-2010 23:35:10.843 listening on IPv4 interface lo0, 127.0.0.1#53
01-Jul-2010 23:35:10.859 generating session key for dynamic DNS
01-Jul-2010 23:35:10.859 Loading 'mysql zone' using driver mysql
01-Jul-2010 23:35:10.859 Required token $zone$ not found.
01-Jul-2010 23:35:10.859 Could not build all nodes query list
01-Jul-2010 23:35:10.859 mysql driver could not create database instance object.
Segmentation fault (core dumped)

The main reason i've posted this message is that I have wrote a same dlz driver for firebird with native library and with the same config i have no error.

Please help to find out where is a problem

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first