Bojan Smojver wrote:
Actually, it turns out that apr_dbd_prepare() is destroying its
arguments no matter whether it succeeds or not. What's going on? Does
anyone have any handy examples of how to use the DBD code?

My best bet is that you have pool hierarchy/lifetime problems.
That's entirely possible - I'm not 100% sure on how I should be using them. What would be the best place to find out?

I'm thinking of writing up all of this somewhere once it all works, so other people can find it and hopefully avoid these problems.