]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improve shell help text for the '.open' command.
authormistachkin <mistachkin@noemail.net>
Mon, 29 May 2017 03:48:13 +0000 (03:48 +0000)
committermistachkin <mistachkin@noemail.net>
Mon, 29 May 2017 03:48:13 +0000 (03:48 +0000)
FossilOrigin-Name: 7cc940a97efc096ff3725710f526c06f52453bd923fb9e825ce6990275df747a

manifest
manifest.uuid
src/shell.c

index 76765e5f7534457bf5f5395aba145fe7d423c8e7..36c65f69acbd7d91b68d635d29bc439f03ba89d0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Smaller\sand\sfaster\svdbeSorterCompareText().
-D 2017-05-27T22:42:36.583
+C Improve\sshell\shelp\stext\sfor\sthe\s'.open'\scommand.
+D 2017-05-29T03:48:13.814
 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc
@@ -405,7 +405,7 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
 F src/resolve.c 3e518b962d932a997fae373366880fc028c75706
 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
 F src/select.c c444ca057d48cf1a4eb8f6a58fbc13418a7f83ae94a6bd6f29f7ad6c704a9e4c
-F src/shell.c 615fb4e2069e99549b0ea0983e9c877c459363fc76a4bdf052c652919312216a
+F src/shell.c 3f761fe604174b31aacd2ea2eacef5e6fe550111d60c0d71532cc008c68cf3f3
 F src/sqlite.h.in 8dd468837a4f6d76713e3a4cc65bea48095009038593d41040ab46c1b351197f
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 58fd0676d3111d02e62e5a35992a7d3da5d3f88753acc174f2d37b774fbbdd28
@@ -1581,7 +1581,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 6f415833e0554706dcf04f68ecba4ca2e54c08f3bbf6a1dba182bb132c912a2e
-R 676446376962a7566200486a47c0a1a8
-U drh
-Z d53eb1928c4e27333143da904b4871ef
+P 542dc4c5eb87017fe03b6c181e779993aa84564785e1177ccf937d52f985593b
+R c224ddae8984caa1a319e1f3df7cf53c
+U mistachkin
+Z 7644eefff3048b147d60d160c0d0653e
index 407c4183771329163cb82211ae6a9e47aaaa91aa..58f6821b8523613f5bdc4fb2e683096d010d162b 100644 (file)
@@ -1 +1 @@
-542dc4c5eb87017fe03b6c181e779993aa84564785e1177ccf937d52f985593b
\ No newline at end of file
+7cc940a97efc096ff3725710f526c06f52453bd923fb9e825ce6990275df747a
\ No newline at end of file
index 3da7da5f66e956d00f2971e56e385c565eb17fe0..322c6e5c4f17a2c7790b94b18abf6564afb4f554 100644 (file)
@@ -1177,7 +1177,7 @@ static unsigned char *SHA3Final(SHA3Context *p){
 ** Implementation of the sha3(X,SIZE) function.
 **
 ** Return a BLOB which is the SIZE-bit SHA3 hash of X.  The default
-** size is 256.  If X is a BLOB, it is hashed as is.  
+** size is 256.  If X is a BLOB, it is hashed as is.
 ** For all other non-NULL types of input, X is converted into a UTF-8 string
 ** and the string is hashed without the trailing 0x00 terminator.  The hash
 ** of a NULL value is NULL.
@@ -3011,7 +3011,7 @@ static char **tableColumnList(ShellState *p, const char *zTab){
       nPK++;
       if( nPK==1
        && sqlite3_stricmp((const char*)sqlite3_column_text(pStmt,2),
-                          "INTEGER")==0 
+                          "INTEGER")==0
       ){
         isIPK = 1;
       }else{
@@ -3294,8 +3294,8 @@ static char zHelp[] =
   "                         tcl      TCL list elements\n"
   ".nullvalue STRING      Use STRING in place of NULL values\n"
   ".once FILENAME         Output for the next SQL command only to FILENAME\n"
-  ".open ?--new? ?FILE?   Close existing database and reopen FILE\n"
-  "                         The --new starts with an empty file\n"
+  ".open ?OPTIONS? ?FILE? Close existing database and reopen FILE\n"
+  "                         The --new option starts with an empty file\n"
   ".output ?FILENAME?     Send output to FILENAME or stdout\n"
   ".print STRING...       Print literal STRING\n"
   ".prompt MAIN CONTINUE  Replace the standard prompts\n"
@@ -3360,8 +3360,8 @@ static int process_input(ShellState *p, FILE *in);
 
 /*
 ** Read the content of file zName into memory obtained from sqlite3_malloc64()
-** and return a pointer to the buffer. The caller is responsible for freeing 
-** the memory. 
+** and return a pointer to the buffer. The caller is responsible for freeing
+** the memory.
 **
 ** If parameter pnByte is not NULL, (*pnByte) is set to the number of bytes
 ** read.
@@ -4368,15 +4368,15 @@ int shellDeleteFile(const char *zFilename){
 **   fkey_collate_clause('parent-tab', 'parent-col', 'child-tab', 'child-col')
 **
 ** If either of the named tables or columns do not exist, this function
-** returns an empty string. An empty string is also returned if both tables 
+** returns an empty string. An empty string is also returned if both tables
 ** and columns exist but have the same default collation sequence. Or,
 ** if both exist but the default collation sequences are different, this
 ** function returns the string " COLLATE <parent-collation>", where
 ** <parent-collation> is the default collation sequence of the parent column.
 */
 static void shellFkeyCollateClause(
-  sqlite3_context *pCtx, 
-  int nVal, 
+  sqlite3_context *pCtx,
+  int nVal,
   sqlite3_value **apVal
 ){
   sqlite3 *db = sqlite3_context_db_handle(pCtx);
@@ -4387,7 +4387,7 @@ static void shellFkeyCollateClause(
   const char *zChildCol;
   const char *zChildSeq = 0;  /* Initialize to avoid false-positive warning */
   int rc;
-  
+
   assert( nVal==4 );
   zParent = (const char*)sqlite3_value_text(apVal[0]);
   zParentCol = (const char*)sqlite3_value_text(apVal[1]);
@@ -4509,7 +4509,7 @@ static int lintFkeyIndexes(
       return SQLITE_ERROR;
     }
   }
-  
+
   /* Register the fkey_collate_clause() SQL function */
   rc = sqlite3_create_function(db, "fkey_collate_clause", 4, SQLITE_UTF8,
       0, shellFkeyCollateClause, 0, 0
@@ -4552,9 +4552,9 @@ static int lintFkeyIndexes(
         raw_printf(stderr, "Error: internal error");
         break;
       }else{
-        if( bGroupByParent 
+        if( bGroupByParent
         && (bVerbose || res==0)
-        && (zPrev==0 || sqlite3_stricmp(zParent, zPrev)) 
+        && (zPrev==0 || sqlite3_stricmp(zParent, zPrev))
         ){
           raw_printf(out, "-- Parent table %s\n", zParent);
           sqlite3_free(zPrev);
@@ -4564,7 +4564,7 @@ static int lintFkeyIndexes(
         if( res==0 ){
           raw_printf(out, "%s%s --> %s\n", zIndent, zCI, zTarget);
         }else if( bVerbose ){
-          raw_printf(out, "%s/* no extra indexes required for %s -> %s */\n", 
+          raw_printf(out, "%s/* no extra indexes required for %s -> %s */\n",
               zIndent, zFrom, zTarget
           );
         }
@@ -6031,7 +6031,7 @@ static int do_meta_command(char *zLine, ShellState *p){
       bSelftestExists = 1;
     }
     if( bSelftestExists ){
-      rc = sqlite3_get_table(p->db, 
+      rc = sqlite3_get_table(p->db,
           "SELECT tno,op,cmd,ans FROM selftest ORDER BY tno",
           &azTest, &nRow, &nCol, 0);
       if( rc ){
@@ -6055,7 +6055,7 @@ static int do_meta_command(char *zLine, ShellState *p){
       const char *zOp = azTest[i*nCol+1];
       const char *zSql = azTest[i*nCol+2];
       const char *zAns = azTest[i*nCol+3];
-  
+
       if( bVerbose>0 ){
         char *zQuote = sqlite3_mprintf("%q", zSql);
         printf("%d: %s %s\n", tno, zOp, zSql);
@@ -6133,8 +6133,8 @@ static int do_meta_command(char *zLine, ShellState *p){
         if( strcmp(z,"schema")==0 ){
           bSchema = 1;
         }else
-        if( strcmp(z,"sha3-224")==0 || strcmp(z,"sha3-256")==0 
-         || strcmp(z,"sha3-384")==0 || strcmp(z,"sha3-512")==0 
+        if( strcmp(z,"sha3-224")==0 || strcmp(z,"sha3-256")==0
+         || strcmp(z,"sha3-384")==0 || strcmp(z,"sha3-512")==0
         ){
           iSize = atoi(&z[5]);
         }else