Fix a problem in the encoding display in the updated PRAGMA function_list.

FossilOrigin-Name: 318ff7720bc60c30c0826becce424226e9cec25c1d59cb2cdb75793739322760
This commit is contained in:
drh 2020-01-09 16:28:50 +00:00
parent 51ebd5fa14
commit b84fda37ef
3 changed files with 14 additions and 16 deletions

View File

@ -1,5 +1,5 @@
C Fix\sminor\stypos\sin\sthe\strusted-schema.md\sdocument.
D 2020-01-09T16:00:08.934
C Fix\sa\sproblem\sin\sthe\sencoding\sdisplay\sin\sthe\supdated\sPRAGMA\sfunction_list.
D 2020-01-09T16:28:50.025
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -523,7 +523,7 @@ F src/parse.y c8d2de64db469fd56e0fa24da46cd8ec8523eb98626567d2708df371b47fdc3f
F src/pcache.c 385ff064bca69789d199a98e2169445dc16e4291fa807babd61d4890c3b34177
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
F src/pcache1.c 6596e10baf3d8f84cc1585d226cf1ab26564a5f5caf85a15757a281ff977d51a
F src/pragma.c 6e13c9a885c0f2effaa6a1155b707d3d3e39bc572c3b003ce4caa9c2e9010ca3
F src/pragma.c 9145cc0d7309b49d383fe15deca9ab592830b8b532e7fb25e9e36b6f470cbf66
F src/pragma.h 9f86a3a3a0099e651189521c8ad03768df598974e7bbdc21c7f9bb6125592fbd
F src/prepare.c 6049beb71385f017af6fc320d2c75a4e50b75e280c54232442b785fbb83df057
F src/printf.c 9be6945837c839ba57837b4bc3af349eba630920fa5532aa518816defe42a7d4
@ -1856,7 +1856,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 55553b5e5ece8282f6a56a6f5c71024eaaef3c86ec42203af3da708b0de3643b
R 36e30271b935c30d68186edc80f5a0f4
P 87aea3ab1cdda4533e6fed605d1295e83bae0bbb9e1b238d239ce158a0d42954
R a31dc2f4e3da7f138cd2121d67c1c563
U drh
Z e885b154077129671d15d2a44722704d
Z c76fa612566520f9cb4a404bd0c06588

View File

@ -1 +1 @@
87aea3ab1cdda4533e6fed605d1295e83bae0bbb9e1b238d239ce158a0d42954
318ff7720bc60c30c0826becce424226e9cec25c1d59cb2cdb75793739322760

View File

@ -307,7 +307,6 @@ static void pragmaFunclistLine(
){
for(; p; p=p->pNext){
const char *zType;
const char *zEnc;
static const u32 mask =
SQLITE_DETERMINISTIC |
SQLITE_DIRECTONLY |
@ -315,6 +314,12 @@ static void pragmaFunclistLine(
SQLITE_INNOCUOUS |
SQLITE_FUNC_INTERNAL
;
static const char *azEnc[] = { 0, "utf8", "utf16le", "utf16be" };
assert( SQLITE_FUNC_ENCMASK==0x3 );
assert( strcmp(azEnc[SQLITE_UTF8],"utf8")==0 );
assert( strcmp(azEnc[SQLITE_UTF16LE],"utf16le")==0 );
assert( strcmp(azEnc[SQLITE_UTF16BE],"utf16be")==0 );
if( p->xSFunc==0 ) continue;
if( (p->funcFlags & SQLITE_FUNC_INTERNAL)!=0
@ -329,16 +334,9 @@ static void pragmaFunclistLine(
}else{
zType = "s";
}
if( p->funcFlags & SQLITE_UTF8 ){
zEnc = "utf8";
}else if( p->funcFlags & SQLITE_UTF16BE ){
zEnc = "utf16be";
}else{
zEnc = "utf16le";
}
sqlite3VdbeMultiLoad(v, 1, "sissii",
p->zName, isBuiltin,
zType, zEnc,
zType, azEnc[p->funcFlags&SQLITE_FUNC_ENCMASK],
p->nArg,
(p->funcFlags & mask) ^ SQLITE_INNOCUOUS
);