Skip to content

Commit

Permalink
Prepare release of version 1.5.5
Browse files Browse the repository at this point in the history
- Based on SQLite version 3.40.1
  • Loading branch information
utelle committed Dec 28, 2022
1 parent e623ed2 commit 2ec690b
Show file tree
Hide file tree
Showing 9 changed files with 310 additions and 105 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dnl Copyright (C) 2019-2022 Ulrich Telle <ulrich@telle-online.de>
dnl
dnl This file is covered by the same licence as the entire SQLite3 Multiple Ciphers package.

AC_INIT([sqlite3mc], [1.5.4], [ulrich@telle-online.de])
AC_INIT([sqlite3mc], [1.5.5], [ulrich@telle-online.de])

dnl This is the version tested with, might work with earlier ones.
AC_PREREQ([2.69])
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The code was mainly developed under Windows, but was tested under Linux as well.

## Version history

* 1.5.5 - *December 2022*
- Based on SQLite version 3.40.1
* 1.5.4 - *November 2022*
- Based on SQLite version 3.40.0
* 1.5.3 - *September 2022*
Expand Down
8 changes: 4 additions & 4 deletions src/regexp.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static unsigned re_next_char(ReInput *p){
c = (c&0x0f)<<12 | ((p->z[p->i]&0x3f)<<6) | (p->z[p->i+1]&0x3f);
p->i += 2;
if( c<=0x7ff || (c>=0xd800 && c<=0xdfff) ) c = 0xfffd;
}else if( (c&0xf8)==0xf0 && p->i+3<p->mx && (p->z[p->i]&0xc0)==0x80
}else if( (c&0xf8)==0xf0 && p->i+2<p->mx && (p->z[p->i]&0xc0)==0x80
&& (p->z[p->i+1]&0xc0)==0x80 && (p->z[p->i+2]&0xc0)==0x80 ){
c = (c&0x07)<<18 | ((p->z[p->i]&0x3f)<<12) | ((p->z[p->i+1]&0x3f)<<6)
| (p->z[p->i+2]&0x3f);
Expand Down Expand Up @@ -712,15 +712,15 @@ static const char *re_compile(ReCompiled **ppRe, const char *zIn, int noCase){
** one or more matching characters, enter those matching characters into
** zInit[]. The re_match() routine can then search ahead in the input
** string looking for the initial match without having to run the whole
** regex engine over the string. Do not worry able trying to match
** regex engine over the string. Do not worry about trying to match
** unicode characters beyond plane 0 - those are very rare and this is
** just an optimization. */
if( pRe->aOp[0]==RE_OP_ANYSTAR && !noCase ){
for(j=0, i=1; j<(int)sizeof(pRe->zInit)-2 && pRe->aOp[i]==RE_OP_MATCH; i++){
unsigned x = pRe->aArg[i];
if( x<=127 ){
if( x<=0x7f ){
pRe->zInit[j++] = (unsigned char)x;
}else if( x<=0xfff ){
}else if( x<=0x7ff ){
pRe->zInit[j++] = (unsigned char)(0xc0 | (x>>6));
pRe->zInit[j++] = 0x80 | (x&0x3f);
}else if( x<=0xffff ){
Expand Down
2 changes: 1 addition & 1 deletion src/rekeyvacuum.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
**
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.40.0 amalgamation.
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.40.1 amalgamation.
*/
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
char **pzErrMsg, /* Write error message here */
Expand Down
20 changes: 12 additions & 8 deletions src/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -3938,7 +3938,7 @@ static unsigned re_next_char(ReInput *p){
c = (c&0x0f)<<12 | ((p->z[p->i]&0x3f)<<6) | (p->z[p->i+1]&0x3f);
p->i += 2;
if( c<=0x7ff || (c>=0xd800 && c<=0xdfff) ) c = 0xfffd;
}else if( (c&0xf8)==0xf0 && p->i+3<p->mx && (p->z[p->i]&0xc0)==0x80
}else if( (c&0xf8)==0xf0 && p->i+2<p->mx && (p->z[p->i]&0xc0)==0x80
&& (p->z[p->i+1]&0xc0)==0x80 && (p->z[p->i+2]&0xc0)==0x80 ){
c = (c&0x07)<<18 | ((p->z[p->i]&0x3f)<<12) | ((p->z[p->i+1]&0x3f)<<6)
| (p->z[p->i+2]&0x3f);
Expand Down Expand Up @@ -4465,15 +4465,15 @@ static const char *re_compile(ReCompiled **ppRe, const char *zIn, int noCase){
** one or more matching characters, enter those matching characters into
** zInit[]. The re_match() routine can then search ahead in the input
** string looking for the initial match without having to run the whole
** regex engine over the string. Do not worry able trying to match
** regex engine over the string. Do not worry about trying to match
** unicode characters beyond plane 0 - those are very rare and this is
** just an optimization. */
if( pRe->aOp[0]==RE_OP_ANYSTAR && !noCase ){
for(j=0, i=1; j<(int)sizeof(pRe->zInit)-2 && pRe->aOp[i]==RE_OP_MATCH; i++){
unsigned x = pRe->aArg[i];
if( x<=127 ){
if( x<=0x7f ){
pRe->zInit[j++] = (unsigned char)x;
}else if( x<=0xfff ){
}else if( x<=0x7ff ){
pRe->zInit[j++] = (unsigned char)(0xc0 | (x>>6));
pRe->zInit[j++] = 0x80 | (x&0x3f);
}else if( x<=0xffff ){
Expand Down Expand Up @@ -14637,6 +14637,7 @@ static void recoverFinalCleanup(sqlite3_recover *p){
p->pTblList = 0;
sqlite3_finalize(p->pGetPage);
p->pGetPage = 0;
sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);

{
#ifndef NDEBUG
Expand Down Expand Up @@ -14935,6 +14936,7 @@ static int recoverVfsRead(sqlite3_file *pFd, void *aBuf, int nByte, i64 iOff){
**
** + first freelist page (32-bits at offset 32)
** + size of freelist (32-bits at offset 36)
** + the wal-mode flags (16-bits at offset 18)
**
** We also try to preserve the auto-vacuum, incr-value, user-version
** and application-id fields - all 32 bit quantities at offsets
Expand Down Expand Up @@ -14998,7 +15000,8 @@ static int recoverVfsRead(sqlite3_file *pFd, void *aBuf, int nByte, i64 iOff){
if( p->pPage1Cache ){
p->pPage1Disk = &p->pPage1Cache[nByte];
memcpy(p->pPage1Disk, aBuf, nByte);

aHdr[18] = a[18];
aHdr[19] = a[19];
recoverPutU32(&aHdr[28], dbsz);
recoverPutU32(&aHdr[56], enc);
recoverPutU16(&aHdr[105], pgsz-nReserve);
Expand Down Expand Up @@ -15194,6 +15197,7 @@ static void recoverStep(sqlite3_recover *p){
recoverOpenOutput(p);

/* Open transactions on both the input and output databases. */
sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_RESET_CACHE, 0);
recoverExec(p, p->dbIn, "PRAGMA writable_schema = on");
recoverExec(p, p->dbIn, "BEGIN");
if( p->errCode==SQLITE_OK ) p->bCloseTransaction = 1;
Expand Down Expand Up @@ -16283,7 +16287,7 @@ static int safeModeAuth(
"zipfile",
"zipfile_cds",
};
UNUSED_PARAMETER(zA2);
UNUSED_PARAMETER(zA1);
UNUSED_PARAMETER(zA3);
UNUSED_PARAMETER(zA4);
switch( op ){
Expand All @@ -16298,7 +16302,7 @@ static int safeModeAuth(
case SQLITE_FUNCTION: {
int i;
for(i=0; i<ArraySize(azProhibitedFunctions); i++){
if( sqlite3_stricmp(zA1, azProhibitedFunctions[i])==0 ){
if( sqlite3_stricmp(zA2, azProhibitedFunctions[i])==0 ){
failIfSafeMode(p, "cannot use the %s() function in safe mode",
azProhibitedFunctions[i]);
}
Expand Down Expand Up @@ -26140,7 +26144,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
if( pVfs ){
sqlite3_vfs_register(pVfs, 1);
}else{
utf8_printf(stderr, "no such VFS: \"%s\"\n", argv[i]);
utf8_printf(stderr, "no such VFS: \"%s\"\n", zVfs);
exit(1);
}
}
Expand Down
Loading

0 comments on commit 2ec690b

Please sign in to comment.