]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
2.0.7 (CVS 292)
authordrh <drh@noemail.net>
Sat, 20 Oct 2001 12:30:10 +0000 (12:30 +0000)
committerdrh <drh@noemail.net>
Sat, 20 Oct 2001 12:30:10 +0000 (12:30 +0000)
FossilOrigin-Name: a835658e507fc7d0c684959c0f0afb9018b6a8d4

VERSION
manifest
manifest.uuid
src/select.c
src/table.c
src/vdbe.c
test/func.test
test/tableapi.test
www/changes.tcl

diff --git a/VERSION b/VERSION
index 157e54f3e4d5b4431fcdec18168b6365937a0a7b..f1547e6d13417c452a8d34bf74026c26dd9fe339 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.6
+2.0.7
index b882d2c96c02fee752ddd65e004a1192d338a2a1..85f218768fde3879e12b25b7dc779bc648d5e8cc 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Version\s2.0.6\s(CVS\s464)
-D 2001-10-19T16:45:00
+C 2.0.7\s(CVS\s292)
+D 2001-10-20T12:30:11
 F Makefile.in 6801df952cb1df64aa32e4de85fed24511d28efd
 F Makefile.template 1fdb891f14083ee0b63cf7282f91529634438e7a
 F README 93d2977cc5c6595c448de16bdefc312b9d401533
-F VERSION be4a9c5c382f200a4575c3dc5133f6359a33606a
+F VERSION 46489bc13fe8b494327fecb3c9a05f4db2e284b3
 F aclocal.m4 11faa843caa38fd451bc6aeb43e248d1723a269d
 F config.guess f38b1e93d1e0fa6f5a6913e9e7b12774b9232588
 F config.log 6a73d03433669b10a3f0c221198c3f26b9413914
@@ -36,12 +36,12 @@ F src/pager.h a0d4c5ae271914aa07b62aee0707997d6932b6ca
 F src/parse.y 148e4cd134d3cbd816dcb0df50e49e498faa6ba4
 F src/printf.c b1e22a47be8cdf707815647239991e08e8cb69f9
 F src/random.c 2a9cc2c9716d14815fd4c2accf89d87a1143e46b
-F src/select.c 10957c2fd52ee36fbb40171c36377c9f94dd36ea
+F src/select.c 898b27a324afc067e253a9c04e63701f10b0af1c
 F src/shell.c 71597951753b56a97fea1c7a30908f31e635c00c
 F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e
 F src/sqlite.h.in b95c161abf1d58bceb05290fa3f657d8f388fc11
 F src/sqliteInt.h 52577abf2805ba148972f69788ed49c64064fa31
-F src/table.c 4e8cbabfbc6018fdd0615f7c5d06fb431cd56505
+F src/table.c 7102da21a8e4b2f8a4df79378d6dc0b01aa76a33
 F src/tclsqlite.c 7d205aeda449047f86b39a6c55731a1ded7a7ab5
 F src/test1.c e4b31f62ea71963cbae44338acf477a04fc8fc49
 F src/test2.c e9f99aa5ee73872819259d6612c11e55e1644321
@@ -49,7 +49,7 @@ F src/test3.c 4a0d7b882fdae731dbb759f512ad867122452f96
 F src/tokenize.c 59ddae1501de472e9a6274a1cbf451170c52488c
 F src/update.c c916182c6bfbc8a6f20c24920c4560fece6c9569
 F src/util.c 4da3be37d0fd3c640d2d3033503768afdc8e5387
-F src/vdbe.c e326ff611c9d2c273fdcb86b4661b464f2af128b
+F src/vdbe.c 0aea4e858880867ffd59d9598da9b3f9ab5d97b9
 F src/vdbe.h f8407fd6b644bc001b1e7c65460c9962f6a15f6b
 F src/where.c 22fe910c7c8e2736eb37e9861343e90c0b513c86
 F test/all.test a2320eb40b462f25bd3e33115b1cabf3791450dd
