/ Check-in [d2619746]
Login

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

Overview
Comment:Fix a harmless compiler warning in fuzzcheck. Add new OSSFuzz test cases to the test case library.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d2619746cb233f4be127a77988548dd1d90eebddf0d0ac9107913b240553e5d0
User & Date: drh 2018-05-08 13:03:31
Context
2018-05-08
23:17
Correctly format the STAT1 and STAT4 content in the output from the ".fullschema" command in the CLI. Fix for ticket [e63a34a0045832dc850367552]. check-in: 0c3f128f user: drh tags: trunk
22:47
Experiments with routines for processing GeoJSON. check-in: d22fbff2 user: drh tags: geojson
13:32
Merge changes from trunk, especially the activation of the cell-overwrite optimization for indexes and WITHOUT ROWID tables. check-in: a016144b user: drh tags: apple-osx
13:03
Fix a harmless compiler warning in fuzzcheck. Add new OSSFuzz test cases to the test case library. check-in: d2619746 user: drh tags: trunk
12:49
Fuzz test cases for UPSERT. check-in: fd11fbd2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/fuzzcheck.c.

   858    858     char *zExpDb = 0;            /* Write Databases to files in this directory */
   859    859     char *zExpSql = 0;           /* Write SQL to files in this directory */
   860    860     void *pHeap = 0;             /* Heap for use by SQLite */
   861    861     int ossFuzz = 0;             /* enable OSS-FUZZ testing */
   862    862     int ossFuzzThisDb = 0;       /* ossFuzz value for this particular database */
   863    863     int nativeMalloc = 0;        /* Turn off MEMSYS3/5 and lookaside if true */
   864    864     sqlite3_vfs *pDfltVfs;       /* The default VFS */
   865         -  int openFlags;               /* Flags for sqlite3_open_v2() */
          865  +  int openFlags4Data;          /* Flags for sqlite3_open_v2() */
   866    866   
   867    867     iBegin = timeOfDay();
   868    868   #ifdef __unix__
   869    869     signal(SIGALRM, timeoutHandler);
   870    870   #endif
   871    871     g.zArgv0 = argv[0];
   872         -  openFlags = SQLITE_OPEN_READONLY;
          872  +  openFlags4Data = SQLITE_OPEN_READONLY;
   873    873     zFailCode = getenv("TEST_FAILURE");
   874    874     pDfltVfs = sqlite3_vfs_find(0);
   875    875     inmemVfsRegister(1);
   876    876     for(i=1; i<argc; i++){
   877    877       const char *z = argv[i];
   878    878       if( z[0]=='-' ){
   879    879         z++;
................................................................................
   908    908         }else
   909    909         if( strcmp(z,"limit-vdbe")==0 ){
   910    910           vdbeLimitFlag = 1;
   911    911         }else
   912    912         if( strcmp(z,"load-sql")==0 ){
   913    913           zInsSql = "INSERT INTO xsql(sqltext)VALUES(CAST(readfile(?1) AS text))";
   914    914           iFirstInsArg = i+1;
   915         -        openFlags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
          915  +        openFlags4Data = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
   916    916           break;
   917    917         }else
   918    918         if( strcmp(z,"load-db")==0 ){
   919    919           zInsSql = "INSERT INTO db(dbcontent) VALUES(readfile(?1))";
   920    920           iFirstInsArg = i+1;
   921         -        openFlags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
          921  +        openFlags4Data = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
   922    922           break;
   923    923         }else
   924    924         if( strcmp(z,"m")==0 ){
   925    925           if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
   926    926           zMsg = argv[++i];
   927         -        openFlags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
          927  +        openFlags4Data = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
   928    928         }else
   929    929         if( strcmp(z,"native-malloc")==0 ){
   930    930           nativeMalloc = 1;
   931    931         }else
   932    932         if( strcmp(z,"native-vfs")==0 ){
   933    933           nativeFlag = 1;
   934    934         }else
................................................................................
   941    941         }else
   942    942         if( strcmp(z,"quiet")==0 || strcmp(z,"q")==0 ){
   943    943           quietFlag = 1;
   944    944           verboseFlag = 0;
   945    945         }else
   946    946         if( strcmp(z,"rebuild")==0 ){
   947    947           rebuildFlag = 1;
   948         -        openFlags = SQLITE_OPEN_READWRITE;
          948  +        openFlags4Data = SQLITE_OPEN_READWRITE;
   949    949         }else
   950    950         if( strcmp(z,"result-trace")==0 ){
   951    951           runFlags |= SQL_OUTPUT;
   952    952         }else
   953    953         if( strcmp(z,"sqlid")==0 ){
   954    954           if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
   955    955           onlySqlid = integerValue(argv[++i]);
................................................................................
   987    987         fatalError("cannot import into more than one database");
   988    988       }
   989    989     }
   990    990   
   991    991     /* Process each source database separately */
   992    992     for(iSrcDb=0; iSrcDb<nSrcDb; iSrcDb++){
   993    993       rc = sqlite3_open_v2(azSrcDb[iSrcDb], &db,
   994         -                         openFlags, pDfltVfs->zName);
          994  +                         openFlags4Data, pDfltVfs->zName);
   995    995       if( rc ){
   996    996         fatalError("cannot open source database %s - %s",
   997    997         azSrcDb[iSrcDb], sqlite3_errmsg(db));
   998    998       }
   999    999       rc = sqlite3_exec(db,
  1000   1000          "CREATE TABLE IF NOT EXISTS db(\n"
  1001   1001          "  dbid INTEGER PRIMARY KEY, -- database id\n"

Changes to test/fuzzdata5.db.

cannot compute difference between binary files