Skip to content

Commit

Permalink
Prepare release of wxSQLite3 4.6.6
Browse files Browse the repository at this point in the history
Upgrade to SQLite3 Multiple Ciphers version 1.2.1 (SQLite version 3.35.1)
  • Loading branch information
utelle committed Mar 16, 2021
1 parent 5df7fa4 commit 491387f
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 36 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) 2017-2020 Ulrich Telle <[email protected]>, Vadim Zeitlin
dnl
dnl This file is covered by the same licence as the entire wxSQLite3 package.

AC_INIT([wxsqlite3], [4.6.5], [[email protected]])
AC_INIT([wxsqlite3], [4.6.6], [[email protected]])

dnl This is the version tested with, might work with earlier ones.
AC_PREREQ([2.69])
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = wxSQLite3
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 4.6.5
PROJECT_NUMBER = 4.6.6

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
4 changes: 2 additions & 2 deletions include/wx/wxsqlite3_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#define WXSQLITE3_MAJOR_VERSION 4
#define WXSQLITE3_MINOR_VERSION 6
#define WXSQLITE3_RELEASE_NUMBER 5
#define WXSQLITE3_RELEASE_NUMBER 6
#define WXSQLITE3_SUBRELEASE_NUMBER 0
#define WXSQLITE3_VERSION_STRING "wxSQLite3 4.6.5"
#define WXSQLITE3_VERSION_STRING "wxSQLite3 4.6.6"

#endif // WXSQLITE3_VERSION_H_
5 changes: 5 additions & 0 deletions include/wx/wxsqlite3def.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
<dl>
<dt><b>4.6.6</b> - <i>March 2021</i></dt>
<dd>
Upgrade to <i>SQLite3 Multiple Ciphers version 1.2.1 (SQLite version 3.35.1)</i><br>
</dd>
<dt><b>4.6.5</b> - <i>March 2021</i></dt>
<dd>
Upgrade to <i>SQLite3 Multiple Ciphers version 1.2.0 (SQLite version 3.35.0)</i><br>
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Since August 2020 a new implementation of an encryption extension, capable of su

## <a name="history"></a>Version history

* 4.6.6 - *March 2021*
- Upgrade to SQLite3 Multiple Ciphers version 1.2.1 (SQLite version 3.35.1)
* 4.6.5 - *March 2021*
- Upgrade to SQLite3 Multiple Ciphers version 1.2.0 (SQLite version 3.35.0)
- Enabled new SQLite Math Extension
Expand Down
77 changes: 48 additions & 29 deletions src/sqlite3mc_amalgamation.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extern LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
/*** Begin of #include "sqlite3patched.c" ***/
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.35.0. By combining all the individual C code files into this
** version 3.35.1. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
Expand Down Expand Up @@ -1255,9 +1255,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.35.0"
#define SQLITE_VERSION_NUMBER 3035000
#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
#define SQLITE_VERSION "3.35.1"
#define SQLITE_VERSION_NUMBER 3035001
#define SQLITE_SOURCE_ID "2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98def66a"