@@ -59,7 +59,7 @@ F test/btree2.test 20ce47ab804f15b6563736528bdd38aabe5193dc
 F test/copy.test 768e6f1701a07d08090e1ca7f7dcce0a7a72b43e
 F test/delete.test c904a62129fe102b314a96111a8417f10249e4d8
 F test/expr.test b4171c84b767f7b7e94dbce4824ba8e981a1c72f
-F test/func.test fb0f44de6d8487359a4455accbae120bde267772
+F test/func.test 9012f7fc5369422c890e93549aa61d762e0c8bb3
 F test/in.test 9323681388be301dc73f370b4cd62c5a33f79d1e
 F test/index.test 6076f29d09a4f26a2efa38b03b8cc338b8662f0e
 F test/insert.test a5c122aa726f1cef6f07d6767e8fd6f220994c11
@@ -82,7 +82,7 @@ F test/select5.test c2a6c4a003316ee42cbbd689eebef8fdce0db2ac
 F test/sort.test 462c1161eee1abaa7cc93990e0b34d5fdb70ce19
 F test/subselect.test 335d3dad8d585726c447dfee8d9c4f7383c76b78
 F test/table.test 3ef4254d62ece31a3872ab11cdaec846f6fa8fd1
-F test/tableapi.test 162840153191a91a7dce6395f2334f9aef713b37
+F test/tableapi.test 51d0c209aa6b1158cb952ec917c656d4ce66e9e4
 F test/tclsqlite.test a57bb478d7e9f0b2c927f92e161f391e2896631a
 F test/temptable.test 37acd9e39781c2ff7cff2ba741b6b27ce020a44a
 F test/tester.tcl c7ddeebc14cc841abb37134cd5d40c1e3ad367c1
@@ -102,7 +102,7 @@ F www/arch.fig d5f9752a4dbf242e9cfffffd3f5762b6c63b3bcf
 F www/arch.png 82ef36db1143828a7abc88b1e308a5f55d4336f4
 F www/arch.tcl 03b521d252575f93b9c52f7c8b0007011512fcfb
 F www/c_interface.tcl 6c5989670e014de44dce6580cbde0eea965dadbb
-F www/changes.tcl 7f249321a6ccb4abb79e56b801dede791a44c237
+F www/changes.tcl 72923f6a051a2f6bdad639933e9e8e153b392123
 F www/crosscompile.tcl c99efacb3aefaa550c6e80d91b240f55eb9fd33e
 F www/download.tcl 3e51c9ff1326b0a182846134987301310dff7d60
 F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
@@ -114,7 +114,7 @@ F www/speed.tcl ab7d6d3bc898472bd94320a5d3c63de928d4804b
 F www/sqlite.tcl 6a21242a272e9c0939a04419a51c3d50cae33e3e
 F www/tclsqlite.tcl 13d50723f583888fc80ae1a38247c0ab415066fa
 F www/vdbe.tcl bb7d620995f0a987293e9d4fb6185a3b077e9b44
-P 8467d84fc6e67bd93051f54338a8f6c9b1711ee1
-R 517debf090e30b01a34d90ad2b9ba498
+P c8535a0de90fb7a22df15018984db590a85decfb
+R 04b0305eff69829eee3382ca64677b9c
 U drh
-Z 903042b458878eb66b0451d8d6ffb242
+Z 0c6d455d9482eaf63fb01fb72aa45066
index d1702c01f5653b96ccd612c976245eea76c7620e..026af0b5687519964a201b50eec6f23bb119150a 100644 (file)
@@ -1 +1 @@
-c8535a0de90fb7a22df15018984db590a85decfb
\ No newline at end of file
+a835658e507fc7d0c684959c0f0afb9018b6a8d4
\ No newline at end of file
index c0e8961a6a336f0ec3098abb72c7facf5bda9e0a..edb65d160eb43c6f6da5141e583cbaaa53490942 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle SELECT statements in SQLite.
 **
