From: drh Date: Tue, 29 Mar 2011 23:41:31 +0000 (+0000) Subject: Add support for rowid. X-Git-Tag: version-3.7.6~60^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f938a87cfdb990d655ded1f954c45c46cf6e6a81;p=thirdparty%2Fsqlite.git Add support for rowid. FossilOrigin-Name: 2cf4158ff051916717fc2c0f4b6332d5f6ea6e3d --- diff --git a/manifest b/manifest index 20d5dc398c..10d2ec544b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\sfirst\ssimple\stest-case\sappears\sto\sbe\sworking\snow. -D 2011-03-29T18:21:59.753 +C Add\ssupport\sfor\srowid. +D 2011-03-29T23:41:31.447 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 6c96e694f446500449f683070b906de9fce17b88 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -202,7 +202,7 @@ F src/test_config.c 62f0f8f934b1d5c7e4cd4f506ae453a1117b47d7 F src/test_demovfs.c 0aed671636735116fc872c5b03706fd5612488b5 F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc F src/test_func.c cbdec5cededa0761daedde5baf06004a9bf416b5 -F src/test_fuzzer.c 1427f9b54dbb6fa4742bd611adcd9b0abedfc083 +F src/test_fuzzer.c dcb1e78badcf6f469ae386ecbed0e287920699c6 F src/test_hexio.c 1237f000ec7a491009b1233f5c626ea71bce1ea2 F src/test_init.c 5d624ffd0409d424cf9adbfe1f056b200270077c F src/test_intarray.c d879bbf8e4ce085ab966d1f3c896a7c8b4f5fc99 @@ -893,7 +893,7 @@ F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5 F tool/lemon.c dfd81a51b6e27e469ba21d01a75ddf092d429027 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc F tool/mkkeywordhash.c d2e6b4a5965e23afb80fbe74bb54648cd371f309 -F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e +F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c.tcl cf44512a48112b1ba09590548660a5a6877afdb3 F tool/mksqlite3h.tcl d76c226a5e8e1f3b5f6593bcabe5e98b3b1ec9ff @@ -918,7 +918,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 5f2f2fce40f43debeb0492c9b460b85c7dad2bde -R 1ce7df4d179ed6c133db387973d1e6f3 +P dd41155bc7459cafc1a2d5c75233193abfbac05d +R 580275be924edc1c171a4ef2518a45c4 U drh -Z 6cf1874f37d2b9758d183fd9153a451e +Z c835c92c0dd7f7913ad85caf0a4ef7ac diff --git a/manifest.uuid b/manifest.uuid index 98b1b08a7b..398d9aafa8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -dd41155bc7459cafc1a2d5c75233193abfbac05d \ No newline at end of file +2cf4158ff051916717fc2c0f4b6332d5f6ea6e3d \ No newline at end of file diff --git a/src/test_fuzzer.c b/src/test_fuzzer.c index 9a5f8c5930..5287b1f457 100644 --- a/src/test_fuzzer.c +++ b/src/test_fuzzer.c @@ -86,6 +86,7 @@ struct fuzzer_vtab { /* A fuzzer cursor object */ struct fuzzer_cursor { sqlite3_vtab_cursor base; /* Base class - must be first */ + sqlite3_int64 iRowid; /* The rowid of the current word */ fuzzer_vtab *pVtab; /* The virtual table this cursor belongs to */ fuzzer_cost rLimit; /* Maximum cost of any term */ fuzzer_stem *pStem; /* Sorted list of stems for generating new terms */ @@ -423,6 +424,8 @@ static int fuzzerNext(sqlite3_vtab_cursor *cur){ int rc; fuzzer_stem *pStem, *pNew; + pCur->iRowid++; + /* Use the element the cursor is currently point to to create ** a new stem and insert the new stem into the priority queue. */ @@ -510,6 +513,7 @@ static int fuzzerFilter( pCur->nullRule.zFrom = ""; pStem->pRule = &pCur->nullRule; pStem->n = pStem->nBasis; + pCur->iRowid = 1; return SQLITE_OK; } @@ -536,10 +540,11 @@ static int fuzzerColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){ } /* -** The rowid is always 0 +** The rowid. */ static int fuzzerRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ - *pRowid = 0; /* The rowid is always 0 */ + fuzzer_cursor *pCur = (fuzzer_cursor*)cur; + *pRowid = pCur->iRowid; return SQLITE_OK; } diff --git a/tool/mkopts.tcl b/tool/mkopts.tcl old mode 100644 new mode 100755