/ Check-in [4440e420]
Login

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

Overview
Comment:Do not use strcpy() in the (obsolete) amatch extension. In releasetest.tcl, run Apple tests using -Os instead of -O1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4440e42031b9cb0edf9a8621cd4f46f209392940ec5b9eefcf8c1e3fef5f7b76
User & Date: drh 2017-05-23 19:35:20
Context
2017-05-23
20:00
Remove the msvc.h header file from the autoconf tarball. check-in: 84996aef user: drh tags: trunk
19:35
Do not use strcpy() in the (obsolete) amatch extension. In releasetest.tcl, run Apple tests using -Os instead of -O1 check-in: 4440e420 user: drh tags: trunk
15:21
Disable the LEFT JOIN flattening optimization for aggregate queries, as it does not currently work. Further fix for ticket [cad1ab4cb7b0fc344]. check-in: 44b21e35 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/amatch.c.

   997    997     amatchEncodeInt(pWord->iSeq, pWord->zCost+4);
   998    998     pWord->zCost[8] = 0;
   999    999   }
  1000   1000   
  1001   1001   /* Circumvent compiler warnings about the use of strcpy() by supplying
  1002   1002   ** our own implementation.
  1003   1003   */
  1004         -#if defined(__OpenBSD__)
  1005   1004   static void amatchStrcpy(char *dest, const char *src){
  1006   1005     while( (*(dest++) = *(src++))!=0 ){}
  1007   1006   }
  1008   1007   static void amatchStrcat(char *dest, const char *src){
  1009   1008     while( *dest ) dest++;
  1010   1009     amatchStrcpy(dest, src);
  1011   1010   }
  1012         -#else
  1013         -# define amatchStrcpy strcpy
  1014         -# define amatchStrcat strcat
  1015         -#endif
  1016         -
  1017   1011   
  1018   1012   /*
  1019   1013   ** Add a new amatch_word object to the queue.
  1020   1014   **
  1021   1015   ** If a prior amatch_word object with the same zWord, and nMatch
  1022   1016   ** already exists, update its rCost (if the new rCost is less) but
  1023   1017   ** otherwise leave it unchanged.  Do not add a duplicate.

Changes to test/releasetest.tcl.

   175    175       --enable-json1 --enable-fts5 --enable-session
   176    176     }
   177    177     "Locking-Style" {
   178    178       -O2
   179    179       -DSQLITE_ENABLE_LOCKING_STYLE=1
   180    180     }
   181    181     "Apple" {
   182         -    -O1   # Avoid a compiler bug in gcc 4.2.1 build 5658
          182  +    -Os
   183    183       -DHAVE_GMTIME_R=1
   184    184       -DHAVE_ISNAN=1
   185    185       -DHAVE_LOCALTIME_R=1
   186    186       -DHAVE_PREAD=1
   187    187       -DHAVE_PWRITE=1
   188    188       -DHAVE_USLEEP=1
   189    189       -DHAVE_USLEEP=1