Fix the shell so that the ".schema" command works regardless of the

pragma settings.  Ticket #3585. (CVS 6180)

FossilOrigin-Name: 6f6b638e44a8cfc741594f02b0178fa98ed7e2c1
This commit is contained in:
drh 2009-01-14 23:17:55 +00:00
parent 8f941bc7a1
commit 8f800a7d42
3 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Add\sasserts\sto\sdetect\sif\sa\stransaction\scommits\swithout\sfirst\sincrementing\nthe\stransaction\scounter.\s\sThese\sasserts\sare\sintended\sto\sprevent\sfuture\nproblems\ssimilar\sto\sticket\s#3584.\s(CVS\s6179)
D 2009-01-14T23:03:41
C Fix\sthe\sshell\sso\sthat\sthe\s".schema"\scommand\sworks\sregardless\sof\sthe\npragma\ssettings.\s\sTicket\s#3585.\s(CVS\s6180)
D 2009-01-14T23:17:55
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 05461a9b5803d5ad10c79f989801e9fd2cc3e592
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -155,7 +155,7 @@ F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628
F src/resolve.c 18dc9f0df1d60048e012ce6632251063e0dd356a
F src/rowset.c ba9375f37053d422dd76965a9c370a13b6e1aac4
F src/select.c ae72b604e47092521c4d9ae54e1b1cbeb872a747
F src/shell.c 65d19f8996a160f288087e31810f24025439c62a
F src/shell.c fe2e3d4a83c9349058c75b28425c9ee052645d11
F src/sqlite.h.in 6cd2489e40fe97ba58c60044a4ced377e08b6d09
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
F src/sqliteInt.h 888bdcaccaa1fde592718357b7f98fccb9974c4a
@ -697,7 +697,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P b0f066630c35c4947d3ecd29d32d91036da19e94
R 0924b91d86d7d36d85d8f1aafd36b93a
P b676ccfd9019e65b52251332d94de1b3018ec823
R 87e10c21142ca2b48c4da6e88427f17b
U drh
Z 69c19844ae3d053d2d846551c2da1a82
Z 88e0987e56a80709ba3e24d88d8bfe65

View File

@ -1 +1 @@
b676ccfd9019e65b52251332d94de1b3018ec823
6f6b638e44a8cfc741594f02b0178fa98ed7e2c1

View File

@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.196 2008/12/18 22:25:14 drh Exp $
** $Id: shell.c,v 1.197 2009/01/14 23:17:55 drh Exp $
*/
#if defined(_WIN32) || defined(WIN32)
/* This needs to come before any includes for MSVC compiler */
@ -1502,8 +1502,9 @@ static int do_meta_command(char *zLine, struct callback_data *p){
zShellStatic = azArg[1];
sqlite3_exec(p->db,
"SELECT sql FROM "
" (SELECT * FROM sqlite_master UNION ALL"
" SELECT * FROM sqlite_temp_master) "
" (SELECT sql sql, type type, tbl_name tbl_name, name name"
" FROM sqlite_master UNION ALL"
" SELECT sql, type, tbl_name, name FROM sqlite_temp_master) "
"WHERE tbl_name LIKE shellstatic() AND type!='meta' AND sql NOTNULL "
"ORDER BY substr(type,2,1), name",
callback, &data, &zErrMsg);
@ -1512,8 +1513,9 @@ static int do_meta_command(char *zLine, struct callback_data *p){
}else{
sqlite3_exec(p->db,
"SELECT sql FROM "
" (SELECT * FROM sqlite_master UNION ALL"
" SELECT * FROM sqlite_temp_master) "
" (SELECT sql sql, type type, tbl_name tbl_name, name name"
" FROM sqlite_master UNION ALL"
" SELECT sql, type, tbl_name, name FROM sqlite_temp_master) "
"WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'"
"ORDER BY substr(type,2,1), name",
callback, &data, &zErrMsg