/ Check-in [6b0276f9]
Login

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

Overview
Comment:Fix a bug in kvtest causing "init --variance 0" runs to generate single byte blob values only.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6b0276f968d3c6430076c6e540907cf840d0f398
User & Date: dan 2017-02-06 07:37:50
Context
2017-02-06
15:27
Add the "max-limits" utility program to the tools/ subdirectory. check-in: c54173b6 user: drh tags: trunk
07:37
Fix a bug in kvtest causing "init --variance 0" runs to generate single byte blob values only. check-in: 6b0276f9 user: dan tags: trunk
01:19
Remove incorrect testcase() macros from R-Tree. check-in: 853a58a7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/kvtest.c.

   306    306       "PRAGMA page_size=%d;\n"
   307    307       "VACUUM;\n"
   308    308       "BEGIN;\n"
   309    309       "CREATE TABLE kv(k INTEGER PRIMARY KEY, v BLOB);\n"
   310    310       "WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<%d)"
   311    311       " INSERT INTO kv(k,v) SELECT x, randomblob(%d+(random()%%(%d))) FROM c;\n"
   312    312       "COMMIT;\n",
   313         -    pgsz, nCount, sz, iVariance
          313  +    pgsz, nCount, sz, iVariance+1
   314    314     );
   315    315     rc = sqlite3_exec(db, zSql, 0, 0, &zErrMsg);
   316    316     if( rc ) fatalError("database create failed: %s", zErrMsg);
   317    317     sqlite3_free(zSql);
   318    318     sqlite3_close(db);
   319    319     return 0;
   320    320   }