You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2015/11/30 02:30:05 UTC

[Bug 58669] New: Order of DBDInitSQL and DBDPrepareSQL

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: bugs@httpd.apache.org
          Reporter: jan.m.danielsson@gmail.com

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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org