Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Avoid freeing the array of instance matches each time the fts5 xNext() method is called. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b9b0c1e50d77f5d6e02f43fbb100c722 |
User & Date: | dan 2015-07-03 17:14:18.530 |
Context
2015-07-03
| ||
17:54 | Enable use of the __builtin_bswap32() only with GCC 4.3 and higher. (check-in: 030f60a7ba user: mistachkin tags: trunk) | |
17:14 | Avoid freeing the array of instance matches each time the fts5 xNext() method is called. (check-in: b9b0c1e50d user: dan tags: trunk) | |
14:34 | New command-line options for speedtest1: --multithread, --nomemstat, --serialized, and --singlethread (check-in: 2b7567229e user: drh tags: trunk) | |
Changes
Changes to ext/fts5/fts5_main.c.
︙ | |||
215 216 217 218 219 220 221 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | + - - - + + + | #define FTS5_BI_ORDER_DESC 0x0080 /* ** Values for Fts5Cursor.csrflags */ #define FTS5CSR_REQUIRE_CONTENT 0x01 #define FTS5CSR_REQUIRE_DOCSIZE 0x02 #define FTS5CSR_REQUIRE_INST 0x04 |
︙ | |||
607 608 609 610 611 612 613 | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | - - - - + + + + + - + | /* ** This function is called after the cursor passed as the only argument ** is moved to point at a different row. It clears all cached data ** specific to the previous row stored by the cursor object. */ static void fts5CsrNewrow(Fts5Cursor *pCsr){ |
︙ | |||
1518 1519 1520 1521 1522 1523 1524 | 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 | - + | /* ** Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated ** correctly for the current view. Return SQLITE_OK if successful, or an ** SQLite error code otherwise. */ static int fts5CacheInstArray(Fts5Cursor *pCsr){ int rc = SQLITE_OK; |
︙ | |||
1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 | 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | + + | aInst = &((int*)buf.p)[3 * (nInst-1)]; aInst[0] = iBest; aInst[1] = FTS5_POS2COLUMN(aIter[iBest].iPos); aInst[2] = FTS5_POS2OFFSET(aIter[iBest].iPos); sqlite3Fts5PoslistReaderNext(&aIter[iBest]); } sqlite3_free(pCsr->aInst); pCsr->aInst = (int*)buf.p; pCsr->nInstCount = nInst; sqlite3_free(aIter); CsrFlagClear(pCsr, FTS5CSR_REQUIRE_INST); } } return rc; } static int fts5ApiInstCount(Fts5Context *pCtx, int *pnInst){ Fts5Cursor *pCsr = (Fts5Cursor*)pCtx; |
︙ |
Changes to ext/fts5/tool/loadfts5.tcl.
︙ | |||
98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | + | } } } set dbfile [lindex $argv end-1] if {$O(delete)} { file delete -force $dbfile } sqlite3 db $dbfile catch { load_static_extension db fts5 } db func loadfile loadfile db transaction { set pref "" if {$O(prefix)!=""} { set pref ", prefix='$O(prefix)'" } catch { db eval "CREATE VIRTUAL TABLE t1 USING $O(vtab) (path, content$O(tok)$pref)" |
︙ |
Changes to ext/fts5/tool/mkfts5c.tcl.
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + | puts -nonewline $G(fd) $G(hdr) } proc fts5c_printfile {zIn} { global G set data [readfile $zIn] set zTail [file tail $zIn] |
︙ |
Changes to ext/fts5/tool/showfts5.tcl.
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + | if {[llength $argv]!=2} usage set database [lindex $argv 0] set tbl [lindex $argv 1] sqlite3 db $database catch { load_static_extension db fts5 } db eval "SELECT fts5_decode(rowid, block) AS d FROM ${tbl}_data WHERE id=10" { foreach lvl [lrange $d 1 end] { puts $lvl } } |
︙ |