/ Check-in [d584a0cb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In order to avoid exporting a symbol, use a macro instead of a function to replace sqlite3_complete() in the shell code when SQLITE_OMIT_COMPLETE is defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d584a0cb512815945ef06ee3b5ebadbf2a543b008487f6d098e1e8ab79f61d2d
User & Date: dan 2018-11-16 14:36:42
Context
2018-11-16
15:08
Update the generate_series() table-valued function to make use of the new SQLITE_CONSTRAINT return from xBestIndex. check-in: 4372ad64 user: drh tags: trunk
14:36
In order to avoid exporting a symbol, use a macro instead of a function to replace sqlite3_complete() in the shell code when SQLITE_OMIT_COMPLETE is defined. check-in: d584a0cb user: dan tags: trunk
13:56
Enhance the xBestIndex interface of virtual table so that if the xBestIndex method returns SQLITE_CONSTRAINT then that particular combination of constraints is considered unusable and does not participate further in query planning. check-in: 684013ce user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
/*
** We need a default sqlite3_complete() implementation to use in case
** the shell is compiled with SQLITE_OMIT_COMPLETE.  The default assumes
** any arbitrary text is a complete SQL statement.  This is not very
** user-friendly, but it does seem to work.
*/
#ifdef SQLITE_OMIT_COMPLETE
int sqlite3_complete(const char *zSql){ return 1; }
#endif

/*
** Return true if zSql is a complete SQL statement.  Return false if it
** ends in the middle of a string literal or C-style comment.
*/
static int line_is_complete(char *zSql, int nSql){







|







8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
/*
** We need a default sqlite3_complete() implementation to use in case
** the shell is compiled with SQLITE_OMIT_COMPLETE.  The default assumes
** any arbitrary text is a complete SQL statement.  This is not very
** user-friendly, but it does seem to work.
*/
#ifdef SQLITE_OMIT_COMPLETE
#define sqlite3_complete(x) 1
#endif

/*
** Return true if zSql is a complete SQL statement.  Return false if it
** ends in the middle of a string literal or C-style comment.
*/
static int line_is_complete(char *zSql, int nSql){