/ Check-in [ae83dac7]
Login

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

Overview
Comment:Compile with the SQLITE_ENABLE_8_3_NAME macro set to 2 to force 8+3 filenames to be on all the time.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ae83dac70173fecf203bf7e9f7bcb189d3e48f08
User & Date: drh 2011-07-21 21:29:35
Context
2011-07-22
10:33
Use $(TCLSH_CMD) instead of tclsh in the autoconf makefile. check-in: fd36d806 user: drh tags: trunk
2011-07-21
21:29
Compile with the SQLITE_ENABLE_8_3_NAME macro set to 2 to force 8+3 filenames to be on all the time. check-in: ae83dac7 user: drh tags: trunk
20:59
All multiplexor chunk sizes up to 4GiB. Disable the multiplexor if the chunk size is set to 0. check-in: 83191ad6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/util.c.

  1145   1145     if( x>=0 ) return x;
  1146   1146     if( x==(int)0x80000000 ) return 0x7fffffff;
  1147   1147     return -x;
  1148   1148   }
  1149   1149   
  1150   1150   #ifdef SQLITE_ENABLE_8_3_NAMES
  1151   1151   /*
  1152         -** If SQLITE_ENABLE_8_3_NAME is set at compile-time and if the database
         1152  +** If SQLITE_ENABLE_8_3_NAMES is set at compile-time and if the database
  1153   1153   ** filename in zBaseFilename is a URI with the "8_3_names=1" parameter and
  1154   1154   ** if filename in z[] has a suffix (a.k.a. "extension") that is longer than
  1155   1155   ** three characters, then shorten the suffix on z[] to be the last three
  1156   1156   ** characters of the original suffix.
         1157  +**
         1158  +** If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always
         1159  +** do the suffix shortening regardless of URI parameter.
  1157   1160   **
  1158   1161   ** Examples:
  1159   1162   **
  1160   1163   **     test.db-journal    =>   test.nal
  1161   1164   **     test.db-wal        =>   test.wal
  1162   1165   **     test.db-shm        =>   test.shm
  1163   1166   */
  1164   1167   void sqlite3FileSuffix3(const char *zBaseFilename, char *z){
         1168  +#if SQLITE_ENABLE_8_3_NAMES<2
  1165   1169     const char *zOk;
  1166   1170     zOk = sqlite3_uri_parameter(zBaseFilename, "8_3_names");
  1167         -  if( zOk && sqlite3GetBoolean(zOk) ){
         1171  +  if( zOk && sqlite3GetBoolean(zOk) )
         1172  +#endif
         1173  +  {
  1168   1174       int i, sz;
  1169   1175       sz = sqlite3Strlen30(z);
  1170   1176       for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
  1171   1177       if( z[i]=='.' && ALWAYS(sz>i+4) ) memcpy(&z[i+1], &z[sz-3], 4);
  1172   1178     }
  1173   1179   }
  1174   1180   #endif