]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a test for [48f29963] that does not depend on FTS.
authordan <dan@noemail.net>
Sat, 29 Oct 2011 15:29:43 +0000 (15:29 +0000)
committerdan <dan@noemail.net>
Sat, 29 Oct 2011 15:29:43 +0000 (15:29 +0000)
FossilOrigin-Name: fb15f5458eb3e17ce9795c09bffe1224fea0eecd

manifest
manifest.uuid
src/test8.c
test/vtab1.test

index 156986eb4bd545d579bf20621a746a2aa78aaf4a..f152bddd59624fd8944d7d8d9e734ff0a47c7dca 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\ssome\scode\sformatting\sin\ssqlite3Ext.h\sto\savoid\slines\slonger\sthan\s80\ncharacters.
-D 2011-10-29T12:42:31.756
+C Add\sa\stest\sfor\s[48f29963]\sthat\sdoes\snot\sdepend\son\sFTS.
+D 2011-10-29T15:29:43.114
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in a162fe39e249b8ed4a65ee947c30152786cfe897
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -195,7 +195,7 @@ F src/test4.c d1e5a5e904d4b444cf572391fdcb017638e36ff7
 F src/test5.c e1a19845625144caf038031234a12185e40d315c
 F src/test6.c 3191b4ab964a144230ff9ef96c093520375c7b2a
 F src/test7.c 2e0781754905c8adc3268d8f0967e7633af58843
-F src/test8.c 6b1d12912a04fe6fca8c45bb9c3ea022f4352228
+F src/test8.c 99f70341d6ec480313775127f4cd14b4a47db557
 F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
 F src/test_async.c 0612a752896fad42d55c3999a5122af10dcf22ad
 F src/test_autoext.c 30e7bd98ab6d70a62bb9ba572e4c7df347fe645e
@@ -874,7 +874,7 @@ F test/vacuum4.test d3f8ecff345f166911568f397d2432c16d2867d9
 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
 F test/veryquick.test 7701bb609fe8bf6535514e8b849a309e8f00573b
 F test/view.test b182a67ec43f490b156b5a710827a341be83dd17
-F test/vtab1.test b40b7e531dea8f0f7e78c76ff96eed103f58d015
+F test/vtab1.test 12fbb309ce830c4064e44f275eb02a65c2780076
 F test/vtab2.test 7bcffc050da5c68f4f312e49e443063e2d391c0d
 F test/vtab3.test baad99fd27217f5d6db10660522e0b7192446de1
 F test/vtab4.test 942f8b8280b3ea8a41dae20e7822d065ca1cb275
@@ -973,7 +973,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P 3565fcf898960d7a23d23a2f363b039b2e29447b
-R 9032c16732b3e2ea6c9c68769bc3a6a1
-U drh
-Z 26f41ca303a5b1072250f37f0d687db4
+P 3ec20c3020e1bb5ec2815848af75cf4847a218e5
+R bee3a4997207c9d3364557054b655c5c
+U dan
+Z 3b6231d5ae6559c0d9e1b3fbe5372e52
index 1d9ff26db2e2e07325b6dea75dfcbe555c27ac5c..211af56ed38db11d84e7e715b379e5676c76c51d 100644 (file)
@@ -1 +1 @@
-3ec20c3020e1bb5ec2815848af75cf4847a218e5
\ No newline at end of file
+fb15f5458eb3e17ce9795c09bffe1224fea0eecd
\ No newline at end of file
index b3e6058acb19d331715a9a0cdd0d39d9ce6c0417..283d790b7d2af5a9882c7b9c9a7379f7b50e4c5b 100644 (file)
@@ -1232,12 +1232,50 @@ static int echoRename(sqlite3_vtab *vtab, const char *zNewName){
   return rc;
 }
 
+static int echoSavepoint(sqlite3_vtab *pVTab, int iSavepoint){
+  assert( pVTab );
+  return SQLITE_OK;
+}
+
+static int echoRelease(sqlite3_vtab *pVTab, int iSavepoint){
+  assert( pVTab );
+  return SQLITE_OK;
+}
+
+static int echoRollbackTo(sqlite3_vtab *pVTab, int iSavepoint){
+  assert( pVTab );
+  return SQLITE_OK;
+}
+
 /*
 ** A virtual table module that merely "echos" the contents of another
 ** table (like an SQL VIEW).
 */
 static sqlite3_module echoModule = {
-  0,                         /* iVersion */
+  1,                         /* iVersion */
+  echoCreate,
+  echoConnect,
+  echoBestIndex,
+  echoDisconnect, 
+  echoDestroy,
+  echoOpen,                  /* xOpen - open a cursor */
+  echoClose,                 /* xClose - close a cursor */
+  echoFilter,                /* xFilter - configure scan constraints */
+  echoNext,                  /* xNext - advance a cursor */
+  echoEof,                   /* xEof */
+  echoColumn,                /* xColumn - read data */
+  echoRowid,                 /* xRowid - read data */
+  echoUpdate,                /* xUpdate - write data */
+  echoBegin,                 /* xBegin - begin transaction */
+  echoSync,                  /* xSync - sync transaction */
+  echoCommit,                /* xCommit - commit transaction */
+  echoRollback,              /* xRollback - rollback transaction */
+  echoFindFunction,          /* xFindFunction - function overloading */
+  echoRename                 /* xRename - rename the table */
+};
+
+static sqlite3_module echoModuleV2 = {
+  2,                         /* iVersion */
   echoCreate,
   echoConnect,
   echoBestIndex,
@@ -1257,6 +1295,9 @@ static sqlite3_module echoModule = {
   echoRollback,              /* xRollback - rollback transaction */
   echoFindFunction,          /* xFindFunction - function overloading */
   echoRename,                /* xRename - rename the table */
+  echoSavepoint,
+  echoRelease,
+  echoRollbackTo
 };
 
 /*
@@ -1284,9 +1325,18 @@ static int register_echo_module(
     return TCL_ERROR;
   }
   if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
+
+  /* Virtual table module "echo" */
   pMod = sqlite3_malloc(sizeof(EchoModule));
   pMod->interp = interp;
   sqlite3_create_module_v2(db, "echo", &echoModule, (void*)pMod, moduleDestroy);
+
+  /* Virtual table module "echo_v2" */
+  pMod = sqlite3_malloc(sizeof(EchoModule));
+  pMod->interp = interp;
+  sqlite3_create_module_v2(db, "echo_v2", 
+      &echoModuleV2, (void*)pMod, moduleDestroy
+  );
   return TCL_OK;
 }
 
index c135d83bf015a46657231d2cca796a898ff981b9..16f1b4389ce522ade6b798d7836304ce3060c814 100644 (file)
@@ -1178,5 +1178,20 @@ do_test vtab1-17.1 {
   catchsql { CREATE VIRTUAL TABLE t4 USING echo(t3); }
 } {1 {vtable constructor failed: t4}}
 
+# This test verifies that ticket 48f29963 is fixed.
+#
+do_test vtab1-17.1 {
+  execsql { 
+    CREATE TABLE t5(a, b);
+    CREATE VIRTUAL TABLE e5 USING echo_v2(t5);
+    BEGIN;
+      INSERT INTO e5 VALUES(1, 2);
+      DROP TABLE e5;
+      SAVEPOINT one;
+      ROLLBACK TO one;
+    COMMIT;
+  }
+} {}
+
 unset -nocomplain echo_module_begin_fail
 finish_test