for Project:

PowerDNS OpenDBX backend

Register as a new user

Task #29 — Stored procedures not working with mysql 5.1

Attached to Project — PDNS OpenDBX
Opened by Todd Wright (geekasylum) - Monday, 15 Feb 2010, 7:04pm
Bug Report Low
Backend / Core Normal
Unconfirmed 1.0
No-one Undecided
All 0% complete
Hi Norbert.

Im trying to use stored procedures with the opendbx backend for pdns. Im led to believe that this should work, (by an email you wrote in 2008, where you said it should work... google is a wonderful thing :), but Im getting an error...

[OpendbxBackend] execStmt: Unable to execute query - PROCEDURE aussiedns_devl.opendbx_lookuptype can't return a result set in the given context
Database module reported condition which prevented lookup (Error: DB statement failed) sending out servfail

I get the same error if I try this in gmysql too, but I dont expect it to work there.

Interestingly, when I use dig to query pdns, I do get a valid response, including the right answer, but it returns SERVFAIL along with it.

The procedure works fine and returns the expected result set when I call it from the mysql shell, but it is also supposed to update a custom table, and that isnt happening under opendbx, so I cant be sure if its working or not there, despite the response from pdns.

The procedure also works fine when called from phpmyadmin via the new php mysqli driver, but when I use the older mysql driver, it returns the same error (which is obviously coming from mysql)

I believe this error has something to do with the interface to libmysql. Older methods fail, and there seems to be something extra you need to do with mysql 5.1, but Im no C programmer.

PDNS is 2.9.22, Ive tried OpenDBX 1.2.4 and 1.4.4. Mysql is 5.1.43 and its all on Linux 2.6.29 (Gentoo Amd64), and freshly compiled.

Ive set the following in pdns.conf to call the procedure:
opendbx-sql-lookuptype=call opendbx_lookuptype(:name, :type)

Any ideas?

Comments (2) | Attachments (0) | Related Tasks (0/0) | Notifications (1) | Reminders (0) | History |

Comment by Norbert Sendetzky - Sunday, 21 Feb 2010, 11:51am

Hi Todd

Could you please post the stored procedure you are using?



Comment by Todd Wright - Sunday, 21 Feb 2010, 5:13pm

Hi Norbert.

I'll post it to your email. Im not too keen to post it here. Its nothing special - just an idea that I've not seen many doing yet, and I'd like to keep it that way :)