]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix ANALYZE so that it works even if the empty_result_callbacks pragma is
authordrh <drh@noemail.net>
Tue, 6 Sep 2005 10:26:47 +0000 (10:26 +0000)
committerdrh <drh@noemail.net>
Tue, 6 Sep 2005 10:26:47 +0000 (10:26 +0000)
enabled. Ticket #1409. (CVS 2659)

FossilOrigin-Name: bfdaef1224d741deefe211e1e607bac4c80f2d89

manifest
manifest.uuid
src/analyze.c
test/analyze.test

index 13ae6e2d62bc5b6007328f4724eba7f078b7063f..0f35ab82801e4a47c97976ba333b42071540285e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\sdue\swith\s"sub()"\sinstead\sof\s"gsub()"\sin\sawk\sscripts\sso\sthat\sbuilds\swill\nwork\son\sSolaris\swhich\swill\sruns\san\sarchiac\sversion\sof\sAWK.\s(CVS\s2658)
-D 2005-09-05T20:35:26
+C Fix\sANALYZE\sso\sthat\sit\sworks\seven\sif\sthe\sempty_result_callbacks\spragma\sis\nenabled.\sTicket\s#1409.\s(CVS\s2659)
+D 2005-09-06T10:26:47
 F Makefile.in 12784cdce5ffc8dfb707300c34e4f1eb3b8a14f1
 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -29,7 +29,7 @@ F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc
 F sqlite3.def c413e514217736884254739a105c8c942fdf0c2f
 F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
 F src/alter.c 26d755f2143719dd3f5b8aaf6cbe3c7f95332528
-F src/analyze.c 3ab32927f4d3067ead10e4c4f6fb61b2a93479cc
+F src/analyze.c 29c1344053f0e26e3320449483c7157e09d2a77f
 F src/attach.c 4b21689700a72ae281fa85dbaff06b2a62bd49ee
 F src/auth.c 31e2304bef67f44d635655f44234387ea7d21454
 F src/btree.c 5b3bc015c49a41c025cfdf8ad36051f3007e2cb0
@@ -94,7 +94,7 @@ F test/alter.test 9d6837a3d946b73df692b7cef2a7644d2e2f6bc6
 F test/alter2.test 60ba0a7057dc71ad630a1cc7c487104346849d50
 F test/alter3.test d4eecd8dbd008d0e66f1c201fa6dc2edca853c38
 F test/altermalloc.test 6e1f404ec021eb2ba6582e3c77b0a35cf206b7af
-F test/analyze.test a1206c7430606ffa20bcbb220c87c2873f5efdd4
+F test/analyze.test 8c54b1fb18cab02775324827992d706507979c50
 F test/attach.test f320e98bcca68d100cab7666a0c9a93ac5f236bd
 F test/attach2.test 3396c012a39ddf7ba6b528d80bd79554168aa115
 F test/attach3.test 63013383adc4380af69779f34f4af19bd49f7cbe
@@ -306,7 +306,7 @@ F www/tclsqlite.tcl 3df553505b6efcad08f91e9b975deb2e6c9bb955
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 7b56763a8b514834198d2392639d6d726b17d901
-R 7961afffb23ff39f7c15da8e463ebdd7
+P 449a7895995013720f5d4c7b3b7f5bd6a5413717
+R 68bd3a3e3907990d3c3125f35717440b
 U drh
-Z 7abc34b8caed692775f1be9c4cb566b9
+Z 24033ba2c6a1ea752cac6b534c09791f
index 9b23f8a0961f2c542d59d18b4c2c8d610032ade0..d8314356c076bdd5555672f276758ed23b02e96b 100644 (file)
@@ -1 +1 @@
-449a7895995013720f5d4c7b3b7f5bd6a5413717
\ No newline at end of file
+bfdaef1224d741deefe211e1e607bac4c80f2d89
\ No newline at end of file
index dc1338aad5124a91159ee2b99bd848b29aa268d1..48ce904f54a8138a6aa1b7cbe1b4fb8cee6d0336 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code associated with the ANALYZE command.
 **
-** @(#) $Id: analyze.c,v 1.6 2005/07/23 22:59:56 drh Exp $
+** @(#) $Id: analyze.c,v 1.7 2005/09/06 10:26:47 drh Exp $
 */
 #ifndef SQLITE_OMIT_ANALYZE
 #include "sqliteInt.h"
@@ -333,7 +333,7 @@ static int analysisLoader(void *pData, int argc, char **argv, char **azNotUsed){
   const char *z;
 
   assert( argc==2 );
-  if( argv[0]==0 || argv[1]==0 ){
+  if( argv==0 || argv[0]==0 || argv[1]==0 ){
     return 0;
   }
   pIndex = sqlite3FindIndex(pInfo->db, argv[0], pInfo->zDatabase);
index 0104efdd892add06845d8f6042f355fbb39c2c22..fb6983481589aeb1f418c9b1910d819e53ade14f 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.
 # This file implements tests for the ANALYZE command.
 #
-# $Id: analyze.test,v 1.3 2005/08/19 00:14:43 drh Exp $
+# $Id: analyze.test,v 1.4 2005/09/06 10:26:47 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -45,11 +45,17 @@ do_test analyze-1.4 {
     SELECT count(*) FROM sqlite_master WHERE name='sqlite_stat1'
   }
 } {0}
-do_test analyze-1.5 {
+do_test analyze-1.5.1 {
   catchsql {
     ANALYZE
   }
 } {0 {}}
+do_test analyze-1.5.2 {
+  catchsql {
+    PRAGMA empty_result_callbacks=1;
+    ANALYZE
+  }
+} {0 {}}
 do_test analyze-1.6 {
   execsql {
     SELECT count(*) FROM sqlite_master WHERE name='sqlite_stat1'