]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Updates to multiplex.test script; misc. bug fixes;
authorshaneh <shaneh@noemail.net>
Wed, 30 Mar 2011 21:03:07 +0000 (21:03 +0000)
committershaneh <shaneh@noemail.net>
Wed, 30 Mar 2011 21:03:07 +0000 (21:03 +0000)
FossilOrigin-Name: c41ff2358e8af0fe2186ab4173b81fba204a57ab

manifest
manifest.uuid
src/test_multiplex.c
test/multiplex.test

index f83b7c380fe220e068b9fc59830c77c58c53c376..66152d91b4037af0ff36c7fc4e627a6b4776ce95 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In-progress\schanges\s-\sdo\snot\suse;\sRemoved\sprefix\ssupport;\sAdded\sfile\scontrol\sinterface\sto\senable/disable\sand\sadjust\schunk\ssize;\nadded\sapp-def\sfunction\sfor\ssame;
-D 2011-03-29T05:06:46.821
+C Updates\sto\smultiplex.test\sscript;\s\smisc.\sbug\sfixes;
+D 2011-03-30T21:03:07.666
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 27701a1653595a1f2187dc61c8117e00a6c1d50f
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -209,7 +209,7 @@ F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
 F src/test_journal.c 785edd54f963aefb3c1628124170a56697c68c70
 F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
 F src/test_malloc.c fd6188b1501c0010fb4241ddc9f0d5ac402c688d
-F src/test_multiplex.c 234f4b371d1a2ba88041e17c21e13f5273dd1b50
+F src/test_multiplex.c aa5da1f2847d6d6e69a41a6d8a9242860549258f
 F src/test_multiplex.h 22238a3286817918f1975a7c523827ea45d9fbb4
 F src/test_mutex.c a6bd7b9cf6e19d989e31392b06ac8d189f0d573e
 F src/test_onefile.c 40cf9e212a377a6511469384a64b01e6e34b2eec
@@ -576,7 +576,7 @@ F test/misc5.test 45b2e3ed5f79af2b4f38ae362eaf4c49674575bd
 F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
 F test/misc7.test 29032efcd3d826fbd409e2a7af873e7939f4a4e3
 F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33
-F test/multiplex.test b813d11f2cd6a15c64d85b97c0c009afc2168226
+F test/multiplex.test 5e03b40ebdee38d5a75ebbf38a469abede9414de
 F test/mutex1.test 78b2b9bb320e51d156c4efdb71b99b051e7a4b41
 F test/mutex2.test bfeaeac2e73095b2ac32285d2756e3a65e681660
 F test/nan.test a44e04df1486fcfb02d32468cbcd3c8e1e433723
@@ -914,7 +914,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P cfa4a2f7ea948be0925227efca82baea509249c9
-R cd848b3ee75fe87902bd71c01c78919c
+P bc02d0c193225bd49a8d8a3295aeac752d3c2e30
+R 48cf934a82b0a69cbaf131357eaf96fa
 U shaneh
-Z 7951456e7d17419744e4f948b8232fcd
+Z e448ef64d054580e4db4bcfd141ad84b
index 9ab9b53bfec4dce69cf3805f279aeef250832ecf..78855b3796fe6a2833c07264cdb4ca3b8763dcf1 100644 (file)
@@ -1 +1 @@
-bc02d0c193225bd49a8d8a3295aeac752d3c2e30
\ No newline at end of file
+c41ff2358e8af0fe2186ab4173b81fba204a57ab
\ No newline at end of file
index 3855050eddf4357a9bac3fc95efca35692a2d0c2..a1768f0c4b24e127d1897f1dd3926c02df2a3cf5 100644 (file)
@@ -25,9 +25,6 @@
 #include "sqliteInt.h"
 #include "test_multiplex.h"
 
-#include "sqlite3ext.h"
-SQLITE_EXTENSION_INIT1
-
 /*
 ** For a build without mutexes, no-op the mutex calls.
 */
@@ -216,13 +213,12 @@ static void multiplexControlFunc(
 ** This is the entry point to register the extension for the multiplex_control() function.
 */
 static int multiplexFuncInit(
-  sqlite3 *db, 
-  char **pzErrMsg, 
-  const sqlite3_api_routines *pApi
+  sqlite3 *db
 ){
-  sqlite3_create_function(db, "multiplex_control", 2, SQLITE_ANY, 
+  int rc;
+  rc = sqlite3_create_function(db, "multiplex_control", 2, SQLITE_ANY, 
     db, multiplexControlFunc, 0, 0);
-  return 0;
+  return rc;
 }
 
 /************************* VFS Method Wrappers *****************************/
@@ -686,11 +682,16 @@ static int multiplexFileControl(sqlite3_file *pConn, int op, void *pArg){
         }
       }
       break;
+    case SQLITE_FCNTL_SIZE_HINT:
+    case SQLITE_FCNTL_CHUNK_SIZE:
+      /* no-op these */
+      rc = SQLITE_OK;
+      break;
     default:
-  pSubOpen = multiplexSubOpen(p, 0, &rc, NULL);
-  if( pSubOpen ){
+      pSubOpen = multiplexSubOpen(p, 0, &rc, NULL);
+      if( pSubOpen ){
         rc = pSubOpen->pMethods->xFileControl(pSubOpen, op, pArg);
-  }
+      }
       break;
   }
   return rc;
index 582f71eabefcc450d5d9196a990be697a56ea557..ce76fdfeaba535105cb64f676b200a6fb94a6130 100644 (file)
@@ -203,9 +203,6 @@ do_test multiplex-2.5.99 {
   sqlite3_multiplex_shutdown
 } {SQLITE_OK}
 
-return
-
-# TBD fix the below
 
 set all_journal_modes {delete persist truncate memory off}
 foreach jmode $all_journal_modes {
@@ -214,11 +211,11 @@ foreach jmode $all_journal_modes {
     do_test multiplex-2.6.1.$sz.$jmode {
       multiplex_delete test.db
       sqlite3_multiplex_initialize "" 1
+      sqlite3 db test.db
       multiplex_set db main $sz 32
     } {SQLITE_OK}
 
     do_test multiplex-2.6.2.$sz.$jmode {
-      sqlite3 db test.db
       db eval {
         PRAGMA page_size = 1024;
         PRAGMA auto_vacuum = off;
@@ -264,10 +261,10 @@ foreach jmode $all_journal_modes {
 do_test multiplex-3.1.1 {
   multiplex_delete test.db
   sqlite3_multiplex_initialize "" 1
+  sqlite3 db test.db
   multiplex_set db main 32768 16
 } {SQLITE_OK}
 do_test multiplex-3.1.2 {
-  sqlite3 db test.db
   execsql {
     PRAGMA page_size = 1024;
     PRAGMA journal_mode = delete;
@@ -490,9 +487,9 @@ if {0==[info exists ::G(perm:presql)] || $::G(perm:presql) == ""} {
       }
       db close
       sqlite3_multiplex_initialize "" 1
-      multiplex_set db main 4096 16
       sqlite3 db test.db
-    } {}
+      multiplex_set db main 4096 16
+    } {SQLITE_OK}
     do_test multiplex-5.6.3.$jmode {
       catchsql {
         INSERT INTO t1 VALUES(6, randomblob(1100));