Add a comment explaining why fts5 cannot cache "sorter statements".

FossilOrigin-Name: e6af3b7a3cf331210f4c87848e2af007dbd5ef30
This commit is contained in:
dan 2014-07-31 17:53:03 +00:00
parent 937490d4b4
commit 3dbfc8d8e8
3 changed files with 14 additions and 7 deletions

View File

@ -491,6 +491,13 @@ static int fts5CursorFirstSorted(Fts5Table *pTab, Fts5Cursor *pCsr, int bAsc){
memset(pSorter, 0, nByte);
pSorter->nIdx = nPhrase;
/* TODO: It would be better to have some system for reusing statement
** handles here, rather than preparing a new one for each query. But that
** is not possible as SQLite reference counts the virtual table objects.
** And since the statement required here reads from this very virtual
** table, saving it creates a circular reference.
**
** If SQLite a built-in statement cache, this wouldn't be a problem. */
zSql = sqlite3_mprintf("SELECT rowid, %s FROM %Q.%Q ORDER BY +%s %s",
pConfig->zName, pConfig->zDb, pConfig->zName, FTS5_RANK_NAME,
bAsc ? "ASC" : "DESC"

View File

@ -1,5 +1,5 @@
C Add\sfurther\stests\sfor\sthe\sextension\sAPIs\swith\s"ORDER\sBY\srank"\squeries.
D 2014-07-31T11:57:59.052
C Add\sa\scomment\sexplaining\swhy\sfts5\scannot\scache\s"sorter\sstatements".
D 2014-07-31T17:53:03.405
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in b03432313a3aad96c706f8164fb9f5307eaf19f5
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -103,7 +103,7 @@ F ext/fts3/tool/fts3view.c 6cfc5b67a5f0e09c0d698f9fd012c784bfaa9197
F ext/fts3/unicode/CaseFolding.txt 8c678ca52ecc95e16bc7afc2dbf6fc9ffa05db8c
F ext/fts3/unicode/UnicodeData.txt cd07314edb62d49fde34debdaf92fa2aa69011e7
F ext/fts3/unicode/mkunicode.tcl dc6f268eb526710e2c6e496c372471d773d0c368
F ext/fts5/fts5.c b54b776771d1e965bac02bffcf875a0bfc3660db
F ext/fts5/fts5.c aa269bbecf78cdb7aaa9c6dba26f6ee906ceedaf
F ext/fts5/fts5.h 8ace10d5b249a3baa983c79e7a1306d2a79cfd6a
F ext/fts5/fts5Int.h 9a195c1706876c538902f007149b39e982e9da53
F ext/fts5/fts5_aux.c 366057c7186bc3615deb5ecc0ff61de50b6d2dbc
@ -1198,7 +1198,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P f1b4e1a98d49ecaba962beba16f8224175e4ba59
R bf2807e3a776f0c27fe888a62861bcb4
P 37a417d27e4ebafd4783f62728d7467316b75b17
R e0b14b9e45e7f8113c4d7a699a937c5a
U dan
Z 17018f27d9e25b34230168ffaec13df5
Z cd0e862a57439796abd2a3aa1ce5c8f8

View File

@ -1 +1 @@
37a417d27e4ebafd4783f62728d7467316b75b17
e6af3b7a3cf331210f4c87848e2af007dbd5ef30