]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix some fts3 related issues with the autoconf and amalgamation build systems. fts3-refactor
authordan <dan@noemail.net>
Thu, 19 Nov 2009 15:25:25 +0000 (15:25 +0000)
committerdan <dan@noemail.net>
Thu, 19 Nov 2009 15:25:25 +0000 (15:25 +0000)
FossilOrigin-Name: 3b17924754343c0163464dabf01a9c46ffccef28

Makefile.in
configure [changed mode: 0644->0755]
ext/fts3/fts3_snippet.c
ext/fts3/fts3_tokenizer.c
ext/fts3/fts3_write.c
main.mk
manifest
manifest.uuid
test/fts3malloc.test
tool/mksqlite3c.tcl

index 542f6bae3caf8adb313f25175c4330941e4af983..3e769071e31418821176b35cbf83fcfc7bcc78e5 100644 (file)
@@ -311,15 +311,17 @@ SRC += \
 SRC += \
   $(TOP)/ext/fts3/fts3.c \
   $(TOP)/ext/fts3/fts3.h \
+  $(TOP)/ext/fts3/fts3Int.h \
   $(TOP)/ext/fts3/fts3_expr.c \
-  $(TOP)/ext/fts3/fts3_expr.h \
   $(TOP)/ext/fts3/fts3_hash.c \
   $(TOP)/ext/fts3/fts3_hash.h \
   $(TOP)/ext/fts3/fts3_icu.c \
   $(TOP)/ext/fts3/fts3_porter.c \
+  $(TOP)/ext/fts3/fts3_snippet.c \
   $(TOP)/ext/fts3/fts3_tokenizer.h \
   $(TOP)/ext/fts3/fts3_tokenizer.c \
-  $(TOP)/ext/fts3/fts3_tokenizer1.c
+  $(TOP)/ext/fts3/fts3_tokenizer1.c \
+  $(TOP)/ext/fts3/fts3_write.c
 SRC += \
   $(TOP)/ext/icu/sqliteicu.h \
   $(TOP)/ext/icu/icu.c
@@ -428,7 +430,7 @@ HDR += \
   $(TOP)/ext/fts2/fts2_tokenizer.h
 HDR += \
   $(TOP)/ext/fts3/fts3.h \
-  $(TOP)/ext/fts3/fts3_expr.h \
+  $(TOP)/ext/fts3/fts3Int.h \
   $(TOP)/ext/fts3/fts3_hash.h \
   $(TOP)/ext/fts3/fts3_tokenizer.h
 HDR += \
old mode 100644 (file)
new mode 100755 (executable)
index 63728de6db154b1c7f441fce346b142093b39907..f802b16ad24dd24a711c5acf2b6eb0027921fde4 100644 (file)
@@ -11,6 +11,8 @@
 ******************************************************************************
 */
 
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
 #include "fts3Int.h"
 #include <string.h>
 #include <assert.h>
@@ -748,3 +750,4 @@ void sqlite3Fts3Snippet(
   fts3SnippetFree(p);
 }
 
+#endif
index ad8e7727001ce548b996dcc0377b48f145350b52..75d0b1c920c34d08be6a109e9123e7a5a133505b 100644 (file)
 #include <ctype.h>
 #include <string.h>
 
-static int safe_isspace(char c){
-  return (c&0x80)==0 ? isspace(c) : 0;
-}
-
 /*
 ** Implementation of the SQL scalar function for accessing the underlying 
 ** hash table. This function may be called as follows:
@@ -170,7 +166,7 @@ int sqlite3Fts3InitTokenizer(
   if( !z ){
     zCopy = sqlite3_mprintf("simple");
   }else{
-    while( safe_isspace(*z) ) z++;
+    while( (*z&0x80) && isspace(*z) ) z++;
     if( sqlite3_strnicmp(z, "tokenize", 8) || fts3IsIdChar(z[8])){
       return SQLITE_OK;
     }
index 34381a2ac764f558af55a447655a88c8e3918cdf..b420f45137fb5b10a49b9e2b975f83041be69f75 100644 (file)
@@ -17,6 +17,8 @@
 ** code in fts3.c.
 */
 
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
 #include "fts3Int.h"
 #include <string.h>
 #include <assert.h>
@@ -1947,3 +1949,4 @@ int sqlite3Fts3Optimize(Fts3Table *p){
   return rc;
 }
 