/*
** CAPI3REF: Run-Time Library Version Numbers
Expand Down Expand Up @@ -17081,7 +17081,10 @@ struct sqlite3 {
unsigned orphanTrigger : 1; /* Last statement is orphaned TEMP trigger */
unsigned imposterTable : 1; /* Building an imposter table */
unsigned reopenMemdb : 1; /* ATTACH is really a reopen using MemDB */
unsigned bDropColumn : 1; /* Doing schema check after DROP COLUMN */
char **azInit; /* "type", "name", and "tbl_name" columns */
/* or if bDropColumn, then azInit[0] is the */
/* name of the column being dropped */
} init;
int nVdbeActive; /* Number of VDBEs currently running */
int nVdbeRead; /* Number of active VDBEs that read or write */
Expand Down Expand Up @@ -99241,6 +99244,7 @@ static int lookupName(
assert( pExpr->op==TK_ID );
if( ExprHasProperty(pExpr,EP_DblQuoted)
&& areDoubleQuotedStringsEnabled(db, pTopNC)
&& (db->init.bDropColumn==0 || sqlite3StrICmp(zCol, db->init.azInit[0])!=0)
){
/* If a double-quoted identifier does not match any known column name,
** then treat it as a string.
Expand All @@ -99255,6 +99259,11 @@ static int lookupName(
** Someday, I hope to get rid of this hack. Unfortunately there is
** a huge amount of legacy SQL that uses it. So for now, we just
** issue a warning.
**
** 2021-03-15: ticket 1c24a659e6d7f3a1
** Do not do the ID-to-STRING conversion when doing the schema
** sanity check following a DROP COLUMN if the identifer name matches
** the name of the column being dropped.
*/
sqlite3_log(SQLITE_WARNING,
"double-quoted string literal: \"%w\"", zCol);
Expand Down Expand Up @@ -106854,17 +106863,18 @@ static void renameTestSchema(
Parse *pParse, /* Parse context */
const char *zDb, /* Name of db to verify schema of */
int bTemp, /* True if this is the temp db */
const char *zWhen /* "when" part of error message */
const char *zWhen, /* "when" part of error message */
const char *zDropColumn /* Name of column being dropped */
){
pParse->colNamesSet = 1;
sqlite3NestedParse(pParse,
"SELECT 1 "
"FROM \"%w\"." DFLT_SCHEMA_TABLE " "
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
" AND sql NOT LIKE 'create virtual%%'"
" AND sqlite_rename_test(%Q, sql, type, name, %d, %Q)=NULL ",
" AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %Q)=NULL ",
zDb,
zDb, bTemp, zWhen
zDb, bTemp, zWhen, zDropColumn
);

if( bTemp==0 ){
Expand All @@ -106873,8 +106883,8 @@ static void renameTestSchema(
"FROM temp." DFLT_SCHEMA_TABLE " "
"WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X'"
" AND sql NOT LIKE 'create virtual%%'"
" AND sqlite_rename_test(%Q, sql, type, name, 1, %Q)=NULL ",
zDb, zWhen
" AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %Q)=NULL ",
zDb, zWhen, zDropColumn
);
}
}
Expand Down Expand Up @@ -107037,7 +107047,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameTable(
"sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), "
"tbl_name = "
"CASE WHEN tbl_name=%Q COLLATE nocase AND "
" sqlite_rename_test(%Q, sql, type, name, 1, 'after rename') "
" sqlite_rename_test(%Q, sql, type, name, 1, 'after rename',0) "
"THEN %Q ELSE tbl_name END "
"WHERE type IN ('view', 'trigger')"
, zDb, zTabName, zName, zTabName, zDb, zName);
Expand All @@ -107057,7 +107067,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameTable(
#endif

renameReloadSchema(pParse, iDb, INITFLAG_AlterRename);
renameTestSchema(pParse, zDb, iDb==1, "after rename");
renameTestSchema(pParse, zDb, iDb==1, "after rename", 0);

exit_rename_table:
sqlite3SrcListDelete(db, pSrc);
Expand Down Expand Up @@ -107425,7 +107435,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameColumn(

/* Drop and reload the database schema. */
renameReloadSchema(pParse, iSchema, INITFLAG_AlterRename);
renameTestSchema(pParse, zDb, iSchema==1, "after rename");
renameTestSchema(pParse, zDb, iSchema==1, "after rename", 0);

exit_rename_column:
sqlite3SrcListDelete(db, pSrc);
Expand Down Expand Up @@ -107849,12 +107859,17 @@ static int renameParseSql(
const char *zDb, /* Name of schema SQL belongs to */
sqlite3 *db, /* Database handle */
const char *zSql, /* SQL to parse */
int bTemp /* True if SQL is from temp schema */
int bTemp, /* True if SQL is from temp schema */
const char *zDropColumn /* Name of column being dropped */
){
int rc;
char *zErr = 0;

db->init.iDb = bTemp ? 1 : sqlite3FindDbName(db, zDb);
if( zDropColumn ){
db->init.bDropColumn = 1;
db->init.azInit = (char**)&zDropColumn;
}

/* Parse the SQL statement passed as the first argument. If no error
** occurs and the parse does not result in a new table, index or
Expand Down Expand Up @@ -107887,6 +107902,7 @@ static int renameParseSql(
#endif

db->init.iDb = 0;
db->init.bDropColumn = 0;
return rc;
}

Expand Down Expand Up @@ -108188,7 +108204,7 @@ static void renameColumnFunc(
#ifndef SQLITE_OMIT_AUTHORIZATION
db->xAuth = 0;
#endif
rc = renameParseSql(&sParse, zDb, db, zSql, bTemp);
rc = renameParseSql(&sParse, zDb, db, zSql, bTemp, 0);

/* Find tokens that need to be replaced. */
memset(&sWalker, 0, sizeof(Walker));
Expand Down Expand Up @@ -108392,7 +108408,7 @@ static void renameTableFunc(
sWalker.xSelectCallback = renameTableSelectCb;
sWalker.u.pRename = &sCtx;

rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp, 0);

if( rc==SQLITE_OK ){
int isLegacy = (db->flags & SQLITE_LegacyAlter);
Expand Down Expand Up @@ -108508,6 +108524,7 @@ static void renameTableFunc(
** 3: Object name.
** 4: True if object is from temp schema.
** 5: "when" part of error message.
** 6: Name of column being dropped, or NULL.
**
** Unless it finds an error, this function normally returns NULL. However, it
** returns integer value 1 if:
Expand All @@ -108526,6 +108543,7 @@ static void renameTableTest(
int bTemp = sqlite3_value_int(argv[4]);
int isLegacy = (db->flags & SQLITE_LegacyAlter);
char const *zWhen = (const char*)sqlite3_value_text(argv[5]);
char const *zDropColumn = (const char*)sqlite3_value_text(argv[6]);

#ifndef SQLITE_OMIT_AUTHORIZATION
sqlite3_xauth xAuth = db->xAuth;
Expand All @@ -108536,7 +108554,7 @@ static void renameTableTest(
if( zDb && zInput ){
int rc;
Parse sParse;
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);
rc = renameParseSql(&sParse, zDb, db, zInput, bTemp, zDropColumn);
if( rc==SQLITE_OK ){
if( isLegacy==0 && sParse.pNewTable && sParse.pNewTable->pSelect ){
NameContext sNC;
Expand Down Expand Up @@ -108604,7 +108622,7 @@ static void dropColumnFunc(
#endif

UNUSED_PARAMETER(NotUsed);
rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1);
rc = renameParseSql(&sParse, zDb, db, zSql, iSchema==1, 0);
if( rc!=SQLITE_OK ) goto drop_column_done;
pTab = sParse.pNewTable;
if( pTab==0 || pTab->nCol==1 || iCol>=pTab->nCol ){
Expand Down Expand Up @@ -108697,7 +108715,7 @@ SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
assert( iDb>=0 );
zDb = db->aDb[iDb].zDbSName;
renameTestSchema(pParse, zDb, iDb==1, "");
renameTestSchema(pParse, zDb, iDb==1, "", 0);
sqlite3NestedParse(pParse,
"UPDATE \"%w\"." DFLT_SCHEMA_TABLE " SET "
"sql = sqlite_drop_column(%d, sql, %d) "
Expand All @@ -108707,7 +108725,7 @@ SQLITE_PRIVATE void sqlite3AlterDropColumn(Parse *pParse, SrcList *pSrc, Token *

/* Drop and reload the database schema. */
renameReloadSchema(pParse, iDb, INITFLAG_AlterDrop);
renameTestSchema(pParse, zDb, iDb==1, "after drop column");
renameTestSchema(pParse, zDb, iDb==1, "after drop column", zCol);

/* Edit rows of table on disk */
if( pParse->nErr==0 && (pTab->aCol[iCol].colFlags & COLFLAG_VIRTUAL)==0 ){
Expand Down Expand Up @@ -108767,7 +108785,7 @@ SQLITE_PRIVATE void sqlite3AlterFunctions(void){
static FuncDef aAlterTableFuncs[] = {
INTERNAL_FUNCTION(sqlite_rename_column, 9, renameColumnFunc),
INTERNAL_FUNCTION(sqlite_rename_table, 7, renameTableFunc),
INTERNAL_FUNCTION(sqlite_rename_test, 6, renameTableTest),
INTERNAL_FUNCTION(sqlite_rename_test, 7, renameTableTest),
INTERNAL_FUNCTION(sqlite_drop_column, 3, dropColumnFunc),
};
sqlite3InsertBuiltinFuncs(aAlterTableFuncs, ArraySize(aAlterTableFuncs));
Expand Down Expand Up @@ -229276,7 +229294,7 @@ static void fts5SourceIdFunc(
){
assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused);
sqlite3_result_text(pCtx, "fts5: 2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b", -1, SQLITE_TRANSIENT);
sqlite3_result_text(pCtx, "fts5: 2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98def66a", -1, SQLITE_TRANSIENT);
}

/*
Expand Down Expand Up @@ -234202,9 +234220,9 @@ SQLITE_API int sqlite3_stmt_init(
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */

/************** End of stmt.c ************************************************/
#if __LINE__!=234121
#if __LINE__!=234139
#undef SQLITE_SOURCE_ID
#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115alt2"
#define SQLITE_SOURCE_ID "2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98dealt2"
#endif
/* Return the source-id for this library */
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
Expand Down Expand Up @@ -234356,9 +234374,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.35.0"
#define SQLITE_VERSION_NUMBER 3035000
#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
#define SQLITE_VERSION "3.35.1"
#define SQLITE_VERSION_NUMBER 3035001
#define SQLITE_SOURCE_ID "2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98def66a"

/*
** CAPI3REF: Run-Time Library Version Numbers
Expand Down Expand Up @@ -246808,9 +246826,9 @@ SQLITE_API void sqlite3mc_vfs_shutdown();

#define SQLITE3MC_VERSION_MAJOR 1
#define SQLITE3MC_VERSION_MINOR 2
#define SQLITE3MC_VERSION_RELEASE 0
#define SQLITE3MC_VERSION_RELEASE 1
#define SQLITE3MC_VERSION_SUBRELEASE 0
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.2.0"
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.2.1"

#endif /* SQLITE3MC_VERSION_H_ */
/*** End of #include "sqlite3mc_version.h" ***/
Expand Down Expand Up @@ -258667,6 +258685,7 @@ static void atn2Func(sqlite3_context *context, int argc, sqlite3_value **argv){

#ifndef SQLITE_ENABLE_MATH_FUNCTIONS

#if SQLITE_VERSION_NUMBER < 3035000
/*
** Implementation of the sign() function
** return one of 3 possibilities +1,0 or -1 when the argument is respectively
Expand Down Expand Up @@ -258698,7 +258717,7 @@ static void signFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
}
}
}

#endif

/*
** smallest integer value not less than argument
Expand Down
6 changes: 3 additions & 3 deletions src/sqlite3mc_amalgamation.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.35.0"
#define SQLITE_VERSION_NUMBER 3035000
#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
#define SQLITE_VERSION "3.35.1"
#define SQLITE_VERSION_NUMBER 3035001
#define SQLITE_SOURCE_ID "2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98def66a"

/*
** CAPI3REF: Run-Time Library Version Numbers
Expand Down

0 comments on commit 491387f

Please sign in to comment.