mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Merge recent changes from trunk.
FossilOrigin-Name: 5962921fceaf2ec645379a5f1d18e2c2c13abbf92cf64606caee69f45a21c500
This commit is contained in:
24
manifest
24
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Create\sthe\s"trusted_schema"\spragma.\s\sAdd\ssqlite3_vtab_config()\scalls\sto\sset\nthe\srisk\srank\sfor\smany\svirtual\stables.
|
C Merge\srecent\schanges\sfrom\strunk.
|
||||||
D 2020-01-07T19:45:40.750
|
D 2020-01-08T13:08:52.289
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||||
@@ -469,7 +469,7 @@ F src/auth.c a3d5bfdba83d25abed1013a8c7a5f204e2e29b0c25242a56bc02bb0c07bf1e06
|
|||||||
F src/backup.c f70077d40c08b7787bfe934e4d1da8030cb0cc57d46b345fba2294b7d1be23ab
|
F src/backup.c f70077d40c08b7787bfe934e4d1da8030cb0cc57d46b345fba2294b7d1be23ab
|
||||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||||
F src/btree.c 68dc49062f5ee261b971157e8db2ca4e290555c872c978eadc1b5441a9c58360
|
F src/btree.c d70000b51523138582663b578b7f8a13e5d03c73c7c7ef18fdeafe1c234bbc3c
|
||||||
F src/btree.h 6111552f19ed7a40f029cf4b33badc6fef9880314fffd80a945f0b7f43ab7471
|
F src/btree.h 6111552f19ed7a40f029cf4b33badc6fef9880314fffd80a945f0b7f43ab7471
|
||||||
F src/btreeInt.h 6794084fad08c9750b45145743c0e3e5c27c94dee89f26dd8df7073314934fd2
|
F src/btreeInt.h 6794084fad08c9750b45145743c0e3e5c27c94dee89f26dd8df7073314934fd2
|
||||||
F src/build.c 67b1a8d3ac700747687dbdc49ded847a3c17fef450a8c919ac0399b44cbd4215
|
F src/build.c 67b1a8d3ac700747687dbdc49ded847a3c17fef450a8c919ac0399b44cbd4215
|
||||||
@@ -528,9 +528,9 @@ F src/printf.c 9be6945837c839ba57837b4bc3af349eba630920fa5532aa518816defe42a7d4
|
|||||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||||
F src/resolve.c 894397f372b5c23fb68e0c534d3682f45285f228bb335d713344a7ed37f0ba45
|
F src/resolve.c 894397f372b5c23fb68e0c534d3682f45285f228bb335d713344a7ed37f0ba45
|
||||||
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
|
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
|
||||||
F src/select.c a2be95ccf2f9f98ce3a0b5a0f15200908de4e156802098fedff4f780f04c8b6d
|
F src/select.c fbae5d6db63959aa1ecb34efe93caf5399444ca3c78d6f1ef4620b0ee5c37707
|
||||||
F src/shell.c.in 43d3cfbee97d78ca5782dc53e4c1e22d3cc15c91beff20889dc60551f47eab9f
|
F src/shell.c.in 43d3cfbee97d78ca5782dc53e4c1e22d3cc15c91beff20889dc60551f47eab9f
|
||||||
F src/sqlite.h.in 972e3473e096cd322abe136caa5cc443c94a93a984030aa07824f0410667d04b
|
F src/sqlite.h.in 06452043348e35cf6108345a35574a2faa4d1c2829beefb1e73c73d6bfb2fa80
|
||||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||||
F src/sqlite3ext.h 72af51aa4e912e14cd495fb6e7fac65f0940db80ed950d90911aff292cc47ce2
|
F src/sqlite3ext.h 72af51aa4e912e14cd495fb6e7fac65f0940db80ed950d90911aff292cc47ce2
|
||||||
F src/sqliteInt.h 8c1fcdad7418c87cd482d2868610ed299e0201091e247598495e92e9c5d8e884
|
F src/sqliteInt.h 8c1fcdad7418c87cd482d2868610ed299e0201091e247598495e92e9c5d8e884
|
||||||
@@ -598,9 +598,9 @@ F src/trigger.c a40d50e88bd3355f1d2a73f0a3b2d6b42eae26ca4219001b82ef0d064439badc
|
|||||||
F src/update.c 9ad19af96aff95dc02a923a99f97c1bc0b909009a29a2914b796f786b9ac0c60
|
F src/update.c 9ad19af96aff95dc02a923a99f97c1bc0b909009a29a2914b796f786b9ac0c60
|
||||||
F src/upsert.c 2920de71b20f04fe25eb00b655d086f0ba60ea133c59d7fa3325c49838818e78
|
F src/upsert.c 2920de71b20f04fe25eb00b655d086f0ba60ea133c59d7fa3325c49838818e78
|
||||||
F src/utf.c 736ff76753236ffbc8b5b939f5e0607f28aeaa7c780b3a56b419228f0a81c87b
|
F src/utf.c 736ff76753236ffbc8b5b939f5e0607f28aeaa7c780b3a56b419228f0a81c87b
|
||||||
F src/util.c 2c92bc706bbdb1c45a25180291e7e05a56e297aa5dd7b2bcd2b1c47e8bb05b17
|
F src/util.c e5f3971160154e5c9b660fd119b02ec4890e87cd18a5bc4d45ee60cddbb9e6a2
|
||||||
F src/vacuum.c 82dcec9e7b1afa980288718ad11bc499651c722d7b9f32933c4d694d91cb6ebf
|
F src/vacuum.c 82dcec9e7b1afa980288718ad11bc499651c722d7b9f32933c4d694d91cb6ebf
|
||||||
F src/vdbe.c b557ecd97f5a27e46240d0a6ea886341386689b39c75370f6141bd5e6849c359
|
F src/vdbe.c 35dcc7d43c2635853773d994b052061283a4e5b0e60e799cef83e410d90f3145
|
||||||
F src/vdbe.h defd693289c7bb8d325f109be9490c77138061211a116827da7244b6015a4934
|
F src/vdbe.h defd693289c7bb8d325f109be9490c77138061211a116827da7244b6015a4934
|
||||||
F src/vdbeInt.h 30d3e8b991547cdf39025e416a0a737b0416d46747af70ae058f60e2e0466fe7
|
F src/vdbeInt.h 30d3e8b991547cdf39025e416a0a737b0416d46747af70ae058f60e2e0466fe7
|
||||||
F src/vdbeapi.c 1252d80c548711e47a6d84dae88ed4e95d3fbb4e7bd0eaa1347299af7efddf02
|
F src/vdbeapi.c 1252d80c548711e47a6d84dae88ed4e95d3fbb4e7bd0eaa1347299af7efddf02
|
||||||
@@ -658,7 +658,7 @@ F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b
|
|||||||
F test/async3.test d73a062002376d7edc1fe3edff493edbec1fc2f7
|
F test/async3.test d73a062002376d7edc1fe3edff493edbec1fc2f7
|
||||||
F test/async4.test 1787e3952128aa10238bf39945126de7ca23685a
|
F test/async4.test 1787e3952128aa10238bf39945126de7ca23685a
|
||||||
F test/async5.test 383ab533fdb9f7ad228cc99ee66e1acb34cc0dc0
|
F test/async5.test 383ab533fdb9f7ad228cc99ee66e1acb34cc0dc0
|
||||||
F test/atof1.test ff0b0156fd705b67c506e1f2bfe9e26102bea9bd
|
F test/atof1.test 1ccfc96a6888566597b83d882c81b3c04258dc39317e8c1cec89ba481eaa2fba
|
||||||
F test/atomic.test 065a453dde33c77ff586d91ccaa6ed419829d492dbb1a5694b8a09f3f9d7d061
|
F test/atomic.test 065a453dde33c77ff586d91ccaa6ed419829d492dbb1a5694b8a09f3f9d7d061
|
||||||
F test/atomic2.test b6863b4aa552543874f80b42fb3063f1c8c2e3d8e56b6562f00a3cc347b5c1da
|
F test/atomic2.test b6863b4aa552543874f80b42fb3063f1c8c2e3d8e56b6562f00a3cc347b5c1da
|
||||||
F test/atrc.c ec92d56d8fbed9eb3e11aaf1ab98cf7dd59e69dae31f128013f1d97e54e7dfed
|
F test/atrc.c ec92d56d8fbed9eb3e11aaf1ab98cf7dd59e69dae31f128013f1d97e54e7dfed
|
||||||
@@ -1705,7 +1705,7 @@ F test/whereH.test e4b07f7a3c2f5d31195cd33710054c78667573b2
|
|||||||
F test/whereI.test a2874062140ed4aba9ffae76e6190a3df6fc73d1373fdfa8fd632945082a5364
|
F test/whereI.test a2874062140ed4aba9ffae76e6190a3df6fc73d1373fdfa8fd632945082a5364
|
||||||
F test/whereJ.test 88287550f6ee604422403b053455b1ad894eeaa5c35d348532dfa1439286cb9a
|
F test/whereJ.test 88287550f6ee604422403b053455b1ad894eeaa5c35d348532dfa1439286cb9a
|
||||||
F test/whereK.test f8e3cf26a8513ecc7f514f54df9f0572c046c42b
|
F test/whereK.test f8e3cf26a8513ecc7f514f54df9f0572c046c42b
|
||||||
F test/whereL.test 0a19fc44cd1122040f56c934f1b14d0ca85bde28f270268a428dd9796ea0634c
|
F test/whereL.test 976f100f412ce2f39bf923eb57794cdc39fc0a3fec8fab025d51706a7cc4845b
|
||||||
F test/wherefault.test 1374c3aa198388925246475f84ad4cd5f9528864
|
F test/wherefault.test 1374c3aa198388925246475f84ad4cd5f9528864
|
||||||
F test/wherelfault.test 9012e4ef5259058b771606616bd007af5d154e64cc25fa9fd4170f6411db44e3
|
F test/wherelfault.test 9012e4ef5259058b771606616bd007af5d154e64cc25fa9fd4170f6411db44e3
|
||||||
F test/wherelimit.test 592081800806d297dd7449b1030c863d2883d6d42901837ccd2e5a9bd962edb0
|
F test/wherelimit.test 592081800806d297dd7449b1030c863d2883d6d42901837ccd2e5a9bd962edb0
|
||||||
@@ -1853,7 +1853,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 3d87ff312e617a26846d482b423163cad9c222513f33e128f0fe348dda27c7c9
|
P 4c21373c21c9b17b222ae65297a039a035e6ec6b505c00c33704e3c03f94f834 1c76f1d8ec0937a2d2e4ce75f98494c953e9621db31945d7e44f45d90d1c3892
|
||||||
R 29e3b810eabfd7c3a1417261cbdb8d29
|
R 11f59f8982210d84b12dbd1c2e27ec48
|
||||||
U drh
|
U drh
|
||||||
Z c61c0860fa3c230e549e94e37c114435
|
Z ba42883755b74cbe63cf9689f020b123
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
4c21373c21c9b17b222ae65297a039a035e6ec6b505c00c33704e3c03f94f834
|
5962921fceaf2ec645379a5f1d18e2c2c13abbf92cf64606caee69f45a21c500
|
||||||
@@ -2138,11 +2138,11 @@ static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
|
|||||||
*/
|
*/
|
||||||
static Pgno btreePagecount(BtShared *pBt){
|
static Pgno btreePagecount(BtShared *pBt){
|
||||||
assert( (pBt->nPage & 0x80000000)==0 || CORRUPT_DB );
|
assert( (pBt->nPage & 0x80000000)==0 || CORRUPT_DB );
|
||||||
return pBt->nPage & 0x7fffffff;
|
return pBt->nPage;
|
||||||
}
|
}
|
||||||
u32 sqlite3BtreeLastPage(Btree *p){
|
u32 sqlite3BtreeLastPage(Btree *p){
|
||||||
assert( sqlite3BtreeHoldsMutex(p) );
|
assert( sqlite3BtreeHoldsMutex(p) );
|
||||||
return btreePagecount(p->pBt);
|
return btreePagecount(p->pBt) & 0x7fffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
46
src/select.c
46
src/select.c
@@ -4146,15 +4146,28 @@ struct WhereConst {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** Add a new entry to the pConst object. Except, do not add duplicate
|
** Add a new entry to the pConst object. Except, do not add duplicate
|
||||||
** pColumn entires.
|
** pColumn entires. Also, do not add if doing so would not be appropriate.
|
||||||
|
**
|
||||||
|
** The caller guarantees the pColumn is a column and pValue is a constant.
|
||||||
|
** This routine has to do some additional checks before completing the
|
||||||
|
** insert.
|
||||||
*/
|
*/
|
||||||
static void constInsert(
|
static void constInsert(
|
||||||
WhereConst *pConst, /* The WhereConst into which we are inserting */
|
WhereConst *pConst, /* The WhereConst into which we are inserting */
|
||||||
Expr *pColumn, /* The COLUMN part of the constraint */
|
Expr *pColumn, /* The COLUMN part of the constraint */
|
||||||
Expr *pValue /* The VALUE part of the constraint */
|
Expr *pValue, /* The VALUE part of the constraint */
|
||||||
|
Expr *pExpr /* Overall expression: COLUMN=VALUE or VALUE=COLUMN */
|
||||||
){
|
){
|
||||||
int i;
|
int i;
|
||||||
assert( pColumn->op==TK_COLUMN );
|
assert( pColumn->op==TK_COLUMN );
|
||||||
|
assert( sqlite3ExprIsConstant(pValue) );
|
||||||
|
|
||||||
|
if( !ExprHasProperty(pValue, EP_FixedCol) && sqlite3ExprAffinity(pValue)!=0 ){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr)) ){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* 2018-10-25 ticket [cf5ed20f]
|
/* 2018-10-25 ticket [cf5ed20f]
|
||||||
** Make sure the same pColumn is not inserted more than once */
|
** Make sure the same pColumn is not inserted more than once */
|
||||||
@@ -4174,7 +4187,9 @@ static void constInsert(
|
|||||||
if( pConst->apExpr==0 ){
|
if( pConst->apExpr==0 ){
|
||||||
pConst->nConst = 0;
|
pConst->nConst = 0;
|
||||||
}else{
|
}else{
|
||||||
if( ExprHasProperty(pValue, EP_FixedCol) ) pValue = pValue->pLeft;
|
if( ExprHasProperty(pValue, EP_FixedCol) ){
|
||||||
|
pValue = pValue->pLeft;
|
||||||
|
}
|
||||||
pConst->apExpr[pConst->nConst*2-2] = pColumn;
|
pConst->apExpr[pConst->nConst*2-2] = pColumn;
|
||||||
pConst->apExpr[pConst->nConst*2-1] = pValue;
|
pConst->apExpr[pConst->nConst*2-1] = pValue;
|
||||||
}
|
}
|
||||||
@@ -4200,19 +4215,11 @@ static void findConstInWhere(WhereConst *pConst, Expr *pExpr){
|
|||||||
pLeft = pExpr->pLeft;
|
pLeft = pExpr->pLeft;
|
||||||
assert( pRight!=0 );
|
assert( pRight!=0 );
|
||||||
assert( pLeft!=0 );
|
assert( pLeft!=0 );
|
||||||
if( pRight->op==TK_COLUMN
|
if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pLeft) ){
|
||||||
&& !ExprHasProperty(pRight, EP_FixedCol)
|
constInsert(pConst,pRight,pLeft,pExpr);
|
||||||
&& sqlite3ExprIsConstant(pLeft)
|
}
|
||||||
&& sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr))
|
if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pRight) ){
|
||||||
){
|
constInsert(pConst,pLeft,pRight,pExpr);
|
||||||
constInsert(pConst, pRight, pLeft);
|
|
||||||
}else
|
|
||||||
if( pLeft->op==TK_COLUMN
|
|
||||||
&& !ExprHasProperty(pLeft, EP_FixedCol)
|
|
||||||
&& sqlite3ExprIsConstant(pRight)
|
|
||||||
&& sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr))
|
|
||||||
){
|
|
||||||
constInsert(pConst, pLeft, pRight);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4248,10 +4255,9 @@ static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){
|
|||||||
** The WHERE-clause constant propagation optimization.
|
** The WHERE-clause constant propagation optimization.
|
||||||
**
|
**
|
||||||
** If the WHERE clause contains terms of the form COLUMN=CONSTANT or
|
** If the WHERE clause contains terms of the form COLUMN=CONSTANT or
|
||||||
** CONSTANT=COLUMN that must be tree (in other words, if the terms top-level
|
** CONSTANT=COLUMN that are top-level AND-connected terms that are not
|
||||||
** AND-connected terms that are not part of a ON clause from a LEFT JOIN)
|
** part of a ON clause from a LEFT JOIN, then throughout the query
|
||||||
** then throughout the query replace all other occurrences of COLUMN
|
** replace all other occurrences of COLUMN with CONSTANT.
|
||||||
** with CONSTANT within the WHERE clause.
|
|
||||||
**
|
**
|
||||||
** For example, the query:
|
** For example, the query:
|
||||||
**
|
**
|
||||||
|
|||||||
@@ -5587,7 +5587,7 @@ void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
|||||||
** <li> [SQLITE_UTF16_ALIGNED].
|
** <li> [SQLITE_UTF16_ALIGNED].
|
||||||
** </ul>)^
|
** </ul>)^
|
||||||
** ^The eTextRep argument determines the encoding of strings passed
|
** ^The eTextRep argument determines the encoding of strings passed
|
||||||
** to the collating function callback, xCallback.
|
** to the collating function callback, xCompare.
|
||||||
** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep
|
** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep
|
||||||
** force strings to be UTF16 with native byte order.
|
** force strings to be UTF16 with native byte order.
|
||||||
** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin
|
** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin
|
||||||
@@ -5596,18 +5596,19 @@ void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
|||||||
** ^The fourth argument, pArg, is an application data pointer that is passed
|
** ^The fourth argument, pArg, is an application data pointer that is passed
|
||||||
** through as the first argument to the collating function callback.
|
** through as the first argument to the collating function callback.
|
||||||
**
|
**
|
||||||
** ^The fifth argument, xCallback, is a pointer to the collating function.
|
** ^The fifth argument, xCompare, is a pointer to the collating function.
|
||||||
** ^Multiple collating functions can be registered using the same name but
|
** ^Multiple collating functions can be registered using the same name but
|
||||||
** with different eTextRep parameters and SQLite will use whichever
|
** with different eTextRep parameters and SQLite will use whichever
|
||||||
** function requires the least amount of data transformation.
|
** function requires the least amount of data transformation.
|
||||||
** ^If the xCallback argument is NULL then the collating function is
|
** ^If the xCompare argument is NULL then the collating function is
|
||||||
** deleted. ^When all collating functions having the same name are deleted,
|
** deleted. ^When all collating functions having the same name are deleted,
|
||||||
** that collation is no longer usable.
|
** that collation is no longer usable.
|
||||||
**
|
**
|
||||||
** ^The collating function callback is invoked with a copy of the pArg
|
** ^The collating function callback is invoked with a copy of the pArg
|
||||||
** application data pointer and with two strings in the encoding specified
|
** application data pointer and with two strings in the encoding specified
|
||||||
** by the eTextRep argument. The collating function must return an
|
** by the eTextRep argument. The two integer parameters to the collating
|
||||||
** integer that is negative, zero, or positive
|
** function callback are the length of the two strings, in bytes. The collating
|
||||||
|
** function must return an integer that is negative, zero, or positive
|
||||||
** if the first string is less than, equal to, or greater than the second,
|
** if the first string is less than, equal to, or greater than the second,
|
||||||
** respectively. A collating function must always return the same answer
|
** respectively. A collating function must always return the same answer
|
||||||
** given the same inputs. If two or more collating functions are registered
|
** given the same inputs. If two or more collating functions are registered
|
||||||
|
|||||||
@@ -411,6 +411,7 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
|
|||||||
}else{
|
}else{
|
||||||
int i;
|
int i;
|
||||||
incr = 2;
|
incr = 2;
|
||||||
|
length &= ~1;
|
||||||
assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
|
assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
|
||||||
testcase( enc==SQLITE_UTF16LE );
|
testcase( enc==SQLITE_UTF16LE );
|
||||||
testcase( enc==SQLITE_UTF16BE );
|
testcase( enc==SQLITE_UTF16BE );
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr){
|
|||||||
}else{
|
}else{
|
||||||
c = 's';
|
c = 's';
|
||||||
}
|
}
|
||||||
sqlite3_str_appendf(pStr, "%cx", c);
|
sqlite3_str_appendf(pStr, "%cx[", c);
|
||||||
for(i=0; i<25 && i<pMem->n; i++){
|
for(i=0; i<25 && i<pMem->n; i++){
|
||||||
sqlite3_str_appendf(pStr, "%02X", ((int)pMem->z[i] & 0xFF));
|
sqlite3_str_appendf(pStr, "%02X", ((int)pMem->z[i] & 0xFF));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,5 +56,29 @@ for {set i 1} {$i<20000} {incr i} {
|
|||||||
} {1}
|
} {1}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 2020-01-08 ticket 9eda2697f5cc1aba
|
||||||
|
# When running sqlite3AtoF() on a blob with an odd number of bytes using
|
||||||
|
# UTF16, ignore the last byte so that the string has an integer number of
|
||||||
|
# UTF16 code points.
|
||||||
|
#
|
||||||
|
reset_db
|
||||||
|
do_execsql_test atof1-2.10 {
|
||||||
|
PRAGMA encoding = 'UTF16be';
|
||||||
|
CREATE TABLE t1(a, b);
|
||||||
|
INSERT INTO t1(rowid,a) VALUES (1,x'00'),(2,3);
|
||||||
|
SELECT substr(a,',') is true FROM t1 ORDER BY rowid;
|
||||||
|
} {0 1}
|
||||||
|
do_execsql_test atof1-2.20 {
|
||||||
|
SELECT substr(a,',') is true FROM t1 ORDER BY rowid DESC;
|
||||||
|
} {1 0}
|
||||||
|
do_execsql_test atof1-2.30 {
|
||||||
|
CREATE INDEX i1 ON t1(a);
|
||||||
|
SELECT count(*) FROM t1 WHERE substr(a,',');
|
||||||
|
} {1}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
@@ -122,4 +122,27 @@ do_execsql_test 400 {
|
|||||||
SELECT x.a FROM x JOIN y ON x.c = y.a WHERE x.b = 1 AND x.b = 1;
|
SELECT x.a FROM x JOIN y ON x.c = y.a WHERE x.b = 1 AND x.b = 1;
|
||||||
} {}
|
} {}
|
||||||
|
|
||||||
|
# 2020-01-07: ticket 82ac75ba0093e5dc
|
||||||
|
# Incorrect join result due to mishandling of affinity in constant
|
||||||
|
# propagation.
|
||||||
|
#
|
||||||
|
reset_db
|
||||||
|
do_execsql_test 500 {
|
||||||
|
PRAGMA automatic_index=OFF;
|
||||||
|
CREATE TABLE t0(c0);
|
||||||
|
INSERT INTO t0 VALUES('0');
|
||||||
|
CREATE VIEW v0(c0) AS SELECT CAST(0 AS INT) FROM t0;
|
||||||
|
SELECT 200, * FROM t0, v0 WHERE 0 = t0.c0 AND t0.c0 = v0.c0;
|
||||||
|
} {}
|
||||||
|
do_execsql_test 510 {
|
||||||
|
SELECT 200, * FROM t0, v0 WHERE t0.c0 = 0 AND t0.c0 = v0.c0;
|
||||||
|
} {}
|
||||||
|
do_execsql_test 520 {
|
||||||
|
SELECT 200, * FROM t0, v0 WHERE 0 = t0.c0 AND v0.c0 = t0.c0;
|
||||||
|
} {}
|
||||||
|
do_execsql_test 530 {
|
||||||
|
SELECT 200, * FROM t0, v0 WHERE t0.c0 = 0 AND v0.c0 = t0.c0;
|
||||||
|
} {}
|
||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
Reference in New Issue
Block a user