/ Check-in [12386197]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure the multiplexor does not create unnecessary overflow files.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1238619756c0c26e43d3c1c873cbdeca22ce9d61
User & Date: drh 2012-01-09 13:41:59
References
2012-01-09
14:57
Cherry-pick the fix to surplus overflow files in the multiplexor, check-in [1238619756c0c] in the trunk. check-in: 2f8c62c3 user: drh tags: nx-devkit
Context
2012-01-09
14:19
Cosmetic changes to lemon. No changes to core functionality nor impact on SQLite. check-in: 393fc78a user: drh tags: trunk
13:41
Make sure the multiplexor does not create unnecessary overflow files. check-in: 12386197 user: drh tags: trunk
11:37
Have test_multiplex.c add a second nul-terminator byte to the strings that it passes to the xOpen method of the underlying VFS, in case that VFS passes the string to sqlite3_uri_parameter() or similar. check-in: 12f5b8c9 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

   324    324       return 0;
   325    325     }
   326    326   #endif
   327    327   
   328    328     *rc = multiplexSubFilename(pGroup, iChunk);
   329    329     if( (*rc)==SQLITE_OK && (pSubOpen = pGroup->aReal[iChunk].p)==0 ){
   330    330       int flags, bExists;
   331         -    createFlag = (pGroup->flags & SQLITE_OPEN_CREATE)!=0;
   332    331       flags = pGroup->flags;
   333    332       if( createFlag ){
   334    333         flags |= SQLITE_OPEN_CREATE;
   335    334       }else if( iChunk==0 ){
   336    335         /* Fall through */
   337    336       }else if( pGroup->aReal[iChunk].z==0 ){
   338    337         return 0;

Changes to test/multiplex.test.

   152    152   #   multiplex-2.7.*: Disable/enable tests.
   153    153   #
   154    154   
   155    155   sqlite3_multiplex_initialize "" 1
   156    156   multiplex_set db main 32768 16
   157    157   
   158    158   forcedelete test.x
          159  +foreach f [glob -nocomplain {test.x*[0-9][0-9][0-9]}] {
          160  +  forcedelete $f
          161  +}
   159    162   do_test multiplex-2.1.2 {
   160    163     sqlite3 db test.x
   161    164     execsql {
   162    165       PRAGMA page_size=1024;
   163    166       PRAGMA auto_vacuum=OFF;
   164    167       PRAGMA journal_mode=DELETE;
   165    168     }
................................................................................
   188    191   do_test multiplex-2.4.1 {
   189    192     sqlite3_multiplex_shutdown
   190    193   } {SQLITE_MISUSE}
   191    194   do_test multiplex-2.4.2 {
   192    195     execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
   193    196   } {}
   194    197   do_test multiplex-2.4.4 { file size [multiplex_name test.x 0] } {7168}
   195         -do_test multiplex-2.4.99 {
          198  +do_test multiplex-2.4.5 {
          199  +  db close
          200  +  sqlite3 db test.x
          201  +  db eval vacuum
   196    202     db close
          203  +  glob test.x*
          204  +} {test.x}
          205  +do_test multiplex-2.4.99 {
   197    206     sqlite3_multiplex_shutdown
   198    207   } {SQLITE_OK}
   199         -
   200    208   
   201    209   do_test multiplex-2.5.1 {
   202    210     multiplex_delete test.x
   203    211     sqlite3_multiplex_initialize "" 1
   204    212     sqlite3 db test.x
   205    213     multiplex_set db main 4096 16
   206    214   } {SQLITE_OK}