From: drh Date: Wed, 16 Feb 2005 03:53:10 +0000 (+0000) Subject: The ".dump" method in the shell for version 2 should not sort tables by X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd71a0753ea7bbe8af445523a137bf2f9daa5d27;p=thirdparty%2Fsqlite.git The ".dump" method in the shell for version 2 should not sort tables by name because this can put views out of dependency order. Ticket #1124. (CVS 2347) FossilOrigin-Name: b82c06fdd143fde6678003a0f3fc66e10c21a65b --- diff --git a/manifest b/manifest index a8721f587a..df8b50e98b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\sthe\spublish.sh\sscript\sso\sthat\sit\sgrabs\sthe\scorrect\ssource\stree.\s(CVS\s2339) -D 2005-02-15T16:04:47 +C The\s".dump"\smethod\sin\sthe\sshell\sfor\sversion\s2\sshould\snot\ssort\stables\sby\nname\sbecause\sthis\scan\sput\sviews\sout\sof\sdependency\sorder.\s\s\sTicket\s#1124.\s(CVS\s2347) +D 2005-02-16T03:53:11 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -47,7 +47,7 @@ F src/pragma.c f9c157b0591419d2d3407dac90222020d2a6d822 F src/printf.c 378ec63d9303993eef24814a56a9fc7260aacbea F src/random.c 775913e0b7fbd6295d21f12a7bd35b46387c44b2 F src/select.c a1c18cab14b49f28ed7629a53fe02adeb13083d2 -F src/shell.c 920af040d3a33ea8919c82cee45b424ad841cee0 +F src/shell.c 46a1757c152bba687f647b571693bfa223d3354d F src/sqlite.h.in b1414cc6686c77917024d8196efa4531e76cf194 F src/sqliteInt.h 3e9203f16d12baf3a364fae9d64903d813651abd F src/table.c eea34544be947e4939ba9e46391d5da998f90b84 @@ -191,7 +191,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604 F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P 2efbbba55a851a5b83726720aaa9e59b8387556c -R da2d39962776d56c8504d05951acb929 +P 74684507a0a2bda67b6cfa899ccabf99da515899 +R 75958564507d78fd3b2f7cf5f11b5638 U drh -Z a64e62f278096639d50a695483b67497 +Z e5cfbc8013b3ec6e8beae1c96b8bf821 diff --git a/manifest.uuid b/manifest.uuid index 9120b57d28..be00d3f53f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -74684507a0a2bda67b6cfa899ccabf99da515899 \ No newline at end of file +b82c06fdd143fde6678003a0f3fc66e10c21a65b \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index cca11a019c..bb46c49707 100644 --- a/src/shell.c +++ b/src/shell.c @@ -12,7 +12,7 @@ ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. ** -** $Id: shell.c,v 1.93 2004/03/17 23:42:13 drh Exp $ +** $Id: shell.c,v 1.93.2.1 2005/02/16 03:53:11 drh Exp $ */ #include #include @@ -591,7 +591,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ sqlite_exec(p->db, "SELECT name, type, sql FROM sqlite_master " "WHERE type!='meta' AND sql NOT NULL " - "ORDER BY substr(type,2,1), name", + "ORDER BY substr(type,2,1), rowid", dump_callback, p, &zErrMsg ); }else{ @@ -600,7 +600,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ sqlite_exec_printf(p->db, "SELECT name, type, sql FROM sqlite_master " "WHERE tbl_name LIKE '%q' AND type!='meta' AND sql NOT NULL " - "ORDER BY substr(type,2,1), name", + "ORDER BY substr(type,2,1), rowid", dump_callback, p, &zErrMsg, azArg[i] ); }