Skip to content

Instantly share code, notes, and snippets.

@temoto
Last active December 6, 2017 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save temoto/8928398556e998577474860dc4d461b9 to your computer and use it in GitHub Desktop.
Save temoto/8928398556e998577474860dc4d461b9 to your computer and use it in GitHub Desktop.
sqlite fail build with ENABLE_UPDATE_DELETE_LIMIT flag when sqlite3.c was configured without it, e.g. amalgamation from sqlite website
--- a/src/parse.y 2017-12-06 05:26:36.000000000 +0300
+++ b/src/parse.y 2017-12-06 05:22:53.000000000 +0300
@@ -758,6 +758,13 @@
}
%endif
%ifndef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
+%include {
+#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
+ #error To build SQLite with -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT you have to run ./configure with --enable-update-limit flag. \
+Most likely you are building amalgamation from http://www.sqlite.org/download.html which is not compatible with this feature. \
+See http://www.sqlite.org/compile.html for explanation.
+#endif
+}
cmd ::= with(C) DELETE FROM fullname(X) indexed_opt(I) where_opt(W). {
sqlite3WithPush(pParse, C, 1);
sqlite3SrcListIndexedBy(pParse, X, &I);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment