Possible bug when compiling with SQLITE_OMIT_TRIGGER option

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Possible bug when compiling with SQLITE_OMIT_TRIGGER option

M Irya

I'm trying to create a minimal SQLite3 library build and seems like the
foreign keys logic is not properly run on DELETE when building the sources

Here's the patch against amalgamation v3.21.0 sqlite.c:

--- sqlite3.c.orig 2017-12-08 14:06:04.814913000 +0100
+++ sqlite3.c 2017-12-08 14:06:26.125563000 +0100
@@ -105900,6 +105900,7 @@
 # define pTrigger 0
 # define isView 0
+  bComplex = sqlite3FkRequired(pParse, pTab, 0, 0);
 # undef isView

Without that bComplex in sqlite3DeleteFrom() is at least undefined in the
if () condition 90 lines below.

Let me know if this looks correct/can be pushed to the official SQLite repo.

sqlite-users mailing list
[hidden email]