On Sunday, 12 January, 2020 18:44, Xingwei Lin <xwlin....@gmail.com> wrote:
>Is there any way can we disable the dot commands feature in sqlite? SQLite does not process dot commands, they are commands to the shell.c SQLite Application program. The current shell.c application currently does not have a way to omit the meta commands. However, if you build your own you can simply search shell.c (or shell.c.in) for the function do_meta_command function definition and have it execute a "return 0;" at the top of the function after the variable declarations rather that process the meta command. This will not remove the code that handles the meta commands but merely bypass the processing of them. That is make it look thusly by inserting the return 0; line: /* ** If an input line begins with "." then invoke this routine to ** process that line. ** ** Return 1 on error, 2 to exit, and 0 otherwise. */ static int do_meta_command(char *zLine, ShellState *p){ int h = 1; int nArg = 0; int n, c; int rc = 0; char *azArg[52]; return 0; #ifndef SQLITE_OMIT_VIRTUALTABLE if( p->expert.pExpert ){ expertFinish(p, 1, 0); } #endif -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users