diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2014-10-16 22:51:35 -0400 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2014-10-16 22:51:35 -0400 |
commit | 569c6676a6ddb0ff73821d7693b5e18ddef809b9 (patch) | |
tree | 833538da7bba39105daff45e265aef386a200acd /ext/misc/amatch.c | |
parent | 08119c361d1181b3e8f1abb429236e488a664753 (diff) |
Imported Upstream version 3.2.0upstream
Diffstat (limited to 'ext/misc/amatch.c')
-rw-r--r-- | ext/misc/amatch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/misc/amatch.c b/ext/misc/amatch.c index b613080..d869dbd 100644 --- a/ext/misc/amatch.c +++ b/ext/misc/amatch.c @@ -786,6 +786,7 @@ static void amatchFree(amatch_vtab *p){ sqlite3_free(p->zVocabTab); sqlite3_free(p->zVocabWord); sqlite3_free(p->zVocabLang); + sqlite3_free(p->zSelf); memset(p, 0, sizeof(*p)); sqlite3_free(p); } @@ -948,6 +949,9 @@ static void amatchClearCursor(amatch_cursor *pCur){ pCur->pAllWords = 0; sqlite3_free(pCur->zInput); pCur->zInput = 0; + sqlite3_free(pCur->zBuf); + pCur->zBuf = 0; + pCur->nBuf = 0; pCur->pCost = 0; pCur->pWord = 0; pCur->pCurrent = 0; @@ -1103,7 +1107,7 @@ static int amatchNext(sqlite3_vtab_cursor *cur){ char *zSql; if( p->zVocabLang && p->zVocabLang[0] ){ zSql = sqlite3_mprintf( - "SELECT \"%s\" FROM \"%s\"", + "SELECT \"%w\" FROM \"%w\"", " WHERE \"%w\">=?1 AND \"%w\"=?2" " ORDER BY 1", p->zVocabWord, p->zVocabTab, @@ -1111,7 +1115,7 @@ static int amatchNext(sqlite3_vtab_cursor *cur){ ); }else{ zSql = sqlite3_mprintf( - "SELECT \"%s\" FROM \"%s\"" + "SELECT \"%w\" FROM \"%w\"" " WHERE \"%w\">=?1" " ORDER BY 1", p->zVocabWord, p->zVocabTab, |