Hi, You call ap_dbd_prepare from prep_stmt_config_set_prep_stmt_on. This > function is called during the conf parsing phase when there are no > apache children processes. cmd->server refers to the server structure > of the root apache process (the parent of all future apache children). > Then the apr_dbd_pvquery is called from an apache child process, in > which the server structure is not the same as the one you passed to > ap_dbd_prepare. As I have never worked with mod_dbd, I do not know if > this can cause a crash. If your mini-module is inspired from a > text-book or some working example, then my hunch is wrong.
It looked like a strange place for preparing a statement to me too, but I copied it from mod_authn_dbd.c distributed with the httpd-2.2.9 sources. Also, when I use a varchar instead of numeric database columns, it works as expected. Cheers, Andrej