Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ab947d

Browse files
Add SQLite 3.38.4 sources
1 parent 9db08af commit 7ab947d

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

shell.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14430,6 +14430,8 @@ static void exec_prepared_stmt_columnar(
1443014430
int bNextLine = 0;
1443114431
int bMultiLineRowExists = 0;
1443214432
int bw = p->cmOpts.bWordWrap;
14433+
const char *zEmpty = "";
14434+
const char *zShowNull = p->nullValue;
1443314435

1443414436
rc = sqlite3_step(pStmt);
1443514437
if( rc!=SQLITE_ROW ) return;
@@ -14491,12 +14493,14 @@ static void exec_prepared_stmt_columnar(
1449114493
if( wx<0 ) wx = -wx;
1449214494
if( useNextLine ){
1449314495
uz = azNextLine[i];
14496+
if( uz==0 ) uz = (u8*)zEmpty;
1449414497
}else if( p->cmOpts.bQuote ){
1449514498
sqlite3_free(azQuoted[i]);
1449614499
azQuoted[i] = quoted_column(pStmt,i);
1449714500
uz = (const unsigned char*)azQuoted[i];
1449814501
}else{
1449914502
uz = (const unsigned char*)sqlite3_column_text(pStmt,i);
14503+
if( uz==0 ) uz = (u8*)zShowNull;
1450014504
}
1450114505
azData[nRow*nColumn + i]
1450214506
= translateForDisplayAndDup(uz, &azNextLine[i], wx, bw);
@@ -14510,7 +14514,7 @@ static void exec_prepared_stmt_columnar(
1451014514
nTotal = nColumn*(nRow+1);
1451114515
for(i=0; i<nTotal; i++){
1451214516
z = azData[i];
14513-
if( z==0 ) z = p->nullValue;
14517+
if( z==0 ) z = (char*)zEmpty;
1451414518
n = strlenChar(z);
1451514519
j = i%nColumn;
1451614520
if( n>p->actualWidth[j] ) p->actualWidth[j] = n;
@@ -14614,7 +14618,10 @@ static void exec_prepared_stmt_columnar(
1461414618
utf8_printf(p->out, "Interrupt\n");
1461514619
}
1461614620
nData = (nRow+1)*nColumn;
14617-
for(i=0; i<nData; i++) free(azData[i]);
14621+
for(i=0; i<nData; i++){
14622+
z = azData[i];
14623+
if( z!=zEmpty && z!=zShowNull ) sqlite3_free(azData[i]);
14624+
}
1461814625
sqlite3_free(azData);
1461914626
sqlite3_free((void*)azNextLine);
1462014627
sqlite3_free(abRowDiv);
@@ -19040,12 +19047,12 @@ SELECT\
1904019047
','||iif((cpos-1)%4>0, ' ', x'0a'||' '))\
1904119048
||')' AS ColsSpec \
1904219049
FROM (\
19043-
SELECT cpos, printf('\"%w\"',printf('%.*s%s', nlen-chop,name,suff)) AS cname \
19050+
SELECT cpos, printf('\"%w\"',printf('%!.*s%s', nlen-chop,name,suff)) AS cname \
1904419051
FROM ColNames ORDER BY cpos\
1904519052
)";
1904619053
static const char * const zRenamesDone =
1904719054
"SELECT group_concat("
19048-
" printf('\"%w\" to \"%w\"',name,printf('%.*s%s', nlen-chop, name, suff)),"
19055+
" printf('\"%w\" to \"%w\"',name,printf('%!.*s%s', nlen-chop, name, suff)),"
1904919056
" ','||x'0a')"
1905019057
"FROM ColNames WHERE suff<>'' OR chop!=0"
1905119058
;

sqlite3.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3-
** version 3.38.3. By combining all the individual C code files into this
3+
** version 3.38.4. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
@@ -452,9 +452,9 @@ extern "C" {
452452
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
453453
** [sqlite_version()] and [sqlite_source_id()].
454454
*/
455-
#define SQLITE_VERSION "3.38.3"
456-
#define SQLITE_VERSION_NUMBER 3038003
457-
#define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4"
455+
#define SQLITE_VERSION "3.38.4"
456+
#define SQLITE_VERSION_NUMBER 3038004
457+
#define SQLITE_SOURCE_ID "2022-05-04 15:45:55 d402f49871152670a62f4f28cacb15d814f2c1644e9347ad7d258e562978e45e"
458458

459459
/*
460460
** CAPI3REF: Run-Time Library Version Numbers
@@ -88387,6 +88387,8 @@ case OP_Gosub: { /* jump */
8838788387
/* Most jump operations do a goto to this spot in order to update
8838888388
** the pOp pointer. */
8838988389
jump_to_p2:
88390+
assert( pOp->p2>0 ); /* There are never any jumps to instruction 0 */
88391+
assert( pOp->p2<p->nOp ); /* Jumps must be in range */
8839088392
pOp = &aOp[pOp->p2 - 1];
8839188393
break;
8839288394
}
@@ -148718,6 +148720,7 @@ static void preserveExpr(IdxExprTrans *pTrans, Expr *pExpr){
148718148720
static int whereIndexExprTransNode(Walker *p, Expr *pExpr){
148719148721
IdxExprTrans *pX = p->u.pIdxTrans;
148720148722
if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
148723+
pExpr = sqlite3ExprSkipCollate(pExpr);
148721148724
preserveExpr(pX, pExpr);
148722148725
pExpr->affExpr = sqlite3ExprAffinity(pExpr);
148723148726
pExpr->op = TK_COLUMN;
@@ -148877,6 +148880,8 @@ static SQLITE_NOINLINE void filterPullDown(
148877148880
/* ,--- Because sqlite3ConstructBloomFilter() has will not have set
148878148881
** vvvvv--' pLevel->regFilter if this were true. */
148879148882
if( NEVER(pLoop->prereq & notReady) ) continue;
148883+
assert( pLevel->addrBrk==0 );
148884+
pLevel->addrBrk = addrNxt;
148880148885
if( pLoop->wsFlags & WHERE_IPK ){
148881148886
WhereTerm *pTerm = pLoop->aLTerm[0];
148882148887
int regRowid;
@@ -148903,6 +148908,7 @@ static SQLITE_NOINLINE void filterPullDown(
148903148908
VdbeCoverage(pParse->pVdbe);
148904148909
}
148905148910
pLevel->regFilter = 0;
148911+
pLevel->addrBrk = 0;
148906148912
}
148907148913
}
148908148914

@@ -234497,7 +234503,7 @@ static void fts5SourceIdFunc(
234497234503
){
234498234504
assert( nArg==0 );
234499234505
UNUSED_PARAM2(nArg, apUnused);
234500-
sqlite3_result_text(pCtx, "fts5: 2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4", -1, SQLITE_TRANSIENT);
234506+
sqlite3_result_text(pCtx, "fts5: 2022-05-04 15:45:55 d402f49871152670a62f4f28cacb15d814f2c1644e9347ad7d258e562978e45e", -1, SQLITE_TRANSIENT);
234501234507
}
234502234508

234503234509
/*

sqlite3.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ extern "C" {
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149-
#define SQLITE_VERSION "3.38.3"
150-
#define SQLITE_VERSION_NUMBER 3038003
151-
#define SQLITE_SOURCE_ID "2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4"
149+
#define SQLITE_VERSION "3.38.4"
150+
#define SQLITE_VERSION_NUMBER 3038004
151+
#define SQLITE_SOURCE_ID "2022-05-04 15:45:55 d402f49871152670a62f4f28cacb15d814f2c1644e9347ad7d258e562978e45e"
152152

153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers

0 commit comments

Comments
 (0)