https://bz.apache.org/bugzilla/show_bug.cgi?id=58669

            Bug ID: 58669
           Summary: Order of DBDInitSQL and DBDPrepareSQL
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_dbd
          Assignee: [email protected]
          Reporter: [email protected]

My web application uses mod_lua and mod_dbd (with sqlite3).  If I use
DBDInitSQL to set foreign_keys=ON for the connection objects, I start getting
"schema has changed" errors when using the prepared statements.  According to
the sqlite3 documentation this can happen under the circumstance that
sqlite3_prepare() is used instead of sqlite3_prepare_v2() and PRAGMA
foreign_keys=ON is set *after* statement has been prepared with
sqlite3_prepare().

For some more details, see
https://bz.apache.org/bugzilla/show_bug.cgi?id=58668.

I took a quick glance at mdm_dbd.c but it's not immediately obvious to me in
which order these statements will be processed.  I assumed that DBDInitSQL is
always executed before any DBDPrepareSQL statements, or at the very least that
placing DBDInitSQL before any DBDPrepareSQL statements would cause it to be
executed first, but the error I'm getting suggests that this isn't true.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to