From 545311eeca16ba3a1ed2d7727e8d0ab278e9c1a7 Mon Sep 17 00:00:00 2001 From: shess Date: Mon, 13 Nov 2006 20:15:27 +0000 Subject: [PATCH] Allow backing tables to be missing on dropping fts table. Fixes http://www.sqlite.org/cvstrac/tktview?tn=1992,35 . (CVS 3509) FossilOrigin-Name: 9628a61a6f33b7bec3455086534b76437d2622b4 --- ext/fts1/fts1.c | 4 +++- ext/fts2/fts2.c | 6 +++--- manifest | 16 ++++++++-------- manifest.uuid | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ext/fts1/fts1.c b/ext/fts1/fts1.c index b758265d1d..480fc4b9b0 100644 --- a/ext/fts1/fts1.c +++ b/ext/fts1/fts1.c @@ -2082,7 +2082,9 @@ static int fulltextDestroy(sqlite3_vtab *pVTab){ TRACE(("FTS1 Destroy %p\n", pVTab)); rc = sql_exec(v->db, v->zName, - "drop table %_content; drop table %_term"); + "drop table if exists %_content;" + "drop table if exists %_term;" + ); if( rc!=SQLITE_OK ) return rc; fulltext_vtab_destroy((fulltext_vtab *)pVTab); diff --git a/ext/fts2/fts2.c b/ext/fts2/fts2.c index fa091bb0d1..3cd1ad59bf 100644 --- a/ext/fts2/fts2.c +++ b/ext/fts2/fts2.c @@ -2634,9 +2634,9 @@ static int fulltextDestroy(sqlite3_vtab *pVTab){ TRACE(("FTS2 Destroy %p\n", pVTab)); rc = sql_exec(v->db, v->zName, - "drop table %_content;" - "drop table %_segments;" - "drop table %_segdir;" + "drop table if exists %_content;" + "drop table if exists %_segments;" + "drop table if exists %_segdir;" ); if( rc!=SQLITE_OK ) return rc; diff --git a/manifest b/manifest index 52c4a83c1d..6f947555e1 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\suninitialized\sfile\sdescriptor\sfrom\sthe\sunixFile\sstructure\sis\spassed\sto\ssqlite3DetectLockingStyle\sin\sallocateUnixFile\srather\sthan\sthe\sfile\sdescriptor\spassed\sin.\s\sThis\swas\scausing\sthe\slocking\sdetection\son\sNFS\sfile\ssystems\sto\sbehave\ssomewhat\srandomly\sand\sthe\sresult\swas\slocks\swere\snot\srespected\sand\sdata\sloss\scould\soccur.\s(CVS\s3508) -D 2006-11-11T01:31:58 +C Allow\sbacking\stables\sto\sbe\smissing\son\sdropping\sfts\stable.\s\sFixes\nhttp://www.sqlite.org/cvstrac/tktview?tn=1992,35\s.\s(CVS\s3509) +D 2006-11-13T20:15:27 F Makefile.in 8e14898d41a53033ecb687d93c9cd5d109fb9ae3 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -21,7 +21,7 @@ F ext/README.txt 913a7bd3f4837ab14d7e063304181787658b14e1 F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b F ext/fts1/ft_hash.h 1a35e654a235c2c662d3ca0dfc3138ad60b8b7d5 -F ext/fts1/fts1.c 10ab0ca252f71eb6bd855686b43e70b9fd105fb0 +F ext/fts1/fts1.c 78218fb06050899508387de38ce2769f5e57ed8e F ext/fts1/fts1.h 6060b8f62c1d925ea8356cb1a6598073eb9159a6 F ext/fts1/fts1_hash.c 3196cee866edbebb1c0521e21672e6d599965114 F ext/fts1/fts1_hash.h 957d378355ed29f672cd5add012ce8b088a5e089 @@ -33,7 +33,7 @@ F ext/fts1/fulltext.h 08525a47852d1d62a0be81d3fc3fe2d23b094efd F ext/fts1/simple_tokenizer.c 1844d72f7194c3fd3d7e4173053911bf0661b70d F ext/fts1/tokenizer.h 0c53421b832366d20d720d21ea3e1f6e66a36ef9 F ext/fts2/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d -F ext/fts2/fts2.c afa395abf388451241f807832faef20b82c2eb09 +F ext/fts2/fts2.c 9b28f218c003319c7cddc374e4eae62229ab4f83 F ext/fts2/fts2.h bbdab26d34f91974d5b9ade8b7836c140a7c4ce1 F ext/fts2/fts2_hash.c b3f22116d4ef0bc8f2da6e3fdc435c86d0951a9b F ext/fts2/fts2_hash.h e283308156018329f042816eb09334df714e105e @@ -421,7 +421,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P d9e14b6121a7b6786cccafd6e1e83474554632aa -R b9b6d86976fa6c9365d6988ebb2e1f22 -U aswift -Z ccdfaf17a9a8b81bf7be0f75eab131fd +P b9dd16ef3df0785d8d0eea9a6f2ad580a7289834 +R fe80027f82af0692a9ff86e7596c1cb4 +U shess +Z fc29ce5f806e2ffd152c1e84f8a98a96 diff --git a/manifest.uuid b/manifest.uuid index bee0d6af46..9d1bc15954 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b9dd16ef3df0785d8d0eea9a6f2ad580a7289834 \ No newline at end of file +9628a61a6f33b7bec3455086534b76437d2622b4 \ No newline at end of file