Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix fts handling of the case where both a rowid and docid are specified as part of an insert statement. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | fts-languageid-bits |
Files: | files | file ages | folders |
SHA1: |
610e7e9612abcbd072a42ab83bd75148 |
User & Date: | dan 2013-06-20 11:01:33.052 |
Context
2013-06-20
| ||
11:48 | Add tests (and a fix) for large and small fts docid values with various languageid_bits settings. (check-in: 8dc261b765 user: dan tags: fts-languageid-bits) | |
11:01 | Fix fts handling of the case where both a rowid and docid are specified as part of an insert statement. (check-in: 610e7e9612 user: dan tags: fts-languageid-bits) | |
2013-06-19
| ||
20:13 | Add the languageid_bits= option to fts. Still some problems to work out. (check-in: d36d7e6833 user: dan tags: fts-languageid-bits) | |
Changes
Changes to ext/fts3/fts3_write.c.
︙ | ︙ | |||
999 1000 1001 1002 1003 1004 1005 | */ assert( p->nLanguageidBits==0 || piRowid==0 || sqlite3_value_type(apVal[1])!=SQLITE_NULL ); if( piRowid && p->nLanguageidBits==0 && SQLITE_NULL!=sqlite3_value_type(apVal[3+p->nColumn]) ){ | < < < < < < | 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 | */ assert( p->nLanguageidBits==0 || piRowid==0 || sqlite3_value_type(apVal[1])!=SQLITE_NULL ); if( piRowid && p->nLanguageidBits==0 && SQLITE_NULL!=sqlite3_value_type(apVal[3+p->nColumn]) ){ rc = sqlite3_bind_value(pContentInsert, 1, apVal[3+p->nColumn]); if( rc!=SQLITE_OK ) return rc; } /* Execute the statement to insert the record. Set *pRowid to the ** new docid value. */ |
︙ | ︙ | |||
5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 | sqlite3_value *pNewDocid = apVal[3+p->nColumn]; if( sqlite3_value_type(pNewDocid)==SQLITE_NULL ){ if( p->nLanguageidBits ){ rc = SQLITE_CONSTRAINT; goto update_out; } pNewDocid = apVal[1]; } if( sqlite3_value_type(pNewDocid)!=SQLITE_NULL ){ int e = sqlite3_value_numeric_type(pNewDocid); i64 iRowid = sqlite3_value_int64(pNewDocid); /* Check that the value specified by the user may be losslessly | > > > > > | 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 | sqlite3_value *pNewDocid = apVal[3+p->nColumn]; if( sqlite3_value_type(pNewDocid)==SQLITE_NULL ){ if( p->nLanguageidBits ){ rc = SQLITE_CONSTRAINT; goto update_out; } pNewDocid = apVal[1]; }else if( sqlite3_value_type(apVal[0])==SQLITE_NULL && sqlite3_value_type(apVal[1])!=SQLITE_NULL ){ rc = SQLITE_ERROR; goto update_out; } if( sqlite3_value_type(pNewDocid)!=SQLITE_NULL ){ int e = sqlite3_value_numeric_type(pNewDocid); i64 iRowid = sqlite3_value_int64(pNewDocid); /* Check that the value specified by the user may be losslessly |
︙ | ︙ |
Changes to test/fts4langid2.test.
︙ | ︙ | |||
119 120 121 122 123 124 125 | SELECT docid, lid, content FROM t1 WHERE t1 MATCH '2'; } {1 0 {1 2 3}} do_execsql_test 4.5 { SELECT docid, lid, content FROM t1 WHERE t1 MATCH '2' AND lid=1; } {1 1 {1 2 3 4}} | < | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | SELECT docid, lid, content FROM t1 WHERE t1 MATCH '2'; } {1 0 {1 2 3}} do_execsql_test 4.5 { SELECT docid, lid, content FROM t1 WHERE t1 MATCH '2' AND lid=1; } {1 1 {1 2 3 4}} do_execsql_test 4.6 { UPDATE t1 SET content = 'x y z' || lid; SELECT docid, lid FROM t1; } {1 0 1 1} finish_test |
︙ | ︙ |