-** $Id: select.c,v 1.42 2001/10/19 16:44:57 drh Exp $
+** $Id: select.c,v 1.43 2001/10/20 12:30:11 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -260,7 +260,7 @@ void generateColumnNames(Parse *pParse, IdList *pTabList, ExprList *pEList){
         char *zTab;
  
         zTab = pTabList->a[p->iTable - pParse->nTab].zAlias;
-        if( zTab==0 ) zTab = pTab->zName;
+        if( showFullNames || zTab==0 ) zTab = pTab->zName;
         sqliteSetString(&zName, zTab, ".", pTab->aCol[p->iColumn].zName, 0);
         sqliteVdbeAddOp(v, OP_ColumnName, i, 0);
         sqliteVdbeChangeP3(v, -1, zName, strlen(zName));
index 39480dae1999a4aab5afa4a7e4178d90e36eba90..b7a6fd9e5067329992a1e62285828015adf32868 100644 (file)
@@ -48,7 +48,6 @@ static int sqlite_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
   ** we need to remember from this invocation of the callback.
   */
   if( p->nRow==0 && argv!=0 ){
-    p->nColumn = nCol;
     need = nCol*2;
   }else{
     need = nCol;
@@ -66,6 +65,7 @@ static int sqlite_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
   ** the names of all columns.
   */
   if( p->nRow==0 ){
+    p->nColumn = nCol;
     for(i=0; i<nCol; i++){
       if( colv[i]==0 ){
         z = 0;
index 92a5cc69e0fd15625eb6c954af0658ab977d6573..2757ea59ec881d3489a51024066d2139811ffa42 100644 (file)
@@ -30,7 +30,7 @@
 ** But other routines are also provided to help in building up
 ** a program instruction by instruction.
 **
-** $Id: vdbe.c,v 1.87 2001/10/19 16:44:57 drh Exp $
+** $Id: vdbe.c,v 1.88 2001/10/20 12:30:11 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -1457,7 +1457,7 @@ case OP_Precision: {
   POPSTACK;
   Release(p, nos);
   zStack[nos] = sqliteStrDup(zBuf);
-  aStack[nos].n = strlen(zStack[tos]) + 1;
+  aStack[nos].n = strlen(zStack[nos]) + 1;
   aStack[nos].flags = STK_Str | STK_Dyn;
   break;
 }
index 12d7e3927f824deec60c7fc9c6fbafe7912aca91..884b599fbed0a64f619164ecfb2feaffe75c8371 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this file is testing built-in functions.
 #
-# $Id: func.test,v 1.5 2001/10/13 02:59:09 drh Exp $
+# $Id: func.test,v 1.6 2001/10/20 12:30:12 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -158,6 +158,9 @@ do_test func-4.9 {
   catchsql {SELECT round(c,a) FROM t1 ORDER BY a}
 } {0 {3.0 -12345.68 -5.000}}
 do_test func-4.10 {
+  catchsql {SELECT 'x' || round(c,a) || 'y' FROM t1 ORDER BY a}
+} {0 {x3.0y x-12345.68y x-5.000y}}
+do_test func-4.11 {
   catchsql {SELECT round() FROM t1 ORDER BY a}
 } {1 {too few arguments to function round()}}
 
index 1cc873f4f2514a21d26b9f272b0a30f34d67ed7c..5681f6159eb5d0ed55b7f3d3db2c99d552786fe7 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this file is testing the sqlite_exec_printf() and
 # sqlite_get_table_printf() APIs.
 #
-# $Id: tableapi.test,v 1.3 2001/09/16 00:13:28 drh Exp $
+# $Id: tableapi.test,v 1.4 2001/10/20 12:30:12 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -33,6 +33,7 @@ do_test tableapi-1.2 {
 
 do_test tableapi-2.1 {
   sqlite_get_table_printf $::dbx {
+    BEGIN TRANSACTION;
     SELECT * FROM xyz WHERE b='%q'
   } {Hi Y'all}
 } {0 1 2 a b 1 {Hi Y'all}}
@@ -79,6 +80,69 @@ do_test tableapi-2.6 {
     SELECT * FROM xyz WHERE a IN (42,50,52) ORDER BY a DESC
   } {}
 } {0 3 2 a b 52 NULL 50 (50) 42 (42)}
+do_test tableapi-2.7 {
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz WHERE a>1000
+  } {}
+} {0 0 0}
+
+# Repeat all tests with the empty_result_callbacks pragma turned on
+#
+do_test tableapi-3.1 {
+  sqlite_get_table_printf $::dbx {
+    ROLLBACK;
+    PRAGMA empty_result_callbacks = ON;
+    SELECT * FROM xyz WHERE b='%q'
+  } {Hi Y'all}
+} {0 1 2 a b 1 {Hi Y'all}}
+do_test tableapi-3.2 {
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz
+  } {}
+} {0 1 2 a b 1 {Hi Y'all}}
+do_test tableapi-3.3 {
+  for {set i 2} {$i<=50} {incr i} {
+    sqlite_get_table_printf $::dbx \
+       "INSERT INTO xyz VALUES($i,'(%s)')" $i
+  }
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz ORDER BY a
+  } {}
+} {0 50 2 a b 1 {Hi Y'all} 2 (2) 3 (3) 4 (4) 5 (5) 6 (6) 7 (7) 8 (8) 9 (9) 10 (10) 11 (11) 12 (12) 13 (13) 14 (14) 15 (15) 16 (16) 17 (17) 18 (18) 19 (19) 20 (20) 21 (21) 22 (22) 23 (23) 24 (24) 25 (25) 26 (26) 27 (27) 28 (28) 29 (29) 30 (30) 31 (31) 32 (32) 33 (33) 34 (34) 35 (35) 36 (36) 37 (37) 38 (38) 39 (39) 40 (40) 41 (41) 42 (42) 43 (43) 44 (44) 45 (45) 46 (46) 47 (47) 48 (48) 49 (49) 50 (50)}
+do_test tableapi-3.3.1 {
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz  WHERE a>49 ORDER BY a
+  } {}
+} {0 1 2 a b 50 (50)}
+do_test tableapi-3.3.2 {
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz WHERE a>47 ORDER BY a
+  } {}
+} {0 3 2 a b 48 (48) 49 (49) 50 (50)}
+do_test tableapi-3.4 {
+  set ::big_str [sqlite_mprintf_str {%500'* Hello %500'*} 0 0 {}]
+  sqlite_get_table_printf $::dbx {
+    INSERT INTO xyz VALUES(51,'%q')
+  } $::big_str
+} {0 0 0}
+do_test tableapi-3.5 {
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz WHERE a>49 ORDER BY a;
+  } {}
+} "0 2 2 a b 50 (50) 51 \173$::big_str\175"
+do_test tableapi-3.6 {
+  sqlite_get_table_printf $::dbx {
+    INSERT INTO xyz VALUES(52,NULL)
+  } {}
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz WHERE a IN (42,50,52) ORDER BY a DESC
+  } {}
+} {0 3 2 a b 52 NULL 50 (50) 42 (42)}
+do_test tableapi-3.7 {
+  sqlite_get_table_printf $::dbx {
+    SELECT * FROM xyz WHERE a>1000
+  } {}
+} {0 0 2 a b}
 
 do_test tableapi-99.0 {
   sqlite_close $::dbx
index edfa84828bc5a051df65b45746d01228203821a2..9f73d4bebad4eb6e359a7fa08b5d201f85983675 100644 (file)
@@ -17,6 +17,10 @@ proc chng {date desc} {
   puts "<DD><P><UL>$desc</UL></P></DD>"
 }
 
+chng {2001 Oct 20 (2.0.7)} {
+<li>Patches from Christian Werner</li>
+}
+
 chng {2001 Oct 19 (2.0.6)} {
 <li>Added the EMPTY_RESULT_CALLBACKS pragma</li>
 <li>Support for UTF-8 and ISO8859 characters in column and table names.</li>