+#endif
diff --git a/main.mk b/main.mk
index 96ddedd195bf63bf235f5fec383247fe1f24e73b..d135af3253e40f6de63915f11ec097b45583b6ff 100644 (file)
--- a/main.mk
+++ b/main.mk
@@ -187,6 +187,7 @@ SRC += \
   $(TOP)/ext/fts3/fts3_hash.h \
   $(TOP)/ext/fts3/fts3_icu.c \
   $(TOP)/ext/fts3/fts3_porter.c \
+  $(TOP)/ext/fts3/fts3_snippet.c \
   $(TOP)/ext/fts3/fts3_tokenizer.h \
   $(TOP)/ext/fts3/fts3_tokenizer.c \
   $(TOP)/ext/fts3/fts3_tokenizer1.c \
index 643329eeaf5cb897384783cea2fb656625ebbaa2..b5d5dd021ea20bd248fafb2c64a49c4e11a2b2f3 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,7 +1,7 @@
-C Merge\swith\s[4bd4330709].
-D 2009-11-19T14:57:14
+C Fix\ssome\sfts3\srelated\sissues\swith\sthe\sautoconf\sand\samalgamation\sbuild\ssystems.
+D 2009-11-19T15:25:25
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
-F Makefile.in 53f3dfa49f28ab5b80cb083fb7c9051e596bcfa1
+F Makefile.in 7f6c6aa7feeeb5e26e01b344161d9aa1b5d64177
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
 F Makefile.vxworks 10010ddbf52e2503c7c49c7c0b7c7a096f8638a6
 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
@@ -19,7 +19,7 @@ F art/src_logo.gif 9341ef09f0e53cd44c0c9b6fc3c16f7f3d6c2ad9
 F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
 F config.h.in 868fdb48c028421a203470e15c69ada15b9ba673
 F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
-F configure 71cfacd7732f55af4aecaa8e7bea518e11cecc5e
+F configure 71cfacd7732f55af4aecaa8e7bea518e11cecc5e x
 F configure.ac 14740970ddb674d92a9f5da89083dff1179014ff
 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
 F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
@@ -64,11 +64,11 @@ F ext/fts3/fts3_hash.c 1af1833a4d581ee8d668bb71f5a500f7a0104982
 F ext/fts3/fts3_hash.h 39524725425078bf9e814e9569c74a8e5a21b9fb
 F ext/fts3/fts3_icu.c ac494aed69835008185299315403044664bda295
 F ext/fts3/fts3_porter.c 3063da945fb0a935781c135f7575f39166173eca
-F ext/fts3/fts3_snippet.c 8ea9619247ac61c79aca650fc3307b8b4097b5f3
-F ext/fts3/fts3_tokenizer.c 185a212670a9bbdeb5cad6942305e681bce5c87b
+F ext/fts3/fts3_snippet.c 082f2906deaaa2656f19b88834e89d099352af6e
+F ext/fts3/fts3_tokenizer.c 36f78d1a43a29b0feaec1ced6da9e56b9c653d1f
 F ext/fts3/fts3_tokenizer.h 7ff73caa3327589bf6550f60d93ebdd1f6a0fb5c
 F ext/fts3/fts3_tokenizer1.c 0a5bcc579f35de5d24a9345d7908dc25ae403ee7
-F ext/fts3/fts3_write.c 041f6c4dda87db0248402245dc15c348ef8f7a99
+F ext/fts3/fts3_write.c 9048d3c1d5dcb43769cde7c00c3b3c8bcac41099
 F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
 F ext/icu/README.txt 3b130aa66e7a681136f6add198b076a2f90d1e33
 F ext/icu/icu.c 12e763d288d23b5a49de37caa30737b971a2f1e2
@@ -88,7 +88,7 @@ F ext/rtree/tkt3363.test 2bf324f7908084a5f463de3109db9c6e607feb1b
 F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
 F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
-F main.mk 5b9fc534b96fe16b6bb57883bb0e4e28cc902df6
+F main.mk 3f64bbfc5605584fe551305406991f7e02791fef
 F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
 F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f
 F mkextw.sh 4123480947681d9b434a5e7b1ee08135abe409ac
@@ -398,7 +398,7 @@ F test/fts3d.test 95fb3c862cbc4297c93fceb9a635543744e9ef52
 F test/fts3e.test 1f6c6ac9cc8b772ca256e6b22aaeed50c9350851
 F test/fts3expr.test 05dab77387801e4900009917bb18f556037d82da
 F test/fts3expr2.test 18da930352e5693eaa163a3eacf96233b7290d1a
-F test/fts3malloc.test cda1b22d8c86c3e434d93b63f2fc7a0191fb6d30
+F test/fts3malloc.test efbd316eafe54471b7f68604c050418b31d1914e
 F test/fts3near.test dc196dd17b4606f440c580d45b3d23aa975fd077
 F test/func.test af106ed834001738246d276659406823e35cde7b
 F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
@@ -754,7 +754,7 @@ F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
 F tool/mkkeywordhash.c 9216336085e7a7c226a35c0bd780239968f8304f
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
 F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
-F tool/mksqlite3c.tcl a7e87ce780cbf30782bca3fd1197e86f92ae6f24
+F tool/mksqlite3c.tcl 24e8f32d406259135bbd23b5bb2adead51338a74
 F tool/mksqlite3h.tcl eb100dce83f24b501b325b340f8b5eb8e5106b3b
 F tool/mksqlite3internalh.tcl 7b43894e21bcb1bb39e11547ce7e38a063357e87
 F tool/omittest.tcl 27d6f6e3b1e95aeb26a1c140e6eb57771c6d794a
@@ -772,7 +772,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P c8d2bd37a4c16154912a0831690584011dc230cb 4bd43307090258f8652c995b056101c51b81274a
-R c6e29b4f41f6c75cf1ecaf9ff4360465
+P 7a46d1ebe348ce9f1e8732617a8e280f152fe979
+R 627d84d1c58a3ccfd8d073223703a50a
 U dan
-Z a2826435df5c371f1372a7d0448a17a3
+Z 1a410374b24b6acf121a498e7894d5a2
index 92c0a197f2687fbbfddba5e9b895319dfb1e01d0..829cffec4d66b3acf2593ef1cd4b89760cf132d2 100644 (file)
@@ -1 +1 @@
-7a46d1ebe348ce9f1e8732617a8e280f152fe979
\ No newline at end of file
+3b17924754343c0163464dabf01a9c46ffccef28
\ No newline at end of file
index f600fa9d61e89857b618bd4cc1207c0a75cf2318..a1c0905136718d4b946e82a6e991a7e503da4dd7 100644 (file)
@@ -29,7 +29,10 @@ set DO_MALLOC_TEST 1
 
 # Test organization:
 #
-# fts3_malloc-1.*: Test CREATE and DROP table statements.
+# fts3_malloc-1.*: Test OOM during CREATE and DROP table statements.
+# fts3_malloc-2.*: Test OOM during SELECT operations.
+# fts3_malloc-3.*: Test OOM during SELECT operations with a larger database.
+# fts3_malloc-4.*: Test OOM during database write operations.
 #
 #
 
@@ -54,8 +57,15 @@ set DO_MALLOC_TEST 1
 # is executed just once. In this case the test case passes if the results
 # match the expected results passed via parameter $result.
 #
+proc do_select_test {name sql result} {
+  doPassiveTest $name $sql [list 0 $result]
+}
+
+proc do_error_test {name sql error} {
+  doPassiveTest $name $sql [list 1 $error]
+}
 
-proc do_passive_test {name sql catchres} {
+proc doPassiveTest {name sql catchres} {
   if {![info exists ::DO_MALLOC_TEST]} { set ::DO_MALLOC_TEST 1 }
 
   if {$::DO_MALLOC_TEST} {
@@ -82,13 +92,6 @@ proc do_passive_test {name sql catchres} {
   }
 }
 
-proc do_select_test {name sql result} {
-  do_passive_test $name $sql [list 0 $result]
-}
-
-proc do_error_test {name sql error} {
-  do_passive_test $name $sql [list 1 $error]
-}
 
 #-------------------------------------------------------------------------
 # Test a single write to the database. In this case a  "write" is a 
index 99dc0d31249a64ba9a1ea377e9ff7e72a08f1457..9a395d83203791504c2944f1a3b0a43826976c66 100644 (file)
@@ -87,7 +87,6 @@ foreach hdr {
    btree.h
    btreeInt.h
    fts3.h
-   fts3_expr.h
    fts3_hash.h
    fts3_tokenizer.h
    hash.h
@@ -295,6 +294,8 @@ foreach file {
    fts3_porter.c
    fts3_tokenizer.c
    fts3_tokenizer1.c
+   fts3_write.c
+   fts3_snippet.c
 
    rtree.c
    icu.c