Merge updates from trunk.

FossilOrigin-Name: 94877e495c563f101b51cd8891ca7665c7aab87ff526157f1dc1781e0a2a5d87
This commit is contained in:
drh 2018-04-28 11:22:53 +00:00
commit 46462e35d3
7 changed files with 53 additions and 38 deletions

View File

@ -1181,7 +1181,6 @@ static void fts3ExprTestCommon(
int argc,
sqlite3_value **argv
){
sqlite3_tokenizer_module const *pModule = 0;
sqlite3_tokenizer *pTokenizer = 0;
int rc;
char **azCol = 0;
@ -1191,7 +1190,6 @@ static void fts3ExprTestCommon(
int ii;
Fts3Expr *pExpr;
char *zBuf = 0;
sqlite3 *db = sqlite3_context_db_handle(context);
Fts3Hash *pHash = (Fts3Hash*)sqlite3_user_data(context);
const char *zTokenizer = 0;
char *zErr = 0;
@ -1203,7 +1201,7 @@ static void fts3ExprTestCommon(
return;
}
zTokenizer = sqlite3_value_text(argv[0]);
zTokenizer = (const char*)sqlite3_value_text(argv[0]);
rc = sqlite3Fts3InitTokenizer(pHash, zTokenizer, &pTokenizer, &zErr);
if( rc!=SQLITE_OK ){
if( rc==SQLITE_NOMEM ){

View File

@ -1,5 +1,5 @@
C Add\sthe\s"PRAGMA\sreset_database=ON|OFF"\scommand.\s\sWhen\son,\sit\scauses\sthe\ndatabase\sto\sappear\sto\sbe\sempty,\scausing\sthe\snext\stransaction\sto\sreset\sit\sto\nan\sempty\sdatabase.
D 2018-04-28T01:27:09.774
C Merge\supdates\sfrom\strunk.
D 2018-04-28T11:22:53.232
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 5ce9343cba9c189046f1afe6d2bcc1f68079439febc05267b98aec6ecc752439
@ -82,7 +82,7 @@ F ext/fts3/fts3.c b577921c7e56ea27893da06691f15721801375ebd411a0e24ec5f6fec3c572
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h 3378157f383540857a466420b8279626204434c3eb0dc948ad9bcd3991fc41f5
F ext/fts3/fts3_aux.c 9edc3655fcb287f0467d0a4b886a01c6185fe9f1
F ext/fts3/fts3_expr.c 84c827c8adc8d5fffb3cd3632feba543c18e479bc8ae115d555fc641a7436c9d
F ext/fts3/fts3_expr.c 3b1dbceddd8622599f3cc2626897667fe40487aaa1676707d6c37ec5a8422fc1
F ext/fts3/fts3_hash.c 29b986e43f4e9dd40110eafa377dc0d63c422c60
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
F ext/fts3/fts3_icu.c deb46f7020d87ea7a14a433fb7a7f4bef42a9652
@ -444,7 +444,7 @@ F src/date.c ebe1dc7c8a347117bb02570f1a931c62dd78f4a2b1b516f4837d45b7d6426957
F src/dbpage.c 8db4c97f630e7d83f884ea75caf1ffd0988c160e9d530194d93721c80821e0f6
F src/dbstat.c edabb82611143727511a45ca0859b8cd037851ebe756ae3db289859dd18b6f91
F src/delete.c b0f90749e22d5e41a12dbf940f4811138cf97da54b46b737089b93eb64a2896f
F src/expr.c 4a39bc2a9a3d825571519a1910ecfe3d4b6d596e775c9ed7cef7497ea06140ac
F src/expr.c 5c9a6dc7f56d245d7bb82ba36fdba2ca3bdd1881b61ee60293dd98c766742cd9
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c d617daf66b5515e2b42c1405b2b4984c30ca50fb705ab164271a9bf66c69e331
F src/func.c 94f42cba2cc1c34aeaa441022ba0170ec3fec4bba54db4e0ded085c6dc0fdc51
@ -477,7 +477,7 @@ F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
F src/os_unix.c 2b53b0b8ddc580db096252c721729e5f5f2f355b4fc056f8f3fb328aeb3c9e8a
F src/os_win.c eb03c6d52f893bcd7fdd4c6006674c13c1b5e49543fec98d605201af2997171c
F src/os_win.c a8f39484f3b9162250f510bcceb2826638c00847c9c271b770289f672ebe5372
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c 1bb6a57fa0465296a4d6109a1a64610a0e7adde1f3acf3ef539a9d972908ce8f
F src/pager.h c571b064df842ec8f2e90855dead9acf4cbe0d1b2c05afe0ef0d0145f7fd0388
@ -494,7 +494,7 @@ F src/resolve.c 6415381a0e9d22c0e7cba33ca4a53f81474190862f5d4838190f5eb5b0b47bc9
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
F src/select.c daf07d8defce3311f9e69f1280a874d78bc1d16c305f6aa689640f7afa02842f
F src/shell.c.in d63f06c870ec1761ea98bd1cae651ff0ea6beadf8be892105dabd913f94cb3da
F src/sqlite.h.in 8e70752a57597c08f64f3d49fc1fc46926b862d2e23b038b0d23b9cc748d88ea
F src/sqlite.h.in c3b1782d1a290253b37ebc999c42e894ff8aa9f76526b2938df2f8939d20de39
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 83a3c4ce93d650bedfd1aa558cb85a516bd6d094445ee989740827d0d944368d
F src/sqliteInt.h 8ac0138eae10337b745b03dad0124fd63ae911c0503e795729503e7fc6234d57
@ -884,7 +884,7 @@ F test/fts3defer2.test c540f5f5c2840f70c68fd9b597df817ec7170468
F test/fts3defer3.test dd53fc13223c6d8264a98244e9b19abd35ed71cd
F test/fts3drop.test 1b906e293d6773812587b3dc458cb9e8f3f0c297
F test/fts3e.test 1f6c6ac9cc8b772ca256e6b22aaeed50c9350851
F test/fts3expr.test 9466627007804d855bf9df2a0cfb3dac23686fdc
F test/fts3expr.test ebae205a7a89446c32583bcd492dcb817b9f6b31819bb4dde2583bb99c77e526
F test/fts3expr2.test 18da930352e5693eaa163a3eacf96233b7290d1a
F test/fts3expr3.test c4d4a7d6327418428c96e0a3a1137c251b8dfbf8
F test/fts3expr4.test cac5dd815fe6b5921741abdccdde3b7f50b86394de91e13308ee7986859c4a9f
@ -1725,10 +1725,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 576a8f69ae25883f752e58953624e9f7126db998bebaa1f07f7c2ec47aaecabe
R 20267b33ec4093cbd8eada610413a5f9
T *branch * reset-database
T *sym-reset-database *
T -sym-trunk *
P 02e1a13c1f04bb72599b98f51240c78d0d050de264fef5808fd97db3f4c16dac 6e098ee415f1a530e17a942c9ba51d67c25a3ebff6b97377b7858d0b10bcec92
R 64a2fea94a3cb75b3548d8498e78db38
U drh
Z 6b0d829800a54a9640942b2a1f1f52ea
Z 4ef7f8352ba19719f819fb6bff3896fa

View File

@ -1 +1 @@
02e1a13c1f04bb72599b98f51240c78d0d050de264fef5808fd97db3f4c16dac
94877e495c563f101b51cd8891ca7665c7aab87ff526157f1dc1781e0a2a5d87

View File

@ -3551,6 +3551,7 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
return 0;
}
expr_code_doover:
if( pExpr==0 ){
op = TK_NULL;
}else{
@ -4011,7 +4012,8 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
case TK_SPAN:
case TK_COLLATE:
case TK_UPLUS: {
return sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
pExpr = pExpr->pLeft;
goto expr_code_doover;
}
case TK_TRIGGER: {

View File

@ -315,22 +315,6 @@ struct winVfsAppData {
# define SQLITE_WIN32_DBG_BUF_SIZE ((int)(4096-sizeof(DWORD)))
#endif
/*
* The value used with sqlite3_win32_set_directory() to specify that
* the data directory should be changed.
*/
#ifndef SQLITE_WIN32_DATA_DIRECTORY_TYPE
# define SQLITE_WIN32_DATA_DIRECTORY_TYPE (1)
#endif
/*
* The value used with sqlite3_win32_set_directory() to specify that
* the temporary directory should be changed.
*/
#ifndef SQLITE_WIN32_TEMP_DIRECTORY_TYPE
# define SQLITE_WIN32_TEMP_DIRECTORY_TYPE (2)
#endif
/*
* If compiled with SQLITE_WIN32_MALLOC on Windows, we will use the
* various Win32 API heap functions instead of our own.
@ -1933,7 +1917,10 @@ char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
** argument is the name of the directory to use. The return value will be
** SQLITE_OK if successful.
*/
int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
int sqlite3_win32_set_directory(
unsigned long type, /* Identifier for directory being set or reset */
void *zValue /* New value for directory being set or reset */
){
char **ppDirectory = 0;
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
@ -1949,9 +1936,10 @@ int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
);
assert( !ppDirectory || sqlite3MemdebugHasType(*ppDirectory, MEMTYPE_HEAP) );
if( ppDirectory ){
LPCWSTR zStrValue = zValue;
char *zValueUtf8 = 0;
if( zValue && zValue[0] ){
zValueUtf8 = winUnicodeToUtf8(zValue);
if( zStrValue && zStrValue[0] ){
zValueUtf8 = winUnicodeToUtf8(zStrValue);
if ( zValueUtf8==0 ){
return SQLITE_NOMEM_BKPT;
}

View File

@ -5509,6 +5509,36 @@ SQLITE_EXTERN char *sqlite3_temp_directory;
*/
SQLITE_EXTERN char *sqlite3_data_directory;
/*
** CAPI3REF: Win32 Specific Interface
**
** These interfaces are available only on Windows. The
** [sqlite3_win32_set_directory] interface is used to set the value associated
** with the [sqlite3_temp_directory] or [sqlite3_data_directory] variable, to
** zValue, depending on the value of the type parameter. The zValue parameter
** should be NULL to cause the previous value to be freed via [sqlite3_free];
** a non-NULL value will be copied into memory obtained from [sqlite3_malloc]
** prior to being used. The [sqlite3_win32_set_directory] interface returns
** [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported,
** or [SQLITE_NOMEM] if memory could not be allocated. The value of the
** [sqlite3_data_directory] variable is intended to act as a replacement for
** the current directory on the sub-platforms of Win32 where that concept is
** not present, e.g. WinRT and UWP.
*/
int sqlite3_win32_set_directory(
unsigned long type, /* Identifier for directory being set or reset */
void *zValue /* New value for directory being set or reset */
);
/*
** CAPI3REF: Win32 Directory Types
**
** These macros are only available on Windows. They define the allowed values
** for the type argument to the [sqlite3_win32_set_directory] interface.
*/
#define SQLITE_WIN32_DATA_DIRECTORY_TYPE 1
#define SQLITE_WIN32_TEMP_DIRECTORY_TYPE 2
/*
** CAPI3REF: Test For Auto-Commit Mode
** KEYWORDS: {autocommit mode}

View File

@ -409,7 +409,7 @@ do_test fts3expr-5.1 {
} {1 {Usage: fts3_exprtest(tokenizer, expr, col1, ...}}
do_test fts3expr-5.2 {
catchsql { SELECT fts3_exprtest('doesnotexist', 'a b', 'c') }
} {1 {No such tokenizer module}}
} {1 {unknown tokenizer: doesnotexist}}
do_test fts3expr-5.3 {
catchsql { SELECT fts3_exprtest('simple', 'a b OR', 'c') }
} {1 {Error parsing expression